450 likes | 557 Views
31-Oct-2006 A Python Tutorial. Title. Center for Coastal and Ocean Mapping NOAA/UNH Joint Hydrographic Center. Kurt Schwehr 31 Oct 2006. http://docs.python.org/tut/. Where is python on my machine?. Fink for unix software. Fink Commander. Unstable packages are generally pretty stable.
E N D
31-Oct-2006 A Python Tutorial Title Center for Coastal and Ocean Mapping NOAA/UNH Joint Hydrographic Center Kurt Schwehr 31 Oct 2006
Reading a file Adding a comma prevents the extra new line
Writing a python file (aka module) • env finds python in your path • chmod +x dump.py • ./dump.py
Handling programs in a better way • __name__ is set to main if the file is being executed
Use this function from outside the file • Whoops - no documentation!
Epydoc is Kurt’s favorite way to document python code • Epydoc imports your file and creates html documentation
Here is the initial edydoc page • Nice, but could be better • Use markups in the doc string to tell epydoc more