Executable standalone *.pyc after inserting "#!/usr/bin/python"or other options

Lie Ryan lie.1296 at gmail.com
Thu Jan 14 19:05:56 EST 2010


On 01/15/10 09:33, Martin v. Loewis wrote:
> 
> P.S. The approach you present for Lua indeed does not work for
> Python.

Actually the approach should work, though with a little workaround; you
can write your wrapper (e.g. #!/usr/bin/mypython) that simply strips the
first line and pass the file to the real python interpreter
(/usr/bin/python or whatever).

And I think it would be trivial to patch python interpreter to support
loading of #!-ed .pyc.



More information about the Python-list mailing list