[IPython-user] detecting %run

Glen W. Mabey Glen.Mabey at swri.org
Wed Sep 14 15:22:58 CDT 2005

I have a script that I would like to see behave differently when invoked
through the generic shell as
        python the_script.py
versus via the %run magic command.  Is there a variable or
that could be tested to know which invocation was used?

Thank you,
Glen Mabey

More information about the IPython-user mailing list