donkirkby / live-py-plugin

Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser
https://donkirkby.github.io/live-py-plugin
MIT License
291 stars 57 forks source link

Move SvgTurtle to space_tracer package #353

Closed donkirkby closed 2 years ago

donkirkby commented 2 years ago

As we add more features to the turtle support, it gets more annoying to keep the MockTurtle class in synch with SvgTurtle. It was nice to have it in a single file with no dependencies, but it's probably time to make it a subclass of MockTurtle. Put it in an optional feature of the package, so users don't have to install the svgwrite dependency unless they want it.

Alternatively, could we simplify both MockTurtle and SvgTurtle by making them subclasses of Turtle or RawTurtle? Would it be easier to mock out all the dependencies on tkinter than it is to duplicate the features that Turtle builds on top of TNavigator?