tags:

views:

43

answers:

2

Is there a way to change the directory where .pyc file are created by python interpreter ? I saw two PEPs about that subject (0304 and 3147), but none seems to be implemented in the default interpreter (I'm working with python3).

Did I miss something ?

Thanks !

+1  A: 

No, you didn't miss anything.

The .pyc files are always created at the location of the `.py file.

There are some really old patches around to disable the .pyc files completely though. But... why do you need to?

WoLpH
+4  A: 

There's no way to change where the .pyc files go. Python 3.2 implements the __pycache__ scheme whereby all the .pyc files go into a directory named __pycache__. Python 3.2 alpha 1 is available now if you really need to keep your directories clean.

Until 3.2 is released, configure as many tools as you can to ignore the .pyc files.

Ned Batchelder
Ok I'll wait version 3.2 :-)Thanks guys !
Scharron