Re: Idiom for running compiled python scripts?



Mark wrote:

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.

Regards,


Björn


--
BOFH excuse #68:

only available on a need to know basis

.



Relevant Pages

  • Re: stub
    ... and not all of them mark it as nonstandard. ... Charles also mentioned that he thought the word "stub" might have some relation to signal strength.I should have said that before, but I guess remembering to post about "stub" was as much as I could manage at the time. ... Some of you touched on that meaning, ...
    (alt.usage.english)
  • Re: basic serialization question
    ... If the class is marked as Serializable, both public and private fields are ... serialized (unless you mark a field as ). ... > a copy of it on your client, rather a stub to the object located on the ... > server. ...
    (microsoft.public.dotnet.framework.remoting)