New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad behavior with "restart \" or "restart "" in pdb #78447
Comments
(Pdb) restart \
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\pdb.py", line 1667, in main
pdb._runscript(mainpyfile)
File "C:\Program Files\Python36\lib\pdb.py", line 1548, in _runscript
self.run(statement)
File "C:\Program Files\Python36\lib\bdb.py", line 431, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
<code being debugged ommited>
File "C:\Program Files\Python36\lib\bdb.py", line 48, in trace_dispatch
return self.dispatch_line(frame)
File "C:\Program Files\Python36\lib\bdb.py", line 66, in dispatch_line
self.user_line(frame)
File "C:\Program Files\Python36\lib\pdb.py", line 261, in user_line
self.interaction(frame, None)
File "C:\Program Files\Python36\lib\pdb.py", line 352, in interaction
self._cmdloop()
File "C:\Program Files\Python36\lib\pdb.py", line 321, in _cmdloop
self.cmdloop()
File "C:\Program Files\Python36\lib\cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
File "C:\Program Files\Python36\lib\pdb.py", line 418, in onecmd
return cmd.Cmd.onecmd(self, line)
File "C:\Program Files\Python36\lib\cmd.py", line 217, in onecmd
return func(arg)
File "C:\Program Files\Python36\lib\pdb.py", line 1025, in do_run
sys.argv = shlex.split(arg)
File "C:\Program Files\Python36\lib\shlex.py", line 305, in split
return list(lex)
File "C:\Program Files\Python36\lib\shlex.py", line 295, in __next__
token = self.get_token()
File "C:\Program Files\Python36\lib\shlex.py", line 105, in get_token
raw = self.read_token()
File "C:\Program Files\Python36\lib\shlex.py", line 206, in read_token
raise ValueError("No escaped character") |
Just to be clear, even though the traceback is python 3.6, the same bug occurs in 3.7 with an identical traceback except for some changes in line number |
I wouldn't mind taking a look at this. Feel free to assign it to me! |
|
Would it be possible to escape both of those? For the first one, restart "\\" and for the second one, restart "\"" |
Both of those work and don't produce an error |
Good! Is it possible to start a python program with either \ or " as arguments normally (without using character escaping)? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: