Vizard 8 » Command Index » Vizard objects » cycle » <cycle>.peek
8.1

<cycle>.peek

Return the next value in the sequence but does not advance.

<cycle>.peek(  
i = 1  
)  
i = 1
How far from the current position to peek to.

Remarks

Returns the specified increment from the current position without advancing the position.

Return Value

The next item in the sequence.

Example

names = viz.cycle( ['Larry', 'Moe', 'Curly'] )
def printNextName():
    print(names.peek())
vizact.onkeydown('a', printNextName )

See also

<cycle>.inc
<cycle>.next
<cycle>.prev