0

For example, if I wanted to avoid generation of .pyc files when using the usual python command I would write:

python -B script.py

But what if I want to use ipython instead? All I know is that

ipython -B script.py

doesn't work

2
  • You could use environment variables. The equivalent to the -B option is PYTHONDONTWRITEBYTECODE. Commented Mar 3, 2016 at 11:19
  • @ThomasK That's good enough, it works. Can you develop it a bit more and post this as an answer? I'll mark it as correct. Commented Mar 3, 2016 at 15:06

1 Answer 1

1

Most of the command line options for the Python interpreter have equivalent environment variables. These will work when starting IPython.

For instance, instead of the -B flag, to avoid writing bytecode, you can use:

PYTHONDONTWRITEBYTECODE=1 ipython
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.