#NEWLINE# def setTime( self , time , timeCellMode ) : #NEWLINE# #INDENT# if ( not timeCellMode ) : #NEWLINE# #INDENT# if ( len ( time ) == 1 ) : #NEWLINE# #INDENT# return time #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( time [ 0 ] == time [ ( len ( time ) - 1 ) ] ) : #NEWLINE# #INDENT# return [ time [ 0 ] ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return range ( timeCellMode [ 0 ] , ( time [ ( len ( time ) - 1 ) ] + 1 ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return time