working directory for debugging in pythonwin

Colin J. Williams cjw at sympatico.ca
Thu May 12 14:39:26 EDT 2005


Thomas Pfaff wrote:
> Hello all,
> 
> I started using the nice Pythonwin IDE together with Python 2.3 (I have
> come to prefer its editor to IDLE).
> My problem is, that when I want to run a script in the debugger, I can
> give the script name and arguments, but I can't tell it in which
> directory it should run.
> 
> I googled this group but didn't find anything helpful so far.
> 
> I could use some os.chdir in my code, but that's ugly and I neither want
> to copy the script around to the places where I would like to test it.
> 
> Any suggestions?
> 
> Thanks in advance
> 
> 
> Thomas
Thomas,

When you have initiated PythonWin, try opening (^O) the file you wish to 
debug.  By selecting the file directory and file you have chosen the 
current working directory for the file.

Alternatively, in the Windows Explorer, try right clicking on the py 
file you wish to debug.  One of the options given is likely to be PythonWin.

Colin W.



More information about the Python-list mailing list