New person Question Re Python on WinNT

Michael P. Reilly arcege at shore.net
Mon May 10 13:48:29 EDT 1999


Tim B <tim at onegoodidea.com> wrote:
: I am trying to use python for CGI scripts on WinNT running
: Apache web server. Forgive my ignorance but what is the
: #! line I should add at the beginning of my script to make it
: executable?

Hi, Tim.

On WinNT, you can safely ignore the "#!" line (called a shebang).  It
is principly for UNIX where extensions are not significant (at the OS
level), so the first set of bytes of files are read to determine how
the file should be called (called the magic number).  This is a feature
not a bug, since the file must be opened and read to run the program
file anyway, this is generally not considered an issue.

Windows uses the registry and it's reliance on extensions to get this
affect.  If your Python script does not run without this line, I would
look to other problems.

  -Arcege





More information about the Python-list mailing list