Example #1
0
def register_callback():
    # Monkey patch to allow for scripting
    turtle.Screen.exitonclick = replaced_function('exitonclick')
    turtle.TurtleScreen.ontimer = replaced_function('ontimer')
    turtle.TurtleScreenBase._delay = replaced_function('_delay',
                                                       display_once=True)
    turtle.mainloop = replaced_function('mainloop')
Example #2
0
def register_callback():
    global mainloop
    # Monkey patch to allow for scripting
    Turtle.exitOnClick = replaced_function('exitOnClick')
    TurtleScreen.onTimer = replaced_function('onTimer')
    TurtleScreenBase._delay = replaced_function('_delay', display_once=True)
    mainloop = replaced_function('mainloop')