Ivan Zuzak wrote: > Joel Hedlund wrote: > > > Yes indeed! But the path to the module will not be the same as the path to > > the script if you are currently in an imported module. Consider this: > > I thought that was the point - to get the full path of the running > script? I see you use the terms "script" and "module" in different > contexts, while I use them as: script = module = file. I can't say > which is right, though :). >
If you execute fubar.py, it's a script with __name__ == "__main__"; if you import it, it's a module __name__ == "fubar". -- http://mail.python.org/mailman/listinfo/python-list