Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

print() showing in the <div> output instead of the console?#1421

Unanswered
ThomRoy asked this question inQ&A
Discussion options

Hello!
Is it possible to have a "print()" displayed in the<div> that is supposed to display the output of the code contained in<py-repl>, rather than in the console?
Thanks in d’avance!

You must be logged in to vote

Replies: 2 comments 4 replies

Comment options

(For the record, I'm a teacher, and I'm trying to use PYSCRIPT to get my students to work on python code. You can see what I'm trying to do here:https://physique-pcsi.prepa-balzac.fr/approches-numeriques-python/equations-differentielles-avec-python/ - just type anything at the javascript prompt that comes up, it doesn't matter).

You must be logged in to vote
2 replies
@patricklok
Comment options

the link is scam

@WebReflection
Comment options

it's not? ... it prompts your name then it asks to solve problems in Python? why would you say that?

Comment options

This is a feature that's been merged a few weeks ago (#1106) but as we haven't had a release since then, it's not not part of a published release.

Once that's part of a release,print() statements inside the REPL will show up "underneath" the REPL as well as in the <py-terminal>. Alternatively, anoutput attribute will be added to the <py-repl>, in which case output will be sent to the HTML element with a matching ID.

You must be logged in to vote
2 replies
@ThomRoy
Comment options

Very nice, thanks a lot!!!
Any idea when this release is likely to roll up?

@henrikenquist
Comment options

Yeah, I'm also interested in the release date of this feature since I would like to use it in "production"...
(https://enquist.pythonanywhere.com/)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
5 participants
@ThomRoy@WebReflection@JeffersGlass@patricklok@henrikenquist

[8]ページ先頭

©2009-2025 Movatter.jp