#NEWLINE# def register( self , fd , events ) : #NEWLINE# #INDENT# if ( fd in self . _active ) : #NEWLINE# #INDENT# raise IOError ( ( 'fd %s already registered' % fd ) ) #NEWLINE# #UNINDENT# self . _control ( fd , events , select . KQ_EV_ADD ) #NEWLINE# self . _active [ self ] = events