executing .pyc files

Bob van der Poel bvdpoel at uniserve.com
Sun Sep 3 13:01:30 EDT 2000


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...).

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




More information about the Python-list mailing list