Skip to content

glpython-editor v0.1.22: input() asks in the console (P36) - #33

Merged
cedricvogel-leo merged 2 commits into
mainfrom
feature/console-input-check
Nov 2, 2026
Merged

cedricvogel-leo merged 2 commits into
mainfrom
feature/console-input-check

Conversation

@cedricvogel-leo

Copy link
Copy Markdown
Collaborator

Bumps glpython-editor from v0.1.21 to v0.1.22 (merge commit 9b734fe, glpython-editor#46) and adds browser checks for it (P36). The IDE's own code doesn't change.

What changes in the IDE

  • input() asks in the console instead of a dialog. While the program waits, the >>> line becomes its input line, with the prompt in front and the cursor in it.
  • Enter sends the line. The prompt and the answer stay in the transcript as one line (> 2 * (3 + 4)); then >>> comes back.
  • Stop (or Ctrl+D in an empty line) ends the wait with EOFError: EOF when reading a line, without restarting Python.
  • «Tests» asks like ▶. «Visualisieren» asks while it records the run, then shows the steps.
  • While the program waits, «Tests» and «Visualisieren» are disabled.

Checks

scripts/check-ide-browser.mjs has two new cases:

  • ▶ asks in the console, no dialog: input("Name: "), the prompt in front of the line, the focus in it, then Name: Zoë / Hallo Zoë.
  • A recursive REPL called in the REPL, then Stop → EOFError:
    • ▶, repl() in the REPL, three answers, a transcript like a shell;
    • repl() again, Stop while it waits: EOFError and no restart;
    • berechnen("2 ** 10") still answers 1024.

Locally green:

  • npm ci, build, test:browser (all cases);
  • lint, with only the warnings in coi-serviceworker.js, as on main.

CLAUDE.md lists the new cases.

Manual tests (after the deploy)

Chrome on the desktop:

  1. ▶ with name = input("Name: ") / print("Hallo", name): the console asks; Enter → Name: Zoë, Hallo Zoë; >>> comes back.
  2. The P36 program (berechnen, repl): ▶, then repl() in the REPL, three expressions, ende.
  3. repl() again, then Stop while it waits: EOFError: EOF when reading a line, no «Python wurde neu gestartet», and berechnen("2 ** 10") still works.
  4. Ctrl+D in an empty input line: the same EOFError.
  5. «Visualisieren» with input(): it asks first, then the steps; input(...) is one step with the typed text.
  6. «Tests» on a file that calls input() at the top: it asks first, then the report.

iPad (Safari, software keyboard):
7. Test 1: after ▶ (a tap on a button), does the keyboard come up by itself, or does the line need a tap? Does return send the line?
8. Test 2: after repl() + return, does the keyboard stay up so the next line can be typed right away?
9. Test 3: Stop while the keyboard is up.

🤖 Generated with Claude Code

cedricvogel-leo and others added 2 commits November 2, 2026 21:35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cedricvogel-leo
cedricvogel-leo merged commit 185d7ec into main Nov 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant