""" Output: ------- pdb bug.py > /home/romain/prog-test/bug.py(1)?() -> print "file is %s" % (__file__,) (Pdb) c Traceback (most recent call last): File "/usr/bin/pdb", line 1067, in main pdb._runscript(mainpyfile) File "/usr/bin/pdb", line 992, in _runscript self.run(statement, globals=globals_, locals=locals_) File "bdb.py", line 366, in run exec cmd in globals, locals File "", line 1, in ? File "bug.py", line 1, in ? print "file is %s" % (__file__,) NameError: name '__file__' is not defined Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /home/romain/prog-test/bug.py(1)?() -> print "file is %s" % (__file__,) (Pdb) """ print "file is %s" % (__file__,)