[Baypiggies] Locating the directory you are executing from

Aahz aahz at pythoncraft.com
Wed May 7 17:17:59 CEST 2008

On Wed, May 07, 2008, Shannon -jj Behrens wrote:
> Furthermore, if you run your script like "$ script.py", and it runs
> because "." is in $PATH, I'm guessing that argv[0] won't have the full
> path, but __file__ will.  (By the way, "." is not in my path.)

<shudder>  ...and "." never should be on the path.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Help a hearing-impaired person: http://rule6.info/hearing.html

More information about the Baypiggies mailing list