[Python-3000] [Python-ideas] Namespaces are one honking great idea -- let's do more of those!
lists at cheimes.de
Sat Feb 2 22:33:07 CET 2008
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.
More information about the Python-3000