3

When using Python from the command line, one can suppress the output of the _pycache_ directory using the command line option -B. Unfortunately, I wasn; able to find how to suppress this output in iPython.

What I have to do when I change a cached module with iPython is the following:

  1. Exit from the interpreter
  2. Remove the _pycache_ folder manually
  3. Enter the interpreter again

As you can imagine, this procedure is really annoying!

Is there any way to suppress the _pycache_ folder with iPython?

  • import sys; sys.dont_write_bytecode = True from [this post](http://stackoverflow.com/questions/154443/how-to-avoid-pyc-files) – John Dec 14 '15 at 18:28
  • @JohnLund Actually this does not work with iPython apparently. –  Dec 15 '15 at 13:41

1 Answers1

0

(should be a comment) Set the PYTHONDONTWRITEBYTECODE environment variable, which should do the same thing.

John
  • 453
  • 3
  • 12