executing .pyc files

Bob van der Poel bvdpoel at uniserve.com
Sun Sep 3 20:40:44 EDT 2000


Michael Hudson wrote:
> 
> Bob van der Poel <bvdpoel at uniserve.com> writes:
> 
> > 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.
> >
> > BTW, this is on linux (we don't do windows here...).
> 
> Look at:
> 
>   http://www.lyra.org/greg/python/
> 
> near the bottom.

Okay, got it. I'd never get that one just fooling around. I'll give it a
go later, but it certainly should do the job! (And how do folks figure
this stuff out?)

-- 
   __
  /  )      /         Bob van der Poel
 /--<  ____/__        bvdpoel at uniserve.com
/___/_(_) /_)         http://users.uniserve.com/~bvdpoel



More information about the Python-list mailing list