Rune Strand wrote: > I Steve, > > I know it's several ways to isolate the filename. I just want to avoid > the overhead of importing sys or os to achieve it.
What overhead? Besides: if you want to do python this, why don't we introduce the function solve_my_problems() that is the only thing a programmer has to invoke... Seriously: Just because you have a usecase for __filename__ doesn't mean everybody else has. > Currently I have this in my scripts: > __filename__ = __file__.replace('\\', '/').rsplit('/', 1)[-1] This is neither platform independent nor less "overhead". This is: import os __filname__ = os.path.split(__file__)[-1] Diez -- http://mail.python.org/mailman/listinfo/python-list