Class: Console

Table of Contents

Class: Console | simpy1_4_2\SimPy\tkconsole.py
--- | ---
Base Classes |
--- | ---
Frame
Methods |
--- | ---
__getitem__ __init__ __setitem__ autoindent cb_back cb_backspace cb_cleanup cb_complete cb_ctrlhome cb_forward | cb_help cb_home cb_nothing cb_paste cb_position cb_return cb_select cb_space compile config | cursor getline postmenus precontext recall run runline trim unpostmenus write
| __getitem__
    __getitem__ ( self,  key )
| __init__
    __init__ (
            self,
            parent=None,
            dict={},
            **options,
            )
Construct from a parent widget, an optional dictionary to use as the namespace for execution, and any configuration options.
| __setitem__
    __setitem__ (
            self,
            key,
            value,
            )
Exceptions |
--- | ---
KeyError, 'no such configuration option "%s"' % key
| autoindent
    autoindent ( self,  command )
| cb_back
    cb_back ( self,  event )
Step back in the history.
| cb_backspace
    cb_backspace ( self,  event )
| cb_cleanup
    cb_cleanup ( self,  event=None )
| cb_complete
    cb_complete ( self,  event )
Attempt to complete the identifier currently being typed.
| cb_ctrlhome
    cb_ctrlhome ( self,  event )
Go to the beginning of the line just after the prompt.
| cb_forward
    cb_forward ( self,  event )
Step forward in the history.
| cb_help
    cb_help ( self,  event )
| cb_home
    cb_home ( self,  event )
Go to the first non-whitespace character in the line.
| cb_nothing
    cb_nothing ( self,  event )
| cb_paste
    cb_paste ( self,  event )
Handle a paste event (middle-click) in the text box. Pasted text has any leading Python prompts stripped (at last!!).
| cb_position
    cb_position ( self,  event )
Avoid moving into the prompt area.
| cb_return
    cb_return (
            self,
            event,
            doindent=1,
            )
Handle a <Return> keystroke by running from the current line and generating a new prompt.
| cb_select
    cb_select ( self,  event )
Handle a menu selection event. We have to check and invoke the completion menus manually because we are grabbing events to give the text box keyboard focus.
| cb_space
    cb_space ( self,  event )
| compile
    compile ( self,  source )
Try to compile a piece of source code, returning a status code and the compiled result. If the status code is "okay" the code is complete and compiled successfully; if it is "more" then the code can be compiled, but an interactive session should wait for more input; if it is "bad" then there is a syntax error in the code and the second returned value is the error message.
| config
    config (
            self,
            *args,
            *dict,
            )
Get or set configuration options in a Tkinter-like style.
| cursor
    cursor ( self )
Get the current line and position of the cursor.
| getline
    getline (
            self,
            line=None,
            trim=0,
            )
Return the command on the current line.
| postmenus
    postmenus (
            self,
            keys,
            skip,
            cut,
            object,
            )
Post a series of menus listing all the given keys, given the length of the existing part so we can position the menus under the cursor, and the index at which to insert the completion.
| precontext
    precontext ( self )
| recall
    recall ( self,  command=None )
Show a command from the history on the current line.
| run
    run ( self,  code )
Run a code object within the sandbox for this console. The sandbox redirects stdout and stderr to the console, and executes within the namespace associated with the console.
| runline
    runline ( self,  line )
Run some source code given the number of the last line in the text box. Scan backwards to get the entire piece of code to run if the line is a continuation of previous lines. Tag the compiled code so that it can be highlighted according to whether it is complete, incomplete, or illegal.
| trim
    trim ( self,  command )
Trim any matching prefix from the given command line, returning the amount trimmed and the trimmed result.
| unpostmenus
    unpostmenus ( self )
Unpost the completion menus.
| write
    write (
            self,
            data,
            tag=None,
            )
Show output from stdout or stderr in the console.

Table of Contents

This document was automatically generated on Sat May 22 12:08:33 2004 by HappyDoc version 2.1