Wednesday, September 10, 2014
Basic Command line Python in ubuntu
Because we operate python in ubuntu (unix) below are some of basic command line that mostly used when playing python in ubuntu.
Here we go:
gedit filename.text > ( Create a file in directory )
ls > (to check all file in the current dir)
ls -l > ( Check all file in the current directory, whether read only or anything else )
chmod +x filename.py > (change from read only to rewrite)
./filename.py > ( run the code )
ctrl+d > ( Change from python to the ubuntu command line vise verse )
python filename.py > ( run ubuntu code from file )
cat filename.py > ( to check what inside the file, what is the code)
cat > filename > (Write file directly from command line use ctrl+d to switch between them)
will add more later
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment