Christian Heimes wrote:
> Stephen J. Turnbull wrote:
>> Mac OS X's open command does something according to extension:
>>
>> chibi:tmp steve$ echo 'print "hello, world"' >> hello.py
>> chibi:tmp steve$ python hello.py 
>> hello, world
>> chibi:tmp steve$ open hello.py 
>> chibi:tmp steve$ 
>>
>> I don't know what, though.  The disk spun, I waited a second, and then
>> the prompt returned. :-)
> 
> I don't know how Mac OS X's open wrapper works. It should open the same
> program as finder does when you clock on a file.
> 
>> How about a wrapper which (like the Unix shells) starts the
>> interpreter from the file named in the shebang if any, and provide a
>> tool for updating shebangs conveniently (for the user) and
>> automatically (for installers).
>>
>> Of course you need to make sure that this wrapper doesn't use any
>> Python 3000 features.<wink>
> 
> I'm not interested in writing a replacement for the shebang magic. It
> may lead to more problems than it's worth the additional work. The
> wrapper must be implemented in C.
> 
> Christian


Instead of a shebang which depends on the shell, maybe a version specifier 
of some sort could be used?

    # -*- pyversions: 2.5, 2.6 -*-

So if a python 3.x detects a too low a version, maybe it can try to restart 
the program with the highest installed version specified.  (Or some 
variation of this.)

Ron

_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to