shebang in cross platform scripts

Ivan Van Laningham ivanlan at pauahtun.org
Wed Apr 6 11:06:50 EDT 2005


Hi All--

Simon Brunning wrote:
> 
> On Apr 6, 2005 2:37 PM, rbt <rbt at athop1.ath.vt.edu> wrote:
> 
> > Does the line below have any negative impact on Windows machines? I
> > develop and test mostly on Unix, but my scripts are often used on Win
> > systems too.
> >
> > #!/usr/bin/env python
> 
> Nope. On Windows it's just a comment.
> 

It works fine using cygwin, uwin, mks and pdksh, all available for
Windows.  Google is your friend.

Symbolic links also work under uwin (don't know for sure about the
others).  That means you can install a link in /usr/bin to whereever
python lives, and expect #!/usr/bin/python to work just fine.

Metta,
Ivan
----------------------------------------------
Ivan Van Laningham
God N Locomotive Works
http://www.andi-holmes.com/
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