how to get teh path of a script
Alex
new_name at mit.edu
Wed Jun 13 16:17:34 EDT 2001
More information about the Python-list mailing list
Wed Jun 13 16:17:34 EDT 2001
- Previous message (by thread): PyArg_ParseTuple part 2
- Next message (by thread): how to get teh path of a script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 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" Does import sys, os print os.path.join(os.getcwd(), sys.argv[0]) do what you want? Alex.
- Previous message (by thread): PyArg_ParseTuple part 2
- Next message (by thread): how to get teh path of a script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list