#NEWLINE# def add_watcher( self , name , command , args = [ ] , autostart = False ) : #NEWLINE# #INDENT# assert ( type ( name ) == str ) #NEWLINE# assert ( type ( command ) == str ) #NEWLINE# assert ( type ( args ) == list ) #NEWLINE# assert ( type ( autostart ) == bool ) #NEWLINE# addWatcher_command = Dict ( ) #NEWLINE# addWatcher_command . command = 'add' #NEWLINE# addWatcher_command . properties . cmd = command #NEWLINE# addWatcher_command . properties . name = name #NEWLINE# addWatcher_command . properties . args = args #NEWLINE# addWatcher_command . properties . start = command #NEWLINE# response = self . _client . call ( addWatcher_command ) #NEWLINE# response = response . get ( 'status' , None ) #NEWLINE# if ( response and ( response == 'ok' ) ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# return False