From: Kevin A. <al...@se...> - 2002-01-06 23:19:48
|
Patrick is busy with real work, so consider this temporary documentation for the Shell (PyCrust) in PythonCard until Patrick comes up for air in a couple of weeks. Key bindings: Home go to the beginning of the line Shift+Home select to the beginning of the line Shift+End select to the end of the line End go to the end of the line Ctrl+C Copy Ctrl+Shift+C Copy with prompts Ctrl+X Cut Ctrl+V Paste Ctrl+up arrow Retrieve Previous History item Alt+P Retrieve Previous History item Ctrl+down arrow Retrieve Next History item Alt+N Retrieve Next History item F8 command-completion of History item type a few characters of a previous command and then press F8 The arrow keys navigate up, down, left and right just like a text editor. The Alt key combinations cause my system to beep. Typing the period key '.' after a name causes the auto-complete popup menu to appear. You can then use the up and down arrow keys and mouse to navigate the menu. Typing letters will do an incremental search through the menu, so you can often just type the first few characters of an attribute or method name to jump to the correct item of a long menu. Pressing tab will cause the currently selected menu item to be inserted after the period. Clicking outside the menu or pressing the Esc key causes the auto-complete menu to disappear. Typing an open parens '(' after a function or method causes a tooltip popup window to appear with the doc string (if available) for that function or method. For example, when I do this: >>> temp = "" >>> temp.index( I get the doc string for the index method: "S.index(sub [,start [,end]]) -> int Like S.find() but raise ValueError when the substring is not found." Most of the PythonCard framework is missing doc strings right now, but that will change as the API settles down. The one exception is the BitmapTurtle class which is setup and ready to use from the shell if you run the turtle sample. The tooltips are extremely useful for the Python Standard Library. Copy with prompts means that the prefix lines will be copied in addition to the text of the line(s). In general, you'll only need to do Ctrl+Shift+C when you are doing example documentation such as the two lines below. >>> bg = pcapp.getCurrentBackground() >>> comp = bg.components You can edit functions and other compound statements in the shell as well as retrieve the compound statements via the command history. This is somewhat difficult to describe, so just experiment. The one thing you definitely need to be careful of when editing lines is to go to the end of the end (pressing the End key is the quickest way) before pressing Return or Enter. Otherwise, the remainder of the line will be put on the following line and you'll probably have to backspace up to where you pressed return. ka |