eric3.UI.Shell

Module implementing a graphical Python shell.

Classes

Shell Module implementing a graphical Python shell.

Functions

None

Shell

Module implementing a graphical Python shell. A user can enter commands that are executed in the remote Python interpreter.

Derived from

QTextEdit

Methods

Shell Constructor
contentsContextMenuEvent Reimplemented to show our own context menu.
contentsDragEnterEvent Protected method to handle the drag enter event.
contentsDragLeaveEvent Protected method to handle the drag leave event.
contentsDragMoveEvent Protected method to handle the drag move event.
contentsDropEvent Protected method to handle the drop event.
focusNextPrevChild Reimplemented to stop Tab moving to the next window.
getBanner Private method to get the banner for the remote interpreter.
getEndPos Private method to return the line and column of the last character.
handleClear Private slot to handle the 'clear' context menu entry.
handleClientStatement Private method to handle the response from the debugger client.
handlePreferencesChanged Public slot to handle the preferencesChanged signal.
handleReset Private slot to handle the 'reset' context menu entry.
handleResetAndClear Private slot to handle the 'reset and clear' context menu entry.
initialise Private method to get ready for a new remote interpreter.
insertText Private method to insert some text at the current cursor position.
insertTextAtEnd Private method to insert some text at the end of the command line.
insertTextNoEcho Private method to insert some text at the end of the buffer without echoing it.
keyPressEvent Re-implemented to handle the user input a key at a time.
paste Reimplemented slot to handle the paste action.
raw_input Private method to handle raw input.
showCompletions Private method to display the possible completions.
useHistory Private method to display a command from the history.
write Private method to display some text.
writeBanner Private method to write a banner with info from the debug client.

Shell (Constructor)

Shell(dbs, parent=None)

Constructor

dbs
rference to the debug server object
parent
parent widget (QWidget)

Shell.contentsContextMenuEvent

contentsContextMenuEvent(ev)

Reimplemented to show our own context menu.

ev
context menu event (QContextMenuEvent)

Shell.contentsDragEnterEvent

contentsDragEnterEvent(event)

Protected method to handle the drag enter event.

event
the drag enter event (QDragEnterEvent)

Shell.contentsDragLeaveEvent

contentsDragLeaveEvent(event)

Protected method to handle the drag leave event.

event
the drag leave event (QDragLeaveEvent)

Shell.contentsDragMoveEvent

contentsDragMoveEvent(event)

Protected method to handle the drag move event.

event
the drag move event (QDragMoveEvent)

Shell.contentsDropEvent

contentsDropEvent(event)

Protected method to handle the drop event.

event
the drop event (QDropEvent)

Shell.focusNextPrevChild

focusNextPrevChild(next)

Reimplemented to stop Tab moving to the next window. While the user is entering a multi-line command, the movement to the next window by the Tab key being pressed is suppressed.

next
next window
Returns:
flag indicating the movement

Shell.getBanner

getBanner()

Private method to get the banner for the remote interpreter. It requests the Python version and platform running on the debug client side.

Shell.getEndPos

getEndPos()

Private method to return the line and column of the last character.

Returns:
tuple of two values (int, int) giving the line and column

Shell.handleClear

handleClear()

Private slot to handle the 'clear' context menu entry.

Shell.handleClientStatement

handleClientStatement(more)

Private method to handle the response from the debugger client.

more
flag indicating that more user input is required

Shell.handlePreferencesChanged

handlePreferencesChanged()

Public slot to handle the preferencesChanged signal.

Shell.handleReset

handleReset()

Private slot to handle the 'reset' context menu entry.

Shell.handleResetAndClear

handleResetAndClear()

Private slot to handle the 'reset and clear' context menu entry.

Shell.initialise

initialise()

Private method to get ready for a new remote interpreter.

Shell.insertText

insertText(s)

Private method to insert some text at the current cursor position.

s
text to be inserted (string or QString)

Shell.insertTextAtEnd

insertTextAtEnd(s)

Private method to insert some text at the end of the command line.

s
text to be inserted (string or QString)

Shell.insertTextNoEcho

insertTextNoEcho(s)

Private method to insert some text at the end of the buffer without echoing it.

s
text to be inserted (string or QString)

Shell.keyPressEvent

keyPressEvent(ev)

Re-implemented to handle the user input a key at a time.

ev
key event (QKeyPressEvent)

Shell.paste

paste()

Reimplemented slot to handle the paste action.

Shell.raw_input

raw_input(s, echo)

Private method to handle raw input.

echo
Flag indicating echoing of the input (boolean)
s
prompt to be displayed (string or QString)

Shell.showCompletions

showCompletions(completions, text)

Private method to display the possible completions.

Shell.useHistory

useHistory()

Private method to display a command from the history.

Shell.write

write(s)

Private method to display some text.

s
text to be displayed (string or QString)

Shell.writeBanner

writeBanner(version, platform, dbgclient)

Private method to write a banner with info from the debug client.

dbgclient
debug client type used (string)
platform
platform of the remote interpreter (string)
version
Python version string (string)

Up