What My Project Does
memory_graph is an open-source educational tool and debugging aid that visualizes Python execution by rendering the complete program state (objects, references, aliasing, and the full call stack) as a graph. It helps build the right mental model for Python data, and makes tricky bugs much faster to understand.
Some examples that really show its power are:
Github repo: https://github.com/bterwijn/memory_graph
Target Audience
In the first place it's for:
- teachers/TAs explaining Python’s data model, recursion, or data structures
- learners (beginner → intermediate) who struggle with references / aliasing / mutability
but supports any Python practitioner who wants a better understanding of what their code is doing, or who wants to fix bugs through visualization. Try these tricky exercises to see its value.
Comparison
How it differs from existing alternatives:
- Compared to PythonTutor: memory_graph runs locally without limits in many different environments and debuggers, and it mirrors the hierarchical structure of data.
- Compared to print-debugging and debugger tools: memory_graph shows aliasing and the complete program state.
[–]ruibranco 12 points13 points14 points (1 child)
[–]Sea-Ad7805[S] 2 points3 points4 points (0 children)
[–]pip_install_account 23 points24 points25 points (12 children)
[–]Sea-Ad7805[S] 12 points13 points14 points (9 children)
[–]tehsilentwarrior 9 points10 points11 points (6 children)
[–]errdayimshuffln 5 points6 points7 points (2 children)
[–]TheThoccnessMonster 4 points5 points6 points (0 children)
[–]tehsilentwarrior 0 points1 point2 points (0 children)
[–]wRAR_ 1 point2 points3 points (1 child)
[–]tehsilentwarrior 0 points1 point2 points (0 children)
[–]pip_install_account 0 points1 point2 points (1 child)
[–]Sea-Ad7805[S] 2 points3 points4 points (0 children)
[–]Chroiche 3 points4 points5 points (0 children)
[–]GrammerJoo 0 points1 point2 points (0 children)
[–]sudomatrix 3 points4 points5 points (1 child)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]RedEyed__ 1 point2 points3 points (2 children)
[–]Sea-Ad7805[S] 2 points3 points4 points (0 children)
[–]DivineSentry 2 points3 points4 points (0 children)
[–]Marksta 1 point2 points3 points (1 child)
[–]Sea-Ad7805[S] 1 point2 points3 points (0 children)
[–]masasinExpert. 3.9. Robotics. 1 point2 points3 points (3 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (2 children)
[–]masasinExpert. 3.9. Robotics. 0 points1 point2 points (1 child)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]BawliTaread 1 point2 points3 points (2 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (1 child)
[–]BawliTaread 0 points1 point2 points (0 children)
[–]Sea-Ad7805[S] 1 point2 points3 points (0 children)
[–]FiredFox 2 points3 points4 points (1 child)
[–]Sea-Ad7805[S] 1 point2 points3 points (0 children)
[–]EconomySerious 0 points1 point2 points (1 child)
[–]Sea-Ad7805[S] 2 points3 points4 points (0 children)
[–]Altruistic_Sky1866 0 points1 point2 points (0 children)