__file__ not defined
Bug #400818 reported by
Fazlul Shahriar
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IPython |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
__file__ is not defined when the script is given as a command line agrument. It works fine when given to plain cpython. This is ipython 0.9.1 and cpython 2.6.2.
$ cat hello.py
print __file__
$ python hello.py
hello.py
$ ipython hello.py
/usr/lib/
from sets import Set
-------
NameError Traceback (most recent call last)
/tmp/hello.py in <module>()
1
----> 2
3 print __file__
4
5
NameError: name '__file__' is not defined
WARNING: Failure executing file: <hello.py>
In [1]:
To post a comment you must log in.
Thanks for the report, fix committed to trunk in r1254.