.py to .pyc
Irmen de Jong
irmen.NOSPAM at xs4all.nl
Sun May 13 17:36:02 EDT 2012
On 13-5-2012 23:27, Colin J. Williams wrote:
> Is there some way to ensure that a .pyc file is produced when executing a .py file?
>
> It seems that for small files the .pyc file is not produced.
>
> Colin W.
All modules no matter how small produce a .pyc file *when they are imported*. If you
start a module directly though, no .pyc is produced. (Notice that Python 3 puts the pyc
files in a subdirectory.)
Why do you care anyway? Pyc files are an implementation detail.
Irmen
More information about the Python-list
mailing list