Small question about Python executeable(sp?) files

Skip Montanaro skip at
Wed Aug 25 11:20:15 EDT 1999

    Syniq> I know that
    Syniq> #! /something/blah/whatever/python

    Syniq> as the first line in your code will make your "program" an
    Syniq> executeable(sp?), but this assumes that your user has python
    Syniq> installed in /something/blah/whatever/python.

    Syniq> What I'm wondering: Is there a way to make the script execute
    Syniq> regardless of the location (or even existence) of python on the
    Syniq> user's machine (basically, compile it into something sort of
    Syniq> resembling ye old .EXE file)?

Two things come to mind.  One, assuming Python is somewhere on the user's
path, use

    #!/usr/bin/env python

as the first line.  Two, check out the various freeze/squeeze/xfreeze
packages available for Python.  Poking around
should yield some positive leads.

Skip Montanaro |
skip at |
847-971-7098   | Python: Programming the way Guido indented...

More information about the Python-list mailing list