Storing Programs for Re-use
Examples
Open a text editor
type: print("I can program in Python!\n")
Save the file as expert.py
1) in Unix, type python expert.py
python expert.py
I can program in Python!
2) in ipython type run expert.py
In [1]: run expert.py
I can program in Python!
3) include the following in the first line of your script and type ./expert.py in unix
#!/usr/bin/env python
4) in Canopy
Open expert.py
run expert.py
Last updated
Was this helpful?
