Hot to get Python executable's path ??
listbox at cybereal.org
Sat Jun 14 12:41:50 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
On Saturday 14 June 2003 04:13 am, vivek kumar wrote:
> >The shebang only works on unix variant systems. Windows simply ignores it
> >goes by the filename extension instead.
> Hmm.., but on My windows 2k system I am using Apache and if I try to run
> script as CGI script without giving the shebang line it simply gives me
> 500 Internal Server Error
> with error
> [Sat Jun 14 15:38:44 2003] [error] [client 127.0.0.1] C:/Program
> Files/Apache Group/Apache2/htdocs/fireshop/environ.py is not executable;
> ensure interpreted scripts have "#!" first line
> [Sat Jun 14 15:38:44 2003] [error] [client 127.0.0.1] (9)Bad file
> descriptor: don't know how to spawn child process: C:/Program Files/Apache
> Anyway , I recently find out the solution. I tried
> and it works on both windows and linux. So I think I can use it safely to
> substitute the shebang line. Am I right ??
Should be fine, that's odd that apache is honoring the shebang hack in win32,
but, good I suppose.
sys.executable or equiv. should work fine if you're just checking it during
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Python-list