On Wed, Mar 05, 2008 at 12:14:04AM +1000, Nick Coghlan wrote: > As a more helpful answer, the ZIP spec allows additional data to be > included in the file before the ZIP header. A more common way of using > this is to add a zip file on to the end of an ELF executable while still > using normal zipfile utilities to read the data in the zip file section > and ignore the executable part. > > It turns out you can actually use the same trick to prepend a shebang > line like "/usr/bin/env python" and a newline character
That's what I thought, too. > - the whole zip > file is still a binary file, but that doesn't prevent the shell from > reading that first line of text and handing the file over to Python for > execution. Unix doesn't distinguish text and binary files. (-: > The fact that this actually works was also news to me when the issue I > linked in my previous post was first brought to my attention :) So it really works? Amazing! Thank you! Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com