Xitami CGI scripts & shebang (was RE: How do I make a Python .batexecutable file?)
Ivan Van Laningham
ivanlan at callware.com
Mon Dec 27 10:47:44 EST 1999
Hi All--
Alex Martelli wrote:
>
> Gordon McMillan writes:
>
> > shebang does nothing on WIndows.
> >
> ...except (just a nit, but...) if you're using Xitami, a little,
> wonderful HTTP server (which I'm currently using to test
> my Python CGI scripts), in which case shebang is
> absolutely crucial (each Python script you're using as
> a CGI script must start with "#!d:/python/pythonw.exe -u",
> or wherever else it is that you've stashed pythonw.exe).
>
The hash-bang trick is also critical if you're using Apache for
Win95/98/NT, too.
In my book, I give an example program that uses Python to ensure that
CGI programs start with the correct #! line; this is important, because
I mirror my real webserver (Apache on NT) with a backup at home (Apache
on RH Linux 5.2), and Linux won't accept #! when it points to a slime
link.
<attacked-by-the-plural-of-#!>-ly y'rs,
Ivan
----------------------------------------------
Ivan Van Laningham
Callware Technologies, Inc.
ivanlan at callware.com
ivanlan at home.com
http://www.pauahtun.org
See also:
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps: Cu Chi, Class of '70
Author: Teach Yourself Python in 24 Hours
----------------------------------------------
More information about the Python-list
mailing list