Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ code_to_events
Function
code_to_events
Lib/test/test_pyrepl/support.py:46–48 ·
view source on GitHub ↗
(code: str)
Source
from the content-addressed store, hash-verified
44
45
46
def
code_to_events(code: str):
47
for
c in code:
48
yield
Event(evt=
"key"
, data=c, raw=bytearray(c.encode(
"utf-8"
)))
49
50
51
def
clean_screen(reader: ReadlineAlikeReader) -> list[str]:
Callers
15
test_calc_screen_wrap_simple
Method · 0.85
test_calc_screen_wrap_wide_characters
Method · 0.85
test_calc_screen_wrap_three_lines
Method · 0.85
test_calc_screen_prompt_handling
Method · 0.85
test_calc_screen_wrap_three_lines_mixed_character
Method · 0.85
test_calc_screen_backspace
Method · 0.85
test_calc_screen_wrap_removes_after_backspace
Method · 0.85
test_calc_screen_backspace_in_second_line_after_wrap
Method · 0.85
test_setpos_for_xy_simple
Method · 0.85
test_setpos_from_xy_multiple_lines
Method · 0.85
test_setpos_from_xy_after_wrap
Method · 0.85
test_setpos_fromxy_in_wrapped_line
Method · 0.85
Calls
2
Event
Class · 0.90
encode
Method · 0.45
Tested by
15
test_calc_screen_wrap_simple
Method · 0.68
test_calc_screen_wrap_wide_characters
Method · 0.68
test_calc_screen_wrap_three_lines
Method · 0.68
test_calc_screen_prompt_handling
Method · 0.68
test_calc_screen_wrap_three_lines_mixed_character
Method · 0.68
test_calc_screen_backspace
Method · 0.68
test_calc_screen_wrap_removes_after_backspace
Method · 0.68
test_calc_screen_backspace_in_second_line_after_wrap
Method · 0.68
test_setpos_for_xy_simple
Method · 0.68
test_setpos_from_xy_multiple_lines
Method · 0.68
test_setpos_from_xy_after_wrap
Method · 0.68
test_setpos_fromxy_in_wrapped_line
Method · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…