Idiom for running compiled python scripts?
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Wed Mar 21 02:10:53 CET 2007
> E.g. say I have a python script "myprog.py". I could just execute
> that directly each time but that means it is "compiled" each time
> I run it which is not efficient and adds to startup time.
Did you measure the performance hit in your case?
> I have one of these stubs for all my python scripts I've created
> so far. Is there not a better way? Do I have to create a separate
> stub each time? I find it a bit messy to require a pair of scripts
> for each utility and it also contributes some inefficiency. Given
> the above stub is so boilerplate, why does python not provide a
> general stub/utility mechanism for this?
I've noticed that calling the interpreter with pre-compiled pyc
files also works.
BOFH excuse #68:
only available on a need to know basis
More information about the Python-list