View Single Post
  #4  
Old 04-27-2010, 12:12 PM
bloswald bloswald is offline
Member
 
Join Date: Jan 2010
Posts: 7
Talking Solved

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
Reply With Quote