comparison doc/dbg_interactive.py.sample @ 1228:e5010975da35

Fix typo in comment.
author Thomas Klausner <tk@giga.or.at>
date Thu, 18 Jul 2013 14:45:37 +0200
parents f0b328ea2fdb
children
comparison
equal deleted inserted replaced
1227:34c2ae08176f 1228:e5010975da35
465 465
466 # Send a message: 466 # Send a message:
467 mydwr = msg(buf) 467 mydwr = msg(buf)
468 mydwr.send() 468 mydwr.send()
469 469
470 # Optionaly, a callback can be registered when a request is sent, with an optional object. 470 # Optionally, a callback can be registered when a request is sent, with an optional object.
471 # This callback takes the answer message as parameter and should return None or a message. (cf. fd_msg_send) 471 # This callback takes the answer message as parameter and should return None or a message. (cf. fd_msg_send)
472 def send_callback(msg, obj): 472 def send_callback(msg, obj):
473 print "Received answer:" 473 print "Received answer:"
474 msg.dump() 474 msg.dump()
475 print "Associated data:" 475 print "Associated data:"
477 return None 477 return None
478 478
479 mydwr = msg(buf) 479 mydwr = msg(buf)
480 mydwr.send(send_callback, some_object) 480 mydwr.send(send_callback, some_object)
481 481
482 # Again optionaly, a time limit can be specified in this case as follow: 482 # Again optionally, a time limit can be specified in this case as follow:
483 mydwr.send(send_callback, some_object, 10) 483 mydwr.send(send_callback, some_object, 10)
484 # In that case, if no answer / error is received after 10 seconds (the value specified), 484 # In that case, if no answer / error is received after 10 seconds (the value specified),
485 # the callback is called with the request as parameter. 485 # the callback is called with the request as parameter.
486 # Testing for timeout case is done by using msg.is_request() 486 # Testing for timeout case is done by using msg.is_request()
487 def send_callback(msg, obj): 487 def send_callback(msg, obj):
"Welcome to our mercurial repository"