Linux application deployment

Jarek Zgoda jzgoda at gazeta.usun.pl
Sun Sep 5 17:36:29 CEST 2004


Robert M. Emmons <RobMEmmons at cs.com> pisze:

> One thing I've always wonders was -- Is there a way for a python module 
> to tell where it's file is located???  If you could do this it might 
> also be possible to have a python script reset sys.path based on it's 
> own location.

import sys, os

me = os.path.abspath(sys.argv[0])

-- 
Jarek Zgoda
http://jpa.berlios.de/



More information about the Python-list mailing list