| 7.2 Simple Programming under Linux | ||
| Learn advanced Linux commands | ||
|
python (and large) free handbooks by G. van Rossum (the Python creator) are available on the net (try: http://www.python.org/doc/ for browsing or ftp://ftp.python.org for downloading). How do I write a simple Python program? Type in some simple python code to see if it works: #!/usr/bin/env python The first line (starting with the "pound-bang") tells the shell how to execute this text file--it must be there (always as the first line) for Linux to know that this particular text file is a Python script. The second line is a simple Python expression. After saving the file, I make it executable: after which I can run it by typing: Python is an excellent, and very modern programming language. Give it a try, particularly if you like object oriented programming. There are numerous libaries/extensions available on the Internet. For example, scientific python (http://starship.python.net/crew/hinsen/scientific.html) and numeric python (http://sourceforge.net/projects/numpy) are popular libraries used in engineering. Next > Back to "Learn Linux Commands"
|
||

