Message61164
Logged In: YES
user_id=139309
I don't agree with either of your advantages.
- bundlebuilder could compile the "main code" as-is, it just doesn't
- never has to be moved, in exchange for importing foo.bar as
__main__? No thanks.
"executable" is for something else. "mainprogram" is exactly what it
says it is, it's a program, not a module-inside-a-package-that-should-be-
imported-as-__main__. Perhaps there could be a
"writemeamainprogram" argument where you would specify something
like "foo.bar:main" where foo.bar is the module and main is the
function.. but then how would you decide which idiom it should be called
with (sys.argv[1:], sys.argv, no arguments, etc.).
It's not hard to make a two-line program that does what you need it to
and use that as the mainprogram.. I think this use case is just too
specific to the style of your single application. I *always* see the
separate-main-program idiom used that imports something and calls
some function, I have *never* seen people symlink something in /usr/
local/bin to something in site-packages. |
|
Date |
User |
Action |
Args |
2008-01-20 09:59:34 | admin | link | issue900514 messages |
2008-01-20 09:59:34 | admin | create | |
|