maybe a stupid question

Strato python at
Sat Aug 9 00:33:10 CEST 2008


I suppose this has already been asked in the list, but I ask anyway:

I want to determine from where my python app is executed, but I want to 
determine the path of the real script file, not the path of the command 
being executed (in case of symlink in a *bin dir in the system).

I explain:

I have an app installed in /usr/lib/python2.5/site-package/MyApp

I have a symlink in /usr/local/bin that points to 

Then, when I launch my script from anywhere using the symlink, how to 
determine that the script is located in 
/usr/lib/python2.5/site-package/MyApp ?


More information about the Python-list mailing list