Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REPL demo #28

Open
rmonat opened this issue May 28, 2024 · 4 comments
Open

REPL demo #28

rmonat opened this issue May 28, 2024 · 4 comments

Comments

@rmonat
Copy link

rmonat commented May 28, 2024

Hi, I would like to run a demo in a REPL, such as the interactive python shell. My issue is that pe will wait for the end of the current command to go to the next, so just using pe for the REPL will not work. Is there any way to do that?

@paxtonhare
Copy link
Owner

Just pushed a repl function. Hope it helps.

@rmonat
Copy link
Author

rmonat commented May 28, 2024

Thank you very much for your quick answer @paxtonhare. I was thinking about something where:

pe 'python3'
repl
pe "print(1 + .2)"
exit

Would allow pe to work inside the REPL too, do you think that would be possible?

@paxtonhare paxtonhare reopened this May 28, 2024
@paxtonhare
Copy link
Owner

I'm not sure I follow. Can you elaborate? maybe show what the use case is?

@rmonat
Copy link
Author

rmonat commented May 28, 2024

Sorry for being unclear. I would like to be able to produce commands through demo-magic both in the terminal interface and the underlying repl interface of, for example, python.

I would like to produce an output similar to https://asciinema.org/a/99317 using commands such as:

pe python
repl
pe "1+1"
pe "a=3"
pe "a"
pe "b=a*3"
pe "b"
pe "a*b"
pe "exit()"
exit

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

No branches or pull requests

2 participants