[IPython-dev] __file__ in a file executed by %run

Gael Varoquaux gael.varoquaux at normalesup.org
Wed Aug 22 12:08:46 EDT 2007


On Wed, Aug 22, 2007 at 10:04:54AM -0600, Fernando Perez wrote:
> > Is there a reason why __file__ is not set to the absolute path of the
> > file ran, when running a file with %run. I am running 0.7.3 on the box I
> > have right now, so maybe this behavior has changed.

> Yup, to conform to how python does it:

Good. Thanks (sorry, I don't want to install a non packaged version of
ipython on the lab's server, so I couldn't test).

Gaël



More information about the IPython-dev mailing list