Since my last post, I have learned that tasks require a different way of thinking.
The following code worked for my purposes, and viztask.schedule is only called once.
Code:
def print_this():
while True:
yield viztask.waitKeyDown( 'p' )
print "this"
yield viztask.waitTime( 1 )
viztask.schedule( print_this() )
Sometimes you have to forget about the problem for a while, then the solution shows itself.
-
bloswald