durusmail: quixote-users: is_running on BSD systems
is_running on BSD systems
2005-03-04
2005-03-04
2005-03-04
2005-03-04
2005-03-04
2005-03-05
2005-03-05
2005-03-05
2005-03-05
2005-03-05
2005-03-05
2005-03-05
local.format_date_time
2005-03-11
Re: R: [Quixote-users] is_running on BSD systems
2005-03-07
2005-03-07
2005-03-07
Re: R: [Quixote-users] is_running on BSD systems
2005-03-07
is_running on BSD systems
Daniele Varrazzo
2005-03-07
> David Binger wrote:
>
> > If I remember right, the /usr/bin/env form
> > is not replaced by distutils, and I guess that is a problem
> > for Windows users.
>
>
> That may be.  If so, it's good that distutils doesn't touch it.  Yes it
> has to be changed on Windows, but the alternative is a Windows-specific
> path that everybody else has to change.  If you consider that we're
> really working around a deficiency in Windows ("hey, even Mac does it
> the standard way now!"), the argument for coddling Windows doesn't make
> a lot of sense.

Shbangs are not an issue under Windows: they are merely ignored! On Windows
the executeble to be run is selected through registry and is linked to the
file extension. So a .py is always "executable" (shbang or not). And of
course you can't select a Python version for a given script: on a given
system only one executable is triggered by a direct invocation of the script
name from a command prompt or by double click.

Anyway shbangs are mangled the Unix way by distutils. Every shbang,
including
        #!/usr/bin/env python
is "compiled" by distutils into something like:
        #!C:\PROGRA~1\Python23\python.exe

....and then carefully ignored. The compiled form may be useful for CygWin,
but i long got rid of it and i can't test for it anymore.

In my W32+Linux (no BSD) experience, "#!/usr/bin/env python" works fine and
is portable.

Daniele


reply