Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Doc/library/idle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ Show Call Tip
Show Surrounding Parens
Highlight the surrounding parenthesis.

Character Browser
Open a window to browse Unicode blocks and search for characters by name or code point.
Double-click a character, or select it and press Insert, to insert it into the current window.
Press Copy character to copy it to the clipboard.
The detail tabs show the character's representations, such as escapes, UTF-8 bytes, XML and HTML references, and normalization forms.
Click a highlighted value to copy it, or double-click it to insert it.

.. _format-menu:

Format menu (Editor window only)
Expand Down
6 changes: 6 additions & 0 deletions Lib/idlelib/News3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Released on 2026-10-01
=========================


gh-152940: Add a Unicode character browser to IDLE. It appears on the
Edit menu as "Character Browser" and can browse Unicode blocks, search
for characters by name or code point, insert a character into the
window, and copy a character to the clipboard. Patch by Serhiy
Storchaka.

gh-152745: When "Run... Customized" with "Restart shell" unchecked
while Shell is running code, including waiting for an input('prompt:')
response, just report that the shell is executing instead of
Expand Down
692 changes: 692 additions & 0 deletions Lib/idlelib/charselect.py

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Lib/idlelib/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ def __init__(self, flist=None, filename=None, key=None, root=None):
text.bind("<<find-selection>>", self.find_selection_event)
text.bind("<<replace>>", self.replace_event)
text.bind("<<goto-line>>", self.goto_line_event)
text.bind("<<open-character-browser>>", self.open_character_browser)
text.bind("<<smart-backspace>>",self.smart_backspace_event)
text.bind("<<newline-and-indent>>",self.newline_and_indent_event)
text.bind("<<smart-indent>>",self.smart_indent_event)
Expand Down Expand Up @@ -740,6 +741,11 @@ def open_path_browser(self, event=None):
pathbrowser.PathBrowser(self.root)
return "break"

def open_character_browser(self, event=None):
from idlelib import charselect
charselect.open(self)
return "break"

def open_turtle_demo(self, event = None):
import subprocess

Expand Down
9 changes: 9 additions & 0 deletions Lib/idlelib/idle_test/htest.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,15 @@
"Verify x.y.z versions and test each button, including Close.\n "
}

CharSelectWindow_spec = {
'file': 'charselect',
'kwds': {'_htest': True},
'msg': "Pick a block from the dropdown and scroll the grid.\n"
"Click a character to see its details; double-click to copy it.\n"
"Search for 'heart' or 'U+1F600' and press Go.\n"
"Test the Copy buttons and verify the status bar feedback."
}

# TODO implement ^\; adding '<Control-Key-\\>' to function does not work.
_calltip_window_spec = {
'file': 'calltip_w',
Expand Down
Loading
Loading