xentaur
diff xentaur.py @ 8:88a212771d27
Vozvrat na screen 0
author | igor |
---|---|
date | Thu Aug 02 20:47:09 2007 +0300 (2007-08-02) |
parents | 825cd93472de |
children | f7fa09a390ed |
line diff
1.1 --- a/xentaur.py Thu Aug 02 20:46:09 2007 +0300 1.2 +++ b/xentaur.py Thu Aug 02 20:47:09 2007 +0300 1.3 @@ -178,11 +178,14 @@ 1.4 broken_links.append([domain,bridge]) 1.5 1.6 wt_timeout=0.5 1.7 -def write_to(screen,string): 1.8 +def write_to(screen,string,return_to_screen=""): 1.9 """ 1.10 write_to(screen,string): 1.11 1.12 - Type *string* to the screen with the number *screen* 1.13 + Type *string* to the specified screen(s). 1.14 + Screen may be specified with the number *screen*, 1.15 + with array of numbers, 1.16 + with array of names. 1.17 1.18 """ 1.19 screen_numbers=[] # number of the screens to write to 1.20 @@ -205,8 +208,9 @@ 1.21 run_command("nohup screen -X paste p >& /dev/null") 1.22 time.sleep(wt_timeout) 1.23 1.24 - run_command("screen -X select 0") 1.25 - time.sleep(wt_timeout) 1.26 + if return_to_screen != "": 1.27 + run_command("screen -X select %s" % (return_to_screen)) 1.28 + time.sleep(wt_timeout) 1.29 1.30 #----------------------------------------------------------------------- 1.31