Attributes
- name
name = 'PyCrust Shell'
- revision
revision = __revision__
Method summary
- __init__(self, parent, id = -Const(1), pos = wxDefaultPosition, size = wxDefaultSize, style = wxCLIP_CHILDREN, introText = '', locals = None, InterpClass = None, *args, **kwds)
- addHistory(self, command)
- ask(self, prompt = 'Please enter your response:')
- autoCallTipShow(self, command)
- autoCompleteShow(self, command)
- CanCopy(self)
- CanCut(self)
- CanEdit(self)
- CanPaste(self)
- clear(self)
- clearCommand(self)
- config(self)
- Copy(self)
- CopyWithPrompts(self)
- Cut(self)
- destroy(self)
- execStartupScript(self, startupScript)
- fixLineEndings(self, text)
- getCommand(self, text = None, rstrip = 1)
- getMultilineCommand(self, rstrip = 1)
- historyShow(self, prefix = '')
- insertLineBreak(self)
- lstripPrompt(self, text)
- OnChar(self, event)
- OnHistoryInsert(self, step)
- OnHistoryReplace(self, step)
- OnHistorySearch(self)
- OnHistorySelected(self, event)
- OnKeyDown(self, event)
- OnUpdateUI(self, evt)
- Paste(self)
- PasteAndRun(self)
- pause(self)
- processLine(self)
- prompt(self)
- push(self, command)
- quit(self)
- raw_input(self, prompt = '')
- readline(self)
- redirectStderr(self, redirect = 1)
- redirectStdin(self, redirect = 1)
- redirectStdout(self, redirect = 1)
- replaceFromHistory(self, step, history = None)
- run(self, command, prompt = 1, verbose = 1)
- runfile(self, filename)
- setBuiltinKeywords(self)
- setLocalShell(self)
- setStatusText(self, text)
- setStyles(self, faces)
- showIntro(self, text = '')
- topLevelComplete(self)
- wrap(self, wrap = 1)
- write(self, text)
- writeErr(self, text)
- writeOut(self, text)
- zoom(self, points = 0)
Methods
- __init__(self, parent, id = -Const(1), pos = wxDefaultPosition, size = wxDefaultSize, style = wxCLIP_CHILDREN, introText = '', locals = None, InterpClass = None, *args, **kwds)
Create a PyCrust Shell instance.
- addHistory(self, command)
Add command to the command history.
- ask(self, prompt = 'Please enter your response:')
Get response from the user using a dialog box.
- autoCallTipShow(self, command)
Display argument spec and docstring in a popup bubble thingie.
- autoCompleteShow(self, command)
Display auto-completion popup list.
- CanCopy(self)
Return true if text is selected and can be copied.
- CanCut(self)
Return true if text is selected and can be cut.
- CanEdit(self)
Return true if editing should succeed.
- CanPaste(self)
Return true if a paste should succeed.
- clear(self)
Delete all text from the shell.
- clearCommand(self)
Delete the current, unexecuted command.
- config(self)
Configure shell based on user preferences.
- Copy(self)
Copy selection and place it on the clipboard.
- CopyWithPrompts(self)
Copy selection, including prompts, and place it on the clipboard.
- Cut(self)
Remove selection and place it on the clipboard.
- destroy(self)
- execStartupScript(self, startupScript)
Execute the user's PYTHONSTARTUP script if they have one.
- fixLineEndings(self, text)
Return text with line endings replaced by OS-specific endings.
- getCommand(self, text = None, rstrip = 1)
Extract a command from text which may include a shell prompt.
The command may not necessarily be valid Python syntax.
- getMultilineCommand(self, rstrip = 1)
Extract a multi-line command from the editor.
The command may not necessarily be valid Python syntax.
- historyShow(self, prefix = '')
- insertLineBreak(self)
Insert a new line break.
- lstripPrompt(self, text)
Return text without a leading prompt.
- OnChar(self, event)
Keypress event handler.
Only receives an event if OnKeyDown calls event.Skip() for the corresponding event.
- OnHistoryInsert(self, step)
Insert the previous/next command from the history buffer.
- OnHistoryReplace(self, step)
Replace with the previous/next command from the history buffer.
- OnHistorySearch(self)
Search up the history buffer for the text in front of the cursor.
- OnHistorySelected(self, event)
- OnKeyDown(self, event)
Key down event handler.
- OnUpdateUI(self, evt)
Check for matching braces.
- Paste(self)
Replace selection with clipboard contents.
- PasteAndRun(self)
Replace selection with clipboard contents, run commands.
- pause(self)
Halt execution pending a response from the user.
- processLine(self)
Process the line of text at which the user hit Enter.
- prompt(self)
Display appropriate prompt for the context, either ps1, ps2 or ps3.
If this is a continuation line, autoindent as necessary.
- push(self, command)
Send command to the interpreter for execution.
- quit(self)
Quit the application.
- raw_input(self, prompt = '')
Return string based on user input.
- readline(self)
Replacement for stdin.readline().
- redirectStderr(self, redirect = 1)
If redirect is true then sys.stderr will go to the shell.
- redirectStdin(self, redirect = 1)
If redirect is true then sys.stdin will come from the shell.
- redirectStdout(self, redirect = 1)
If redirect is true then sys.stdout will go to the shell.
- replaceFromHistory(self, step, history = None)
Replace selection with command from the history buffer.
- run(self, command, prompt = 1, verbose = 1)
Execute command within the shell as if it was typed in directly. >>> shell.run('print "this"') >>> print "this" this >>>
- runfile(self, filename)
Execute all commands in file as if they were typed into the shell.
- setBuiltinKeywords(self)
Create pseudo keywords as part of builtins.
This simply sets "close", "exit" and "quit" to a helpful string.
- setLocalShell(self)
Add 'shell' to locals as reference to ShellFacade instance.
- setStatusText(self, text)
Display status information.
- setStyles(self, faces)
Configure font size, typeface and color for lexer.
- showIntro(self, text = '')
Display introductory text in the shell.
- topLevelComplete(self)
- wrap(self, wrap = 1)
Sets whether text is word wrapped.
- write(self, text)
Display text in the shell.
Replace line endings with OS-specific endings.
- writeErr(self, text)
Replacement for stderr.
- writeOut(self, text)
Replacement for stdout.
- zoom(self, points = 0)
Set the zoom level.
This number of points is added to the size of all fonts. It may be positive to magnify or negative to reduce.