program path

Steven Taschuk staschuk at telusplanet.net
Sun Jun 8 01:04:41 EDT 2003


Quoth Peter Hansen:
  [...]
> scriptPath = os.path.abspath(sys.argv[0])

On machines where sys.argv[0] isn't the absolute path already,
might it not be the name-as-invoked, and thus ought to be resolved
by scanning the $PATH (or equivalent) rather than as relative to
the current directory?

-- 
Steven Taschuk                            staschuk at telusplanet.net
Every public frenzy produces legislation purporting to address it.
                                                  (Kinsley's Law)





More information about the Python-list mailing list