Control Characters Swallowed, but only AFTER iPDB runs
- Dominant language
- Python
- Stars
- 16.8k
- Forks
- 4.5k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 6
Description
IPython can accept control characters on `input`, e.g. `^_` (Control-underscore). But once iPDB is run, this is no longer possible.
```python
% ipython
Python 3.10.6 (main, Aug 30 2022, 05:12:36) [Clang 13.1.6 (clang-1316.0.21.2.5)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.5.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: input()
^_foo
Out[1]: '\x1ffoo'
In [2]: 1/0
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
Cell In [2], line 1
----> 1 1/0
ZeroDivisionError: division by zero
In [3]: input()
^_too
Out[3]: '\x1ftoo'
In [4]: %debug
> (1)()
----> 1 1/0
ipdb> exit
In [5]: input()
# <-- can't enter control characters, rings bell. Swallows them if pasted.
```
It is convenient to be able to pass control characters to IPython processes so would be great if iPDB didn't disable this.
Contributor guide
Assessment
This issue has not been assessed yet.