.pyc files

Carl Banks imbosol at vt.edu
Tue Jan 28 04:55:38 CET 2003


Peter Hansen wrote:
> Newt wrote:
>> 
>> Silly question:
>> 
>> From a command line, how do I create pyc files? I know I can do it from
>> within IDLE, but I want to use a different editor (for other languages).
> 
> I just started wondering, why do you want to do this?  Do you
> realize that Python automatically creates the pyc files for
> you when you import modules?  It is only in rare cases that
> you actually need to generate a .pyc file "manually".  Maybe
> this is not such a case?  Just wondering...

Maybe he's trying to install a package by hand.  If you just copy the
.py files to a library directory, a user python process couldn't store
the .pyc files, so you compile the .py files before copying.

This happened to me a couple days ago.


-- 
CARL BANKS




More information about the Python-list mailing list