Skip to content

Commit

Permalink
Merge branch 'master' of github.com:shoebot/shoebot
Browse files Browse the repository at this point in the history
  • Loading branch information
rlafuente committed May 1, 2018
2 parents 3935e9e + a622e22 commit c67c59a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions shoebot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@

# TODO - Check if this needs importing here:
#from shoebot.data import MOVETO, RMOVETO, LINETO, RLINETO, CURVETO, RCURVETO, ARC, ELLIPSE, CLOSE, LEFT, RIGHT, ShoebotError, ShoebotScriptError
from time import sleep

from shoebot.core.events import publish_event, QUIT_EVENT

RGB = "rgb"
HSB = "hsb"
Expand All @@ -59,7 +61,7 @@ def _restore():
pass


## Convenience functions to create create a bot, it's canvas and 'sink'
## Convenience functions to create create a bot, its canvas and sink

def create_canvas(src, format=None, outputfile=None, multifile=False, buff=None, window=False, title=None, fullscreen=None, show_vars=False):
"""
Expand Down Expand Up @@ -303,8 +305,14 @@ def run(src,
raise
else:
return
elif background_thread:
try:
while sbot_thread.is_alive():
sleep(1)
except KeyboardInterrupt:
publish_event(QUIT_EVENT)

if sbot_thread is not None:
if background_thread is not None:
sbot_thread.join()

return sbot

0 comments on commit c67c59a

Please sign in to comment.