gsmafra
gsmafra

Reputation: 2494

How to supply options to the python interpreter when using iPython

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

Upvotes: 0

Views: 179

Answers (1)

Thomas K
Thomas K

Reputation: 40340

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

Upvotes: 1

Related Questions