Skip to content

raw-input in notebook compatible with command line #314

Closed

Description

@TimothyClemans

While this may just simply be impossible, it would be nice if I could create interactive programs in SAGE that worked both in the command line interface and the notebook interface. The purpose of this enhancement would be for games, quizzes, wizards, etc.

Component: notebook

Issue created by migration from https://trac.sagemath.org/ticket/314

Activity

  1. williamstein commented on Mar 21, 2007

    @williamstein
    Contributor
    comment:1

    This is a Python question not a SAGE question -- and yes there are billions of ways
    to create interactive Python programs. From this point of view, SAGE is just a Python
    library.

  2. haraldschilly commented on Mar 21, 2011

    @haraldschilly
    Member
    comment:2

    Just a note because it came up on sage-devel: In the notebook, one could use JavaScript's window.prompt() function to trigger input boxes just like Python's raw_input(). To make this working, this would require an round-trip to the client triggered by something in the input program. Therefore, enhancements on the client and server side of the notebook are necessary. I leave it as closed, if somebody has a plan how to do it for real feel free to open it.

  3. added a commit that references this issue on Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions