On Wed, 19 Jan 2011 11:30:36 -0800, Carl Banks wrote: > On Jan 19, 6:42Â am, Steven D'Aprano <steve > +comp.lang.pyt...@pearwood.info> wrote: >> But having said that, the __pycache__ idea isn't too bad. If you have >> this directory structure: >> >> ./module.py >> ./module.pyc >> >> and import module, the top-level .pyc file will continue to be used. > > Nope. PEP 3147 says it now always uses __pycache__.
Looks like the PEP is outdated then. [steve@sylar ~]$ rm __pycache__/* [steve@sylar ~]$ echo "print('spam spam spam')" > spam.py [steve@sylar ~]$ python3.2 -m compileall spam.py Compiling spam.py ... [steve@sylar ~]$ mv __pycache__/spam.cpython-32.pyc ./spam.pyc [steve@sylar ~]$ python3.2 -m spam spam spam spam [steve@sylar ~]$ ls __pycache__/ [steve@sylar ~]$ -- Steven -- http://mail.python.org/mailman/listinfo/python-list