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> <br>
<font color="#ffffff" face="helvetica, arial"> <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: 372 $<br>
$Date: 2006-03-05 18:19:39 -0800 (Sun, 05 Mar 2006) $</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </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> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </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> <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> </tt></td>
<td colspan=2><tt>This maintains the state of a virtual text <a href="#screen">screen</a>.<br>
This maintains a cursor position and handles<br>
scrolling as characters are added.<br>
This supports most of the methods needed by an<br>
ANSI text <a href="#screen">screen</a>.<br>
Row and column indexes are 1-based (not zero-based,<br>
like arrays).<br> </tt></td></tr>
<tr><td> </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 all tabs.</tt></dd></dl>
<dl><dt><a name="screen-clear_tab"><strong>clear_tab</strong></a>(self)</dt><dd><tt>Clears tab at the current position.</tt></dd></dl>
<dl><dt><a name="screen-cr"><strong>cr</strong></a>(self)</dt><dd><tt>This moves the cursor to the beginning (col 1) of the current row.</tt></dd></dl>
<dl><dt><a name="screen-crlf"><strong>crlf</strong></a>(self)</dt><dd><tt>This advances the cursor with CRLF properties.<br>
The cursor will line wrap and the <a href="#screen">screen</a> may 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 keeps the cursor within the <a href="#screen">screen</a> 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 to Cursor 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 cursor position after a Save Cursor.</tt></dd></dl>
<dl><dt><a name="screen-cursor_save"><strong>cursor_save</strong></a>(self)</dt><dd><tt>Save current cursor position.</tt></dd></dl>
<dl><dt><a name="screen-cursor_save_attrs"><strong>cursor_save_attrs</strong></a>(self)</dt><dd><tt>Save current cursor position.</tt></dd></dl>
<dl><dt><a name="screen-cursor_unsave"><strong>cursor_unsave</strong></a>(self)</dt><dd><tt>Restores cursor position after a Save 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 returns a copy of the <a href="#screen">screen</a> as a string.<br>
This is similar to __str__ except that lines<br>
are not terminated with line feeds.</tt></dd></dl>
<dl><dt><a name="screen-erase_down"><strong>erase_down</strong></a>(self)</dt><dd><tt>Erases the <a href="#screen">screen</a> from the current line down to<br>
the bottom of the <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 from the current cursor position to<br>
the end of the current line.</tt></dd></dl>
<dl><dt><a name="screen-erase_line"><strong>erase_line</strong></a>(self)</dt><dd><tt>Erases the entire current line.</tt></dd></dl>
<dl><dt><a name="screen-erase_screen"><strong>erase_screen</strong></a>(self)</dt><dd><tt>Erases the <a href="#screen">screen</a> with the background 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 from the current cursor position to<br>
the start of the current line.</tt></dd></dl>
<dl><dt><a name="screen-erase_up"><strong>erase_up</strong></a>(self)</dt><dd><tt>Erases the <a href="#screen">screen</a> from the current line up to<br>
the top of the <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 returns a list of lines representing the 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 inserts a character at (r,c). Everything under<br>
and to the right is shifted right one character.<br>
The last character of the line is lost.</tt></dd></dl>
<dl><dt><a name="screen-lf"><strong>lf</strong></a>(self)</dt><dd><tt>This moves the cursor down with scrolling.</tt></dd></dl>
<dl><dt><a name="screen-newline"><strong>newline</strong></a>(self)</dt><dd><tt>This is an alias for <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 puts a characters at the current cursor position.</tt></dd></dl>
<dl><dt><a name="screen-put_abs"><strong>put_abs</strong></a>(self, r, c, ch)</dt><dd><tt>Screen array starts at 1 index.</tt></dd></dl>
<dl><dt><a name="screen-scroll_constrain"><strong>scroll_constrain</strong></a>(self)</dt><dd><tt>This keeps the scroll region within the <a href="#screen">screen</a> region.</tt></dd></dl>
<dl><dt><a name="screen-scroll_down"><strong>scroll_down</strong></a>(self)</dt><dd><tt>Scroll display down one line.</tt></dd></dl>
<dl><dt><a name="screen-scroll_screen"><strong>scroll_screen</strong></a>(self)</dt><dd><tt>Enable scrolling for entire 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 scrolling from row {start} to row {end}.</tt></dd></dl>
<dl><dt><a name="screen-scroll_up"><strong>scroll_up</strong></a>(self)</dt><dd><tt>Scroll display up one line.</tt></dd></dl>
<dl><dt><a name="screen-set_tab"><strong>set_tab</strong></a>(self)</dt><dd><tt>Sets a tab at the current 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> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td>
<td width="100%"><dl><dt><a name="-constrain"><strong>constrain</strong></a>(n, min, max)</dt><dd><tt>This returns n constrained to the min and max 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> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
<tr><td bgcolor="#55aa55"><tt> </tt></td><td> </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>
|