Message52775
| Author |
andy-chu |
| Recipients |
| Date |
2007年06月27日.05:35:24 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Nick, I've updated the code to use a new runpy.run_zip function, which calls run_module. This does make it a bit cleaner.
Let me know what you think. If the code is good I'll write some tests and documentation.
Also, I'm not sure if the '-c' is really appropriate in sys.argv, but that seems to be what the -m flag uses. It seems like it might make sense to have sys.argv[0] be the zip file, if it is really a first class executable.
And I think a script to build one of these files would be appropriate, which I can add. You could pass it the main module and main function, and it would generate a __zipmain__ stub and add it to the zip file. And it is a good idea if the file is cross platform, so a .pyz extension would work.
Sorry the delayed response, I was a bit busy at work this week... but I'll respond sooner this time. : )
Example:
andychu trunk$ testdata/foo_exe.zip foo bar
__name__: __main__
argv: ['-c', 'foo', 'bar']
andychu trunk$ echo $?
3
File Added: runzip7.diff |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 15:58:48 | admin | link | issue1739468 messages |
| 2007年08月23日 15:58:48 | admin | create |
|