ipython/ipython — Issue #1474: Add argument to `run -n` for custom namespace
Author: mynameisfiber
Created: 2012-03-07 17:53:18+00:00
State: open

It would be nice if I could run:

`%run -n bench -p script.py`

and have scripy.py be run with __name__ set to "bench". This way, I can have alternate initialization for benchmarks or special tests.

As far as I can see, this would just involve adding a new conditional to IPython/core/magic.py:1736