Get Path of current Script
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Mon Mar 14 05:51:25 EDT 2011
More information about the Python-list mailing list
Mon Mar 14 05:51:25 EDT 2011
- Previous message (by thread): Get Path of current Script
- Next message (by thread): Get Path of current Script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 14 Mar 2011 02:25:46 -0700, Alexander Schatten wrote: > is there an easy way (API) to get the directory of the currently running > script? import __main__ import os print os.path.dirname(__main__.__file__) -- Steven
- Previous message (by thread): Get Path of current Script
- Next message (by thread): Get Path of current Script
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list