[Pipet Devel] pygtools tutorial - python & unix basics

J.W. Bizzaro bizzaro at bc.edu
Tue Jun 1 21:09:55 EDT 1999


We will begin with some Python and UNIX basics.  Python is run as a script, just
like a Perl, Tcl/Tk or UNIX shell script.  It therefore must run through another
program, an interpreter.  We can run a Python script as a file to be read by the
interpreter:

    $ python hello.py

Or we can run it as an executable:

    $ ./hello.py

But to do so, we must change the mode of the program:

    $ chmod u+x hello.py

tell the UNIX shell where the interpreter is located.  This is done by adding
this line to the top of the script:

    #!/usr/bin/env python




More information about the Pipet-Devel mailing list