Lots of simple python programs
Python notes en francais (copied from www.ulg.ac.be)
Questions and AnswersHere are the answers to 24 hours' worth of beginner's questions.
Python documentation online
Python Library Reference by the author of Python
Python standard library examples
Sample Python Code from 'useless python'
Sample Python Code
More Sample Python Code
The python book - `how to think like a computer scientist' (2nd edition, html) | Appendix containing the book's example programs
NumPy NumPy example list
Python quick reference sheet
An introduction to the tkinter package, which provides buttons, scales, and other things
More information about the tkinter package. Look at the 'patterns' to find examples.
AIMS python wiki Help on python gnuplot | installing py-gnuplot
How I use python at AIMS
I am trying writing my python code using idle - for example:
idle-python2.4 convolve1.pyidle can provide a python shell to test code.
Recommended way to get Numeric, arrays, etc
Numpy is a rewrite of Numeric and Numarray, which reached release 1.0 only a month or so ago. We are still using Numeric, and the differences should not be noticable. If you import scipy you get the supporting numeric/numpy as a dependency on your platform, so they won't even notice that it changes in future if they use >>> import scipy as S >>> S.array([1,2,3]) (encourage this use of "as S" or "Numeric as N" to avoid namespace issues)
pydoc pydoc <name> ... Show text documentation on something. <name> may be the name of a Python keyword, topic, function, module, or package, or a dotted reference to a class or function within a module or module in a package. If <name> contains a '/', it is used as the path to a Python source file to document. If name is 'keywords', 'topics', or 'modules', a listing of these things is displayed. pydoc -k <keyword> Search for a keyword in the synopsis lines of all available modules. pydoc -p <port> Start an HTTP server on the given port on the local machine. pydoc -g Pop up a graphical interface for finding and serving documentation. pydoc -w <name> ... Write out the HTML documentation for a module to a file in the current directory. If <name> contains a '/', it is treated as a filename; if it names a directory, documentation is written for all the contents.
python -> gnuplot examples
official gnuplot examples
$ ls /usr/share/doc/python-gnuplot/examples/ datafile.py demo.py Gnuplot test.py $ /usr/share/doc/python-gnuplot/examples/demo.py $ /usr/share/doc/python-gnuplot/examples/test.pygnuplot-py home page
Monte Carlo Example (using gnuplot)This runs a simulation of a dense gas of rods.
~mackay/python/runme.py(It calls the function simulate in simulate.py
Vpython examplesJust run
$ vpythonand select File->Open to get loads of demos; they are located in
/usr/local/lib/python2.3/site-packages/visual/demosI copied one of them to
~mackay/python/doublependulum.pybut it doesn't seem to be working.