source-academy/modules

[Feature Request]: Module for controlling a REPL

martin-henz opened this issue · 1 comments

Feature

For teaching MCE, it would be great to have a programmable REPL, in addition to the Source Academy REPL: Importing the module "repl" would add a REPL tab that can be controlled with functions
read(prompt_string): Prints prompt_string in REPL tab and lets user enter a string, which is then returned by read
print(string): Prints string in REPL tab
The functions read and print can then be called in an MCE, for example in the functions user_read and user_print, see https://sourceacademy.org/sicpjs/4.1.4#p8

Issue to be discussed: Does read need to be synchronous?

Checklist

  • I checked the requested feature does not already exist
  • I checked to make sure that this issue has not already been filed

Resolved by #174