Open topic with navigation
<viz>.cycle
A class that will cycle through a sequence
<viz>.cycle( |
|
seq |
pos = None |
) |
|
seq
Sequence of values to cycle through
pos = None
Initial position to start the cycle at, or None to start at the beginning.
Remarks
This class will iterate over a list of items.
Return Value
A cycle object.
Example
names = viz.cycle( ['Larry', 'Moe', 'Curly'] )
def printNextName():
print(names.next())
vizact.onkeydown('a', printNextName )