Skip to content

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