File: screen.html

package info (click to toggle)
pexpect 2.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 584 kB
  • ctags: 701
  • sloc: python: 3,036; makefile: 46
file content (174 lines) | stat: -rw-r--r-- 11,819 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174

<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module screen</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>screen</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/noah/documents/export/engineering/source/python/pexpect/trunk/pexpect/screen.py">/home/noah/documents/export/engineering/source/python/pexpect/trunk/pexpect/screen.py</a></font></td></tr></table>
    <p><tt>$Revision:&nbsp;372&nbsp;$<br>
$Date:&nbsp;2006-03-05&nbsp;18:19:39&nbsp;-0800&nbsp;(Sun,&nbsp;05&nbsp;Mar&nbsp;2006)&nbsp;$</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="copy.html">copy</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="screen.html#screen">screen</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="screen">class <strong>screen</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>This&nbsp;maintains&nbsp;the&nbsp;state&nbsp;of&nbsp;a&nbsp;virtual&nbsp;text&nbsp;<a href="#screen">screen</a>.<br>
This&nbsp;maintains&nbsp;a&nbsp;cursor&nbsp;position&nbsp;and&nbsp;handles<br>
scrolling&nbsp;as&nbsp;characters&nbsp;are&nbsp;added.<br>
This&nbsp;supports&nbsp;most&nbsp;of&nbsp;the&nbsp;methods&nbsp;needed&nbsp;by&nbsp;an<br>
ANSI&nbsp;text&nbsp;<a href="#screen">screen</a>.<br>
Row&nbsp;and&nbsp;column&nbsp;indexes&nbsp;are&nbsp;1-based&nbsp;(not&nbsp;zero-based,<br>
like&nbsp;arrays).<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="screen-__init__"><strong>__init__</strong></a>(self, r<font color="#909090">=24</font>, c<font color="#909090">=80</font>)</dt></dl>

<dl><dt><a name="screen-__str__"><strong>__str__</strong></a>(self)</dt></dl>

<dl><dt><a name="screen-clear_all_tabs"><strong>clear_all_tabs</strong></a>(self)</dt><dd><tt>Clears&nbsp;all&nbsp;tabs.</tt></dd></dl>

<dl><dt><a name="screen-clear_tab"><strong>clear_tab</strong></a>(self)</dt><dd><tt>Clears&nbsp;tab&nbsp;at&nbsp;the&nbsp;current&nbsp;position.</tt></dd></dl>

<dl><dt><a name="screen-cr"><strong>cr</strong></a>(self)</dt><dd><tt>This&nbsp;moves&nbsp;the&nbsp;cursor&nbsp;to&nbsp;the&nbsp;beginning&nbsp;(col&nbsp;1)&nbsp;of&nbsp;the&nbsp;current&nbsp;row.</tt></dd></dl>

<dl><dt><a name="screen-crlf"><strong>crlf</strong></a>(self)</dt><dd><tt>This&nbsp;advances&nbsp;the&nbsp;cursor&nbsp;with&nbsp;CRLF&nbsp;properties.<br>
The&nbsp;cursor&nbsp;will&nbsp;line&nbsp;wrap&nbsp;and&nbsp;the&nbsp;<a href="#screen">screen</a>&nbsp;may&nbsp;scroll.</tt></dd></dl>

<dl><dt><a name="screen-cursor_back"><strong>cursor_back</strong></a>(self, count<font color="#909090">=1</font>)</dt></dl>

<dl><dt><a name="screen-cursor_constrain"><strong>cursor_constrain</strong></a>(self)</dt><dd><tt>This&nbsp;keeps&nbsp;the&nbsp;cursor&nbsp;within&nbsp;the&nbsp;<a href="#screen">screen</a>&nbsp;area.</tt></dd></dl>

<dl><dt><a name="screen-cursor_down"><strong>cursor_down</strong></a>(self, count<font color="#909090">=1</font>)</dt></dl>

<dl><dt><a name="screen-cursor_force_position"><strong>cursor_force_position</strong></a>(self, r, c)</dt><dd><tt>Identical&nbsp;to&nbsp;Cursor&nbsp;Home.</tt></dd></dl>

<dl><dt><a name="screen-cursor_forward"><strong>cursor_forward</strong></a>(self, count<font color="#909090">=1</font>)</dt></dl>

<dl><dt><a name="screen-cursor_home"><strong>cursor_home</strong></a>(self, r<font color="#909090">=1</font>, c<font color="#909090">=1</font>)</dt></dl>

<dl><dt><a name="screen-cursor_restore_attrs"><strong>cursor_restore_attrs</strong></a>(self)</dt><dd><tt>Restores&nbsp;cursor&nbsp;position&nbsp;after&nbsp;a&nbsp;Save&nbsp;Cursor.</tt></dd></dl>

<dl><dt><a name="screen-cursor_save"><strong>cursor_save</strong></a>(self)</dt><dd><tt>Save&nbsp;current&nbsp;cursor&nbsp;position.</tt></dd></dl>

<dl><dt><a name="screen-cursor_save_attrs"><strong>cursor_save_attrs</strong></a>(self)</dt><dd><tt>Save&nbsp;current&nbsp;cursor&nbsp;position.</tt></dd></dl>

<dl><dt><a name="screen-cursor_unsave"><strong>cursor_unsave</strong></a>(self)</dt><dd><tt>Restores&nbsp;cursor&nbsp;position&nbsp;after&nbsp;a&nbsp;Save&nbsp;Cursor.</tt></dd></dl>

<dl><dt><a name="screen-cursor_up"><strong>cursor_up</strong></a>(self, count<font color="#909090">=1</font>)</dt></dl>

<dl><dt><a name="screen-cursor_up_reverse"><strong>cursor_up_reverse</strong></a>(self)</dt></dl>

<dl><dt><a name="screen-dump"><strong>dump</strong></a>(self)</dt><dd><tt>This&nbsp;returns&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;<a href="#screen">screen</a>&nbsp;as&nbsp;a&nbsp;string.<br>
This&nbsp;is&nbsp;similar&nbsp;to&nbsp;__str__&nbsp;except&nbsp;that&nbsp;lines<br>
are&nbsp;not&nbsp;terminated&nbsp;with&nbsp;line&nbsp;feeds.</tt></dd></dl>

<dl><dt><a name="screen-erase_down"><strong>erase_down</strong></a>(self)</dt><dd><tt>Erases&nbsp;the&nbsp;<a href="#screen">screen</a>&nbsp;from&nbsp;the&nbsp;current&nbsp;line&nbsp;down&nbsp;to<br>
the&nbsp;bottom&nbsp;of&nbsp;the&nbsp;<a href="#screen">screen</a>.</tt></dd></dl>

<dl><dt><a name="screen-erase_end_of_line"><strong>erase_end_of_line</strong></a>(self)</dt><dd><tt>Erases&nbsp;from&nbsp;the&nbsp;current&nbsp;cursor&nbsp;position&nbsp;to<br>
the&nbsp;end&nbsp;of&nbsp;the&nbsp;current&nbsp;line.</tt></dd></dl>

<dl><dt><a name="screen-erase_line"><strong>erase_line</strong></a>(self)</dt><dd><tt>Erases&nbsp;the&nbsp;entire&nbsp;current&nbsp;line.</tt></dd></dl>

<dl><dt><a name="screen-erase_screen"><strong>erase_screen</strong></a>(self)</dt><dd><tt>Erases&nbsp;the&nbsp;<a href="#screen">screen</a>&nbsp;with&nbsp;the&nbsp;background&nbsp;color.</tt></dd></dl>

<dl><dt><a name="screen-erase_start_of_line"><strong>erase_start_of_line</strong></a>(self)</dt><dd><tt>Erases&nbsp;from&nbsp;the&nbsp;current&nbsp;cursor&nbsp;position&nbsp;to<br>
the&nbsp;start&nbsp;of&nbsp;the&nbsp;current&nbsp;line.</tt></dd></dl>

<dl><dt><a name="screen-erase_up"><strong>erase_up</strong></a>(self)</dt><dd><tt>Erases&nbsp;the&nbsp;<a href="#screen">screen</a>&nbsp;from&nbsp;the&nbsp;current&nbsp;line&nbsp;up&nbsp;to<br>
the&nbsp;top&nbsp;of&nbsp;the&nbsp;<a href="#screen">screen</a>.</tt></dd></dl>

<dl><dt><a name="screen-fill"><strong>fill</strong></a>(self, ch<font color="#909090">=' '</font>)</dt></dl>

<dl><dt><a name="screen-fill_region"><strong>fill_region</strong></a>(self, rs, cs, re, ce, ch<font color="#909090">=' '</font>)</dt></dl>

<dl><dt><a name="screen-get"><strong>get</strong></a>(self)</dt></dl>

<dl><dt><a name="screen-get_abs"><strong>get_abs</strong></a>(self, r, c)</dt></dl>

<dl><dt><a name="screen-get_region"><strong>get_region</strong></a>(self, rs, cs, re, ce)</dt><dd><tt>This&nbsp;returns&nbsp;a&nbsp;list&nbsp;of&nbsp;lines&nbsp;representing&nbsp;the&nbsp;region.</tt></dd></dl>

<dl><dt><a name="screen-insert"><strong>insert</strong></a>(self, ch)</dt></dl>

<dl><dt><a name="screen-insert_abs"><strong>insert_abs</strong></a>(self, r, c, ch)</dt><dd><tt>This&nbsp;inserts&nbsp;a&nbsp;character&nbsp;at&nbsp;(r,c).&nbsp;Everything&nbsp;under<br>
and&nbsp;to&nbsp;the&nbsp;right&nbsp;is&nbsp;shifted&nbsp;right&nbsp;one&nbsp;character.<br>
The&nbsp;last&nbsp;character&nbsp;of&nbsp;the&nbsp;line&nbsp;is&nbsp;lost.</tt></dd></dl>

<dl><dt><a name="screen-lf"><strong>lf</strong></a>(self)</dt><dd><tt>This&nbsp;moves&nbsp;the&nbsp;cursor&nbsp;down&nbsp;with&nbsp;scrolling.</tt></dd></dl>

<dl><dt><a name="screen-newline"><strong>newline</strong></a>(self)</dt><dd><tt>This&nbsp;is&nbsp;an&nbsp;alias&nbsp;for&nbsp;<a href="#screen-crlf">crlf</a>().</tt></dd></dl>

<dl><dt><a name="screen-put"><strong>put</strong></a>(self, ch)</dt><dd><tt>This&nbsp;puts&nbsp;a&nbsp;characters&nbsp;at&nbsp;the&nbsp;current&nbsp;cursor&nbsp;position.</tt></dd></dl>

<dl><dt><a name="screen-put_abs"><strong>put_abs</strong></a>(self, r, c, ch)</dt><dd><tt>Screen&nbsp;array&nbsp;starts&nbsp;at&nbsp;1&nbsp;index.</tt></dd></dl>

<dl><dt><a name="screen-scroll_constrain"><strong>scroll_constrain</strong></a>(self)</dt><dd><tt>This&nbsp;keeps&nbsp;the&nbsp;scroll&nbsp;region&nbsp;within&nbsp;the&nbsp;<a href="#screen">screen</a>&nbsp;region.</tt></dd></dl>

<dl><dt><a name="screen-scroll_down"><strong>scroll_down</strong></a>(self)</dt><dd><tt>Scroll&nbsp;display&nbsp;down&nbsp;one&nbsp;line.</tt></dd></dl>

<dl><dt><a name="screen-scroll_screen"><strong>scroll_screen</strong></a>(self)</dt><dd><tt>Enable&nbsp;scrolling&nbsp;for&nbsp;entire&nbsp;display.</tt></dd></dl>

<dl><dt><a name="screen-scroll_screen_rows"><strong>scroll_screen_rows</strong></a>(self, rs, re)</dt><dd><tt>Enable&nbsp;scrolling&nbsp;from&nbsp;row&nbsp;{start}&nbsp;to&nbsp;row&nbsp;{end}.</tt></dd></dl>

<dl><dt><a name="screen-scroll_up"><strong>scroll_up</strong></a>(self)</dt><dd><tt>Scroll&nbsp;display&nbsp;up&nbsp;one&nbsp;line.</tt></dd></dl>

<dl><dt><a name="screen-set_tab"><strong>set_tab</strong></a>(self)</dt><dd><tt>Sets&nbsp;a&nbsp;tab&nbsp;at&nbsp;the&nbsp;current&nbsp;position.</tt></dd></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-constrain"><strong>constrain</strong></a>(n, min, max)</dt><dd><tt>This&nbsp;returns&nbsp;n&nbsp;constrained&nbsp;to&nbsp;the&nbsp;min&nbsp;and&nbsp;max&nbsp;bounds.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>BEL</strong> = 7<br>
<strong>BS</strong> = 8<br>
<strong>CAN</strong> = 24<br>
<strong>CR</strong> = 13<br>
<strong>DEL</strong> = 127<br>
<strong>ENQ</strong> = 5<br>
<strong>ESC</strong> = 27<br>
<strong>FF</strong> = 12<br>
<strong>HT</strong> = 9<br>
<strong>LF</strong> = 10<br>
<strong>NUL</strong> = 0<br>
<strong>SI</strong> = 15<br>
<strong>SO</strong> = 14<br>
<strong>SPACE</strong> = ' '<br>
<strong>SUB</strong> = 26<br>
<strong>VT</strong> = 11<br>
<strong>XOFF</strong> = 19<br>
<strong>XON</strong> = 17</td></tr></table>
</body></html>