[New-bugs-announce] [issue7750] IOError when launching script under pdb with backslash in script path

Jason R. Coombs report at bugs.python.org
Thu Jan 21 23:18:25 CET 2010


New submission from Jason R. Coombs <jaraco at jaraco.com>:

Under Python 2.6.4 64-bit on Windows 7 64-bit, I found that when launching a script under the debugger, if backslashes were in the script pathname, they were not interpreted correctly by the interpreter.

For example, create a simple test script, "t-helloworld.py" with the canonical "hello-world" content. The script name must start with a backslash escape character such as 't' or 'n'. Then, from the command prompt:

> python -m pdb .\t-helloworld.py
IOError: (2, 'No such file or directory', '.\t-helloworld.py')
> <string>(1)<module>()
(Pdb)

However, using forward slashes works just fine.

> python -m pdb ./t-helloworld.py
> c:\debug\t-helloworld.py(1)<module>()
-> print "hello world"
(Pdb)

Note that launching the script from the python directly does not exhibit the error - it seems to be only when pdb is used.

Expected behavior: pdb should interpret the command-line parameters the same way Python does.

----------
components: Windows
messages: 98116
nosy: jaraco
severity: normal
status: open
title: IOError when launching script under pdb with backslash in script path
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7750>
_______________________________________


More information about the New-bugs-announce mailing list