From: Kevin A. <ka...@us...> - 2005-12-27 02:38:17
|
Update of /cvsroot/pythoncard/PythonCard/docs/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27841 Modified Files: shell.html Log Message: updated for 0.8.1 Index: shell.html =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/docs/html/shell.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** shell.html 26 Jul 2004 15:35:31 -0000 1.5 --- shell.html 27 Dec 2005 02:38:07 -0000 1.6 *************** *** 13,30 **** <div id="content"> <h2>Using the Shell in PythonCard</h2> - <p><strong>Version 1.2 of August 2, 2002</strong></p> <p>PythonCard integrates a rich, high-level interactive Python shell. This document describes how to launch and use this shell as you create PythonCard ! applications. It is based on Version 0.6.5 of PythonCard.</p> ! <p>The shell is based on the <a href="http://sourceforge.net/projects/pycrust"> ! PyCrust</a> ! package created by Patrick O'Brien of Orbtech. The release of PyCrust ! included with wxPython 2.3.2.1 is version 0.7. This document is based on ! version 0.7.2 of PyCrust in cvs which you can get from SourceForge. This ! newer version of PyCrust will be included with wxPython 2.3.3, expected out ! sometime in May. There may be some features or key bindings described below ! that are not available if you don't have the cvs version of PyCrust.</p> <h3>Overview of Basic Shell Functionality</h3> ! <p>In many ways, the PythonCard shell resembles IDLE, the Python editor that is included in Python distributions. IDLE is Python's default editor. But the PythonCard shell is more extensive and more robust both in its --- 13,23 ---- <div id="content"> <h2>Using the Shell in PythonCard</h2> <p>PythonCard integrates a rich, high-level interactive Python shell. This document describes how to launch and use this shell as you create PythonCard ! applications. It is based on Version 0.8.1 of PythonCard.</p> ! <p>The PythonCard shell utilizes the PyCrust ! package created by Patrick O'Brien of Orbtech which is included with wxPython. <h3>Overview of Basic Shell Functionality</h3> ! <p>In many ways, the PythonCard shell resembles the shell in IDLE, the Python editor that is included in Python distributions. IDLE is Python's default editor. But the PythonCard shell is more extensive and more robust both in its *************** *** 37,42 **** Figure 1. Using PythonCard Shell as Interactive Programming Environment</p> <p>Figure 1 also illustrates the shell's inclusion of syntax highlighting and ! coloring. In its current release, it does not support customization of these ! color highlights.</p> <p>Pressing Enter anywhere on a line in the shell always processes the command on that line if that line is the last one in the current editing window. --- 30,34 ---- Figure 1. Using PythonCard Shell as Interactive Programming Environment</p> <p>Figure 1 also illustrates the shell's inclusion of syntax highlighting and ! coloring, which can be customized via the <a href="tools/codeEditor.html">codeEditor</a> Styles dialog.</p> <p>Pressing Enter anywhere on a line in the shell always processes the command on that line if that line is the last one in the current editing window. *************** *** 61,76 **** Figure 3. Result of Typing "shell.help()" in PythonCard Shell</p> <p>The arrow keys navigate up, down, left and right in text displayed in the ! shell, as you'd expect. Holding down the Alt key with the right or left arrow moves the cursor by the rough equivalent of a "word" in the direction of the arrow, with movement continuing across line boundaries.</p> ! <p>By default, lines typed into the shell do not wrap. If you wish to see the lines in your shell window wrap at the right border of the shell window, ! type in the shell: shell.SetWrapMode(1). To turn it back off, type ! shell.SetWrapMode(0).</p> <h3>Key Bindings in the Shell</h3> <p>Table 1 shows all of the key bindings defined in the PythonCard shell and describes their usage.</p> <p class="imageCaption">Table 1. Key Bindings in PythonCard Shell</p> ! <table cellpadding="2" cellspacing="2" border="1" width="75%"> <tr> <th>Key Combination</th> --- 53,68 ---- Figure 3. Result of Typing "shell.help()" in PythonCard Shell</p> <p>The arrow keys navigate up, down, left and right in text displayed in the ! shell, as you'd expect. Holding down the Ctrl key with the right or left arrow moves the cursor by the rough equivalent of a "word" in the direction of the arrow, with movement continuing across line boundaries.</p> ! <p>By default, lines typed into the shell wrap. If you don't wish to see the lines in your shell window wrap at the right border of the shell window, ! type in the shell: shell.SetWrapMode(0). To turn it back on, type ! shell.SetWrapMode(1).</p> <h3>Key Bindings in the Shell</h3> <p>Table 1 shows all of the key bindings defined in the PythonCard shell and describes their usage.</p> <p class="imageCaption">Table 1. Key Bindings in PythonCard Shell</p> ! <table cellpadding="2" cellspacing="2" border="1" width="95%"> <tr> <th>Key Combination</th> *************** *** 86,107 **** </tr> <tr> - <td>End</td> - <td>Go to the end of the line</td> - </tr> - <tr> <td>Shift + End</td> <td>Select from the current cursor position to the end of the line</td> </tr> <tr> ! <td>Alt + Right Arrow</td> <td>Move cursor to the right roughly by a word</td> </tr> <tr> ! <td>Alt + Left Arrow</td> <td>Move cursor to the left roughly by a word</td> </tr> <tr> <td>Ctrl + C</td> ! <td>Copy the selection to the clipboard</td> </tr> <tr> --- 78,99 ---- </tr> <tr> <td>Shift + End</td> <td>Select from the current cursor position to the end of the line</td> </tr> <tr> ! <td>End</td> ! <td>Go to the end of the line</td> ! </tr> ! <tr> ! <td>Ctrl + Right Arrow</td> <td>Move cursor to the right roughly by a word</td> </tr> <tr> ! <td>Ctrl + Left Arrow</td> <td>Move cursor to the left roughly by a word</td> </tr> <tr> <td>Ctrl + C</td> ! <td>Copy the selection to the clipboard, removing prompts, if any</td> </tr> <tr> *************** *** 119,127 **** <tr> <td>Ctrl + Shift + V</td> ! <td>Paste the current multi-line clipboard contents at the cursor location</td> ! </tr> ! <tr> ! <td>Ctrl + Up Arrow</td> ! <td>Retrieve most recent History item</td> </tr> <tr> --- 111,115 ---- <tr> <td>Ctrl + Shift + V</td> ! <td>Paste and <strong>run</strong> the current multi-line clipboard contents</td> </tr> <tr> *************** *** 130,151 **** </tr> <tr> <td>Alt + P</td> ! <td>Retrieve most recent History item</td> </tr> <tr> <td>Ctrl + Down Arrow</td> ! <td>Retrieve next History item in the queue</td> </tr> <tr> <td>Alt + N</td> ! <td>Retrieve next History item in the queue</td> </tr> <tr> <td>Shift + Up Arrow</td> ! <td>Retrieve previous History item</td> </tr> <tr> <td>Shift + Down Arrow</td> ! <td>Retrieve next History item in the queue</td> </tr> <tr> --- 118,143 ---- </tr> <tr> + <td>Ctrl + Up Arrow</td> + <td>Retrieve previous History item</td> + </tr> + <tr> <td>Alt + P</td> ! <td>Retrieve previous History item</td> </tr> <tr> <td>Ctrl + Down Arrow</td> ! <td>Retrieve next History item</td> </tr> <tr> <td>Alt + N</td> ! <td>Retrieve next History item</td> </tr> <tr> <td>Shift + Up Arrow</td> ! <td>Insert previous History item at cursor position</td> </tr> <tr> <td>Shift + Down Arrow</td> ! <td>Insert next History item at cursor position</td> </tr> <tr> *************** *** 153,156 **** --- 145,160 ---- <td>Retrieve a specific History item by typing its first few characters and then pressing F8</td> </tr> + <tr> + <td>Ctrl+]</td> + <td>Increase font size</td> + </tr> + <tr> + <td>Ctrl+[</td> + <td>Decrease font size</td> + </tr> + <tr> + <td>Ctrl+=</td> + <td>Default font size</td> + </tr> </table> <h3>Auto-Completion in the Shell</h3> *************** *** 180,185 **** <p>You can turn this auto-completion feature on and off by typing appropriate commands in the shell. To turn the feature on, type in the shell:</p> ! <p class="code">shell.autoComplete = 1</p> ! <p>To turn the feature off, substitute a zero in the above command.</p> <p>Special Python attributes are prefixed with underscore characters. Some of these attributes use only a single underscore while others use two. You --- 184,189 ---- <p>You can turn this auto-completion feature on and off by typing appropriate commands in the shell. To turn the feature on, type in the shell:</p> ! <p class="code">shell.autoComplete = True</p> ! <p>To turn the feature off, substitute a False for True in the above command.</p> <p>Special Python attributes are prefixed with underscore characters. Some of these attributes use only a single underscore while others use two. You *************** *** 189,203 **** example, to exclude attributes preceded by single underscores from the list, type:</p> ! <p class="code">shell.autoCompleteIncludeSingle = 0</p> ! <p>Similarly, setting autoCompleteIncludeSingle to a value of 1 will include those attributes. The same is true for the autoCompleteIncludeDouble ! setting.</p> <p>Python objects include another type of attribute, often referred to as "magic attributes." These attributes' values can only be obtained by calling the object's _getAttributeNames() method, if it has one. You can determine whether these attributes are included in the auto-completion popup ! by setting the variable autoCompleteIncludeMagic to 1 to include them, 0 to exclude them:</p> ! <p class="code">shell.autoCompleteIncludeMagic = 1</p> <h3>Documentation Auto-Display in the Shell</h3> <p>Similarly to the auto-completion popup described in the preceding section, --- 193,222 ---- example, to exclude attributes preceded by single underscores from the list, type:</p> ! <p class="code">shell.autoCompleteIncludeSingle = False</p> ! <p>Similarly, setting autoCompleteIncludeSingle to a value of True will include those attributes. The same is true for the autoCompleteIncludeDouble ! setting. If you want to see all of the underlying wxPython methods for a ! component, background, etc. then type: ! <p class="code">shell.autoCompleteWxMethods = True</p> ! <p>The defaults for these attributes are defined in your pycrustrc.py along ! with the commands that are automatically run when your <a href="shell.html">shell</a> ! first starts up. They are defined as:</p> ! <pre> ! shell.autoCompleteIncludeMagic = True ! shell.autoCompleteIncludeSingle = False ! shell.autoCompleteIncludeDouble = False ! shell.autoCompleteWxMethods = False ! </pre> ! <!-- ! the following section should probably be removed since it refers to ! a feature in PythonCard prior to using Python properties ! --> <p>Python objects include another type of attribute, often referred to as "magic attributes." These attributes' values can only be obtained by calling the object's _getAttributeNames() method, if it has one. You can determine whether these attributes are included in the auto-completion popup ! by setting the variable autoCompleteIncludeMagic to True to include them, False to exclude them:</p> ! <p class="code">shell.autoCompleteIncludeMagic = True</p> <h3>Documentation Auto-Display in the Shell</h3> <p>Similarly to the auto-completion popup described in the preceding section, |