-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
PyTerminal .process(code) utility #2026
Conversation
1d95090
to
bc112cd
Compare
for more information, see https://pre-commit.ci
bc112cd
to
f103183
Compare
Do you have a small code sample of how this feature would be used? I think I understand, but I want to be sure. |
@JeffersGlass visit this page: https://webreflection.github.io/coincident/test/pyterminal/ find some python code (multiline) in your editor ... try to copy and paste, see it failing. Now click the tiny top right button and paste that very same code into the prompt then see it working, as in: it's processed correctly and you can just, eventually add, an extra Enter and see the result. That live page uses already the latest npm version of pyscript built from this MR. P.S. I was planning to demo this in today PyScript Fun call, if you'll be there I'll explain it all. |
@ntoll the demo is out of this repository or project scope, it's an external playground ... I can change that icon but by no mean that page should block this MR (it might disappear too at some point) The documentation should land in the right repo too 😉 |
@ntoll is the icon any better now? https://webreflection.github.io/coincident/test/pyterminal/ |
@ntoll btw, if we want to trust that page to exist (for docs or anything else) I'd rather move it into PSDC or inside our examples ... it would make more sense than relying on something I've just trashed in coincident only because it has |
Agreed WRT docs. We should put the demo in the demos. :-) |
@ntoll so can we move this forward? it's blocking eventually the next up for links in terminal |
Apologies... yes. |
* PyTerminal .process(code) utility * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
This MR allows PyTerminal users to actually process imperatively some code which is something overly cumbersome otherwise within both interpreters, as these are orchestrated in a worker and not so easy to reach as both are constantly blocked due readline holding them on main.
Changes
process(code)
where each line is simulated as pasted on the terminalChecklist
CHANGELOG.md