Open kevinlin1 opened 5 years ago
The most universal and language-independent method for doing this is to add the PythonTutor client-side JavaScript for processing PythonTutor JSON into visualizations. aegamesi/java-visualizer-intellij-plugin provides some groundwork.
Then, to make a direct embedding, the website developer runs a PythonTutor JSON generator on their local system and pastes the resulting JSON string into their document. Not the most streamlined solution but it also doesn't depend on external libraries (that wouldn't fit into the existing Jekyll workflow) to execute code and generate an execution trace.
Instead of embedding an iframe, generate a direct embedding. This will improve page loads, reduce flash-in and improve embed reliability, and enable offline persistence for PWAs that want it.
This solution should also allow embeds to support other languages and reduce reliance on any particular server's PythonTutor implementation.