To create a ScribblingWorm you
have to provide a Scribble class instance,
current size of the drawable in a 2-tuple and
an Event class instance for signalling. Also the
duration of the worm's existance is optional.
It is specified in seconds. The thickness of each
scribble stroke can also be specified.

:
''' To create a ScribblingWorm you have to provide a Scribble class instance, current size of the drawable in a 2-tuple and an Event class instance for signalling. Also the duration of the worm's existance is optional. It is specified in seconds. The thickness of each scribble stroke can also be specified. '''
Thread.__init__(self)
# The thickness of each brush stroke.
self.scribble_thick = thickness
# continue_event is for signalling when to# exit this thread as requested by the# user.
self.continue_event = event
# glscene is the Scribble class implementing# the GLScene interface.
self.glscene = scene
# Current size of the drawable.
width, height = size
# These two coordinates are used for# drawing the scribbles via the Scribble class.
self.x = randint(10,width-10)
self.y = randint(10,height-10)
# The loop iterations.
self.sleep_time = 0.10
self.iterations = int (duration / self.sleep_time)