diff --git a/examples/kiva_explorer.py b/examples/kiva_explorer.py index 04fb6f162..5022de1ee 100644 --- a/examples/kiva_explorer.py +++ b/examples/kiva_explorer.py @@ -42,6 +42,7 @@ class ScriptedComponent(Component): + """ An Enable component that draws its mainlayer from a script """ #: kiva drawing code for mainlayer draw_script = Code(default_script) @@ -53,6 +54,7 @@ class ScriptedComponent(Component): _draw_code = Any def _draw_mainlayer(self, gc, view_bounds=None, mode="default"): + """ Try running the compiled code with the graphics context as `gc` """ with gc: try: self.error = '' @@ -61,6 +63,7 @@ def _draw_mainlayer(self, gc, view_bounds=None, mode="default"): self.error = str(exc) def _compile_script(self): + """ Try compiling the script to bytecode """ try: self.error = '' return compile(self.draw_script, "