Skip to content

input() where the embed can't wait: «In IDE öffnen» (P36) - #29

Merged
cedricvogel-leo merged 1 commit into
mainfrom
feature/input-in-ide
Nov 2, 2026
Merged

cedricvogel-leo merged 1 commit into
mainfrom
feature/input-in-ide

Conversation

@cedricvogel-leo

Copy link
Copy Markdown
Collaborator

When a block calls input() and the embed can't wait for an answer (no cross-origin isolation, as everywhere in LiaScript), the notice below the block now points to the IDE, with a button (P36, together with glpython-editor#46).

  • With the ide feature: «Programme mit input() laufen in der IDE, dort fragt die Konsole nach der Eingabe.» and an «In IDE öffnen» button. The button does the same as the menu item: it opens the program in the IDE in a new tab.
  • Without ide, or in visual mode: «input() funktioniert hier nicht: Diese Seite kann nicht auf eine Eingabe warten.»
  • English: "Programs with input() run in the IDE, where the console asks for the input." / "input() doesn't work here: this page can't wait for an answer."
  • Code: the menu item's open logic moved into openInIde, which both use. README (the paragraph on input()) updated.

The console in the embed shows Python's RuntimeError: input() is not available here with a hint of its own (glpython-editor#46, live with the embed's deploy, without a course bump).

Tested

LiaScript player (Chrome, local course version: 1.0.0, the hosted embed):

Block Notice after ▶ Button
@GLPython.eval(features=run,repl,visualize,tests,ide) with input("> ") «Programme mit input() laufen in der IDE, …» «In IDE öffnen»: opens https://glpython-edu.github.io/?project=… in a new tab
@GLPython.eval(features=run,repl) with input("> ") «input() funktioniert hier nicht: …» none

check-macro passes.

How it gets live

Courses only get it with a patch version bump (e.g. Etappe 5); without one they keep the old text.

Manual tests

  1. Etappe 5 (after the bump), a block with input(): ▶ → notice with «In IDE öffnen» → the IDE opens with the program; ▶ there asks in the console.
  2. iPad: the same; the button opens a new tab (Safari may ask whether to allow the pop-up).

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cedricvogel-leo
cedricvogel-leo merged commit d6a27b4 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