executing .pyc files

Pete Shinners pshinners at mediaone.net
Mon Sep 4 03:51:30 CEST 2000


"Bob van der Poel" <bvdpoel at uniserve.com> wrote
> Playing around a bit I was able to get python to create a .pyc file from
> a program. Since this loads/starts up faster than a normal script I was
> thinking that in my source dir I'd have the full text version and the
> byte-code version in my executable dir. However, I can't seem to find a
> easy way to get it to run. Seems that I have to do something like
> 'python myprog.pyc'. What I'd like to do is to rename myprog.pyc to
> myprog and then just type 'myprog'. I guess I could create a script file
> 'myprog' which just calls python, but that seems rather in-elegant.

it seems a simple method would be to create a separate python
script that simply wraps around your main code. this could be a
real short file that parses and compiles quickly, and would work
with the .PYC of your code






More information about the Python-list mailing list