# HG changeset patch # User igor # Date 1186076829 -10800 # Node ID 88a212771d27150397990584f581625556090bd6 # Parent 825cd93472deea9186707b444e3ce8fd8acb70bb Vozvrat na screen 0 diff -r 825cd93472de -r 88a212771d27 xentaur.py --- a/xentaur.py Thu Aug 02 20:46:09 2007 +0300 +++ b/xentaur.py Thu Aug 02 20:47:09 2007 +0300 @@ -178,11 +178,14 @@ broken_links.append([domain,bridge]) wt_timeout=0.5 -def write_to(screen,string): +def write_to(screen,string,return_to_screen=""): """ write_to(screen,string): - Type *string* to the screen with the number *screen* + Type *string* to the specified screen(s). + Screen may be specified with the number *screen*, + with array of numbers, + with array of names. """ screen_numbers=[] # number of the screens to write to @@ -205,8 +208,9 @@ run_command("nohup screen -X paste p >& /dev/null") time.sleep(wt_timeout) - run_command("screen -X select 0") - time.sleep(wt_timeout) + if return_to_screen != "": + run_command("screen -X select %s" % (return_to_screen)) + time.sleep(wt_timeout) #-----------------------------------------------------------------------