Python

Python 101

If running a .py script and get an error of " : File not found", check to ensure that the python script does not end with DOS ^M characters. If needed, cat old_script.py | dos2unix > new_script.py and run the new script. It is a weired error, and I thought most program can handle ^M these days...

#!/usr/bin/env python
many python script starts as that. It effectively look at user's Environment variable and find out what (where) python is defined and run it as the interpreter.

Python can both be interpreted or compiled into byte-code.

Setting up the program on FEDORA FC5




Snipplets in stand alone program

...





[Doc URL: http://www.cs.fiu.edu/~tho01/psg/python.html]
(cc) Tin Ho. See main page for copyright info.


"LYS on the outside, LKS in the inside"
"AUHAUH on the outside, LAPPLAPP in the inside"