On Sep 16, 6:56 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Summercool wrote:
> > how come a program that runs directly doesn't need to be optimized > > into bytecode first? Or... is it that the interpreter will just run > > the program as it goes by, without ever generating a .pyc file? So > > what if you have a program that you only update every few weeks... > > then you can ask a .pyc to be generated so that it runs faster every > > time? > > You can, if you want, compile a program manually: > > http://docs.python.org/lib/module-compileall.html > > and run the resulting .pyc file if you wish. Most people don't bother, > though. If you have a very large main program you can encapsulate it as > a library and then call the library function from a teent-weeny main > program that isn't worth compiling. that's great... I just wonder why there is no command line that says python -c try.py or something like that to force a generation of the byte code. -- http://mail.python.org/mailman/listinfo/python-list