What is my module name?

Clark C . Evans cce at clarkevans.com
Wed Jun 27 19:54:09 CEST 2001


I have a module with a function below I
use __name__ to return the module name.
However, when I call the function from 
outside, it returns '__builtin__'.  Is
there a way to have this function return
the module name regardless of where it
is called?

def myName(): return __name__

Thanks!

Clark




More information about the Python-list mailing list