Selling Python Software
Peter Hansen
peter at engcorp.com
Tue Nov 4 16:45:40 EST 2003
Will Stuyvesant wrote:
>
> I guess I am going to send them an MIT licence (although I am afraid
> those licences are pretty useless in The Netherlands), the .pyc files
> for the algorithm and the utility modules, and a .py file for the main
> program.
No need even for that .py file, is there? You can easily execute
a .pyc file directly if the .py doesn't exist. To create it,
easiest way is just to do "import mymainmodule" from the interactive
prompt, then copy the resulting .pyc somewhere else.
Alternatively, keep you .py as the main entry point, but do nothing
inside it except import another module and execute code in it.
But if you can do that, then invoking that module directly is easy
too: "python -c 'import main; main.main()'" does the trick...
-Peter
More information about the Python-list
mailing list