Hot to get Python executable's path ??

Alan Kennedy alanmk at hotmail.com
Sat Jun 14 07:58:59 EDT 2003


Zac Jensen wrote:

> Should be fine, that's odd that apache is honoring the shebang hack in
> win32, but, good I suppose.

Putting the path to an interpreter on the first line of an executable text file
is not a hack.

The original unix shell method of recognising executable files was if their
"execute bit" was set. If such a file was a text file, by convention, the first
line contained what we now call the "shebang" in the web world, which gave the
path to the interpreter for that file.

It's not unusual that the Apache people brought that unix convention over to
win32. It's a nicer convention than relying on the file extension to determine
the interpreter for an interpreted file.

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list