#NEWLINE# def collectdatawhile_slave( self , period ) : #NEWLINE# #INDENT# '\n\t\t### Not a public function\n\t\tDoes the threaded work of collecting the data and storing it\n\t\tin an attribute of the class.\n\t\t' #NEWLINE# tempresults = [ ] #NEWLINE# try : #NEWLINE# #INDENT# self . open ( ) #NEWLINE# while self . collectdatawhile_active : #NEWLINE# #INDENT# tempresults . append ( self . collectdata ( ) ) #NEWLINE# time . sleep ( period ) #NEWLINE# #UNINDENT# self . curresults = tempresults #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . close ( )