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

Added autoprint feature #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

fnbn
Copy link

@fnbn fnbn commented May 4, 2023

Hi, I might have a solution to issue #44. The proposal parses the cell content with the system installed python, surrounds the last syntax node with a print call if it is an expression and deparses the abstract syntax tree again.

So far it seems to work fine. The only issue I can think of is when the cell content is parsable for the micropython interpreter but not for the system installed version of python. For standard cpython the only difference in that direction I could find was here. I don't understand why, but it still worked with my installed python interpreter (3.9.9)

Let me know what you think!

@jondufault
Copy link

This is so freaking useful and works like a champ.

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

Successfully merging this pull request may close these issues.

2 participants