python / python/cpython

IDLE: add a Unicode character browser

Aperta
#152,940 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

stdlib topic-IDLE type-feature
Lingua principale
Python
Stelle
77.2k
Fork
35.9k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

Feature or enhancement

IDLE has no way to browse or search for a Unicode character. Inserting one requires already knowing its code point (and typing an escape) or pasting it from another application.

Besides making characters easy to insert, such a tool is useful for learning about Unicode — exploring blocks, looking up a character's name, category, and other properties, and seeing how it is written as an escape, as UTF-8 bytes, as an XML or HTML reference, and in the normalization forms.

I propose a Character Browser, similar to KDE's kcharselect and GNOME Characters, added as a CharSelect extension on the Edit menu (available in both the Shell and the editor).

Features:

  • A grid of Unicode blocks selected from a drop-down, scrollable, with hover and selection highlight.
  • Search by character name substring, or by code point in many notations: U+2764, 0x2764, ❤, ❤, a bare hex/decimal number, \u/\U/\x/\N{...}/simple escapes, surrogate pairs, and a UTF-8 byte escape run.
  • A detail panel with three tabs: an Overview (name, code point, decimal), a Repr tab (literal, Python escape, UTF-8 bytes, surrogate pair, XML and HTML references, \N{...}), and a Unicode tab (block, category, bidi, combining, East Asian width, mirrored, decomposition, numeric values, and normalization forms).
  • Insert the character at the cursor of the editor or Shell (replacing any selection, and staying within the Shell's input area), or Copy it to the clipboard. Double-clicking a character in the grid inserts it.
  • On the detail tabs, clicking a value copies it and double-clicking inserts it.

When opened with an editor selection, the browser seeds the search with it.

A PR will follow.

Related (not a duplicate): #80648 (help with invisible characters).

Linked PRs
  • gh-152945

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia esaminando l’estensione CharSelect proposta nel menu Edit di IDLE e il PR gh-152945 collegato. Confronta l’implementazione con i requisiti elencati per esplorazione, ricerca, dettagli, inserimento e copia di Unicode sia per la Shell sia per l’editor; completato significa che l’ambito concordato è implementato e verificato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
desktop
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.