Way to have compiled python files in a separate folder?

Posted by Evan Fosmark on Stack Overflow See other posts from Stack Overflow or by Evan Fosmark
Published on 2009-01-23T05:02:12Z Indexed on 2010/06/06 21:22 UTC
Read the original article Hit count: 264

Filed under:
|
|

Is it possible to have Python save the .pyc files to a separate folder location that is in sys.path?

/code
    foo.py
    foo.pyc
    bar.py
    bar.pyc

To:

/code
   foo.py
   bar.py
/code_compiled
   foo.pyc
   bar.pyc

I would like this because I feel it'd be more organized. Thanks for any help you can give me.

© Stack Overflow or respective owner

Related posts about python

Related posts about files