how to get teh path of a script
Rainy
sill at optonline.net
Wed Jun 13 17:15:44 EDT 2001
On Wed, 13 Jun 2001 20:05:29 GMT, Stéphane BAUSSON <stephane.bausson at free.fr> wrote:
> Hello
>
> I would like to get for exemple in my_script.py located at
> /home/toto/my_script.py to get in my_script.py the value "/home/toto"
> ...
> Any hint ?
>
> Thanks
>
> Stephane
>
> --
> stephane.bausson at free.fr - Toulouse (France)
>
>
>
import os
print os.getcwd()
--
Jupiter and Saturn Oberon Miranda
And Titania Neptune Titan
Stars can frighten
- Syd
More information about the Python-list
mailing list