peter at engcorp.com
Mon Jun 9 04:57:03 CEST 2003
Steven Taschuk wrote:
> Quoth Peter Hansen:
> > See Mike's reply... it works fine.
> Good to know.
> > So basically os.path.abspath(sys.argv) should be the idiomatic
> > way to find the full path where the __main__ script lives.
> I notice the alternative
> which I like because it generalizes easily to arbitrary modules,
> as the sys.argv approach does not. Does this alternative have
> any disadvantages I'm not seeing?
Not available pre-2.3, as far as I know. Fails under 2.2 anyway.
More information about the Python-list