__pycache__, one more good reason to stck with Python 2?

jmfauth wxjmfauth at gmail.com
Wed Jan 19 11:30:12 EST 2011


My "nightmare" was mainly due, because when I read the
the "What's new?", I did not understand too much this
caching stuff. It's only later, after testing some
applications, I really got the surprise to understand
it. (Py3.1 and Py3.2 pyc's mixture).

Having said this, to tell you the truth. I do really
not feel comfortable with it -- two "working directories",
a subdir in a working dir containing only a few scripts,
filenames, cache multiplications (I would have 1202 caches
on my hd now).

There are certainly advantages, just wondering if the
balance is positive ou negative.

Just for the story, I'm already somwehow experencing some
funny stuff. My test working dir has already a full bloated
cache. You may argue, that's my fault. I may reply: bof,
that Python which is doing it...)

(As a Windows users, I just wondering how this will
impact tools like py2exe or cx_freeze).

-----

Antoine Pitrou

Yes, I can launch a pyc, when I have a single file.
But what happens, if one of your cached .pyc file import
a module with a name as defined in the parent directory?
The machinery is broken. The parent dir is not in the
sys.path.

(Unless I'm understanding nothing or I have done a huge
mistake in my tests).

jmf



More information about the Python-list mailing list