How do i chdir to the directory that the python script is in? so far i figured out os.chdir and sys.argv[0]. I'm sure there is a better way then to write my own func to parse argv[0]
for whatever reason __file__ was C:\dev\Python25\Lib\idlelib so a quick replace with argv[0] solved it. +1 and check marked
acidzombie24
2009-02-04 03:07:17
Also, depending on platform you may want to use `os.path.abspath` on the result of `os.path.dirname` to make sure any symbolic links or other filesystem redirection get expanded properly.
James Bennett
2009-02-04 07:16:37