directories problem

Lowell Kirsh lkirsh at cs.ubc.ca
Tue Sep 14 06:24:21 EDT 2004


Thanks Peter! I'm eager to try this out. It seems like a much cleaner 
solution than all the other options I've been considering.

Lowell

Peter Hansen wrote:

> Dan Perl wrote:
> 
>> I'm not sure whether this is what Lowell is looking for, but I've been 
>> looking at a similar problem and I would also like to see a solution 
>> for that: can a python script know its own full path name?
> 
> 
> See near the end of this thread: 
> http://groups.google.ca/groups?threadm=8089854e.0407070426.2fb90f95%40posting.google.com 
> 
> 
> Also note that scripts other than the main one can do it even more
> easily: __file__, or if that's not always an absolute path, 
> os.path.abspath(__file__).
> 
> -Peter



More information about the Python-list mailing list