shebang in cross platform scripts

2005-04-06 Thread rbt
Haven't tested this on Windows yet... thought I'd ask here:
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
Many thanks,
rbt
--
http://mail.python.org/mailman/listinfo/python-list


Re: shebang in cross platform scripts

2005-04-06 Thread Simon Brunning
On Apr 6, 2005 2:37 PM, rbt [EMAIL PROTECTED] 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.

-- 
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: shebang in cross platform scripts

2005-04-06 Thread Diez B. Roggisch
rbt wrote:

 
 Haven't tested this on Windows yet... thought I'd ask here:
 
 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

Thanks to the # being the comment sign in python, it will be silently
discarded by windows.

-- 
Regards,

Diez B. Roggisch
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: shebang in cross platform scripts

2005-04-06 Thread Bill Mill
On Apr 6, 2005 9:37 AM, rbt [EMAIL PROTECTED] wrote:
 
 Haven't tested this on Windows yet... thought I'd ask here:
 
 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

What the others have said already is true, that it will be ignored on
windows, with one caveat. The shebang is interpreted by Apache if your
script is a CGI script. So, if your script is a CGI, you will need to
have a windows version and a nix version.

Peace
Bill Mill
bill.mill at gmail.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: shebang in cross platform scripts

2005-04-06 Thread Ivan Van Laningham
Hi All--

Simon Brunning wrote:
 
 On Apr 6, 2005 2:37 PM, rbt [EMAIL PROTECTED] 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
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: shebang in cross platform scripts

2005-04-06 Thread Bill Mill
On Apr 6, 2005 11:06 AM, Ivan Van Laningham [EMAIL PROTECTED] wrote:
 Hi All--
 
 Simon Brunning wrote:
 
  On Apr 6, 2005 2:37 PM, rbt [EMAIL PROTECTED] 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.

This works in cygwin as well; I didn't mention cygwin since the OP
seemed to be asking about windows distribution, but it's a good point.

Peace
Bill Mill
-- 
http://mail.python.org/mailman/listinfo/python-list