eric7.MicroPython.MicroPythonReplWidget

Module implementing the MicroPython REPL widget.

Global Attributes

AnsiColorSchemes

Classes

MicroPythonReplEdit Class implementing the REPL edit pane.
MicroPythonReplWidget Class implementing the MicroPython REPL widget.

Functions

None


MicroPythonReplEdit

Class implementing the REPL edit pane.

Signals

osdInfo(str)
emitted when some OSD data was received from the device

Derived from

QTextEdit

Class Attributes

None

Class Methods

None

Methods

MicroPythonReplEdit Constructor
__clear Private slot to clear the REPL pane.
__paste Private slot to perform a paste operation.
__setCharFormat Private method setting the current text format of the REPL pane based on the passed ANSI codes.
__showContextMenu Private slot to show the REPL context menu.
doZoom Public slot to zoom in or out.
handlePreferencesChanged Public slot to handle a change in preferences.
keyPressEvent Protected method to handle key press events.
mouseReleaseEvent Protected method to handle mouse release events.
processData Public slot to process the data received from the device.
setInterface Public method to set the reference to the device interface object.

Static Methods

None

MicroPythonReplEdit (Constructor)

MicroPythonReplEdit(parent=None)

Constructor

parent (QWidget (optional))
reference to the parent widget (defaults to None)

MicroPythonReplEdit.__clear

__clear()

Private slot to clear the REPL pane.

MicroPythonReplEdit.__paste

__paste(mode=QClipboard.Mode.Clipboard)

Private slot to perform a paste operation.

mode (QClipboard.Mode (optional))
paste mode (defaults to QClipboard.Mode.Clipboard)

MicroPythonReplEdit.__setCharFormat

__setCharFormat(formatCodes, textCursor)

Private method setting the current text format of the REPL pane based on the passed ANSI codes.

Following codes are used:

formatCodes (list of str)
list of format codes
textCursor (QTextCursor)
reference to the text cursor

MicroPythonReplEdit.__showContextMenu

__showContextMenu(pos)

Private slot to show the REPL context menu.

pos (QPoint)
position to show the menu at

MicroPythonReplEdit.doZoom

doZoom(value)

Public slot to zoom in or out.

value (int)
zoom value

MicroPythonReplEdit.handlePreferencesChanged

handlePreferencesChanged()

Public slot to handle a change in preferences.

MicroPythonReplEdit.keyPressEvent

keyPressEvent(evt)

Protected method to handle key press events.

evt (QKeyEvent)
reference to the key press event

MicroPythonReplEdit.mouseReleaseEvent

mouseReleaseEvent(evt)

Protected method to handle mouse release events.

evt (QMouseEvent)
reference to the event object

MicroPythonReplEdit.processData

processData(data)

Public slot to process the data received from the device.

data (bytes)
data received from the device

MicroPythonReplEdit.setInterface

setInterface(deviceInterface)

Public method to set the reference to the device interface object.

deviceInterface (MicroPythonDeviceInterface)
reference to the device interface object
Up


MicroPythonReplWidget

Class implementing the MicroPython REPL widget.

Derived from

QWidget

Class Attributes

ZoomMax
ZoomMin

Class Methods

None

Methods

MicroPythonReplWidget Constructor
clearOSD Public slot to clear the OSD info.
replEdit Public method to get a reference to the REPL edit.
setOSDInfo Public slot to set the OSD information.

Static Methods

None

MicroPythonReplWidget (Constructor)

MicroPythonReplWidget(parent=None)

Constructor

parent (QWidget (optional))
reference to the parent widget (defaults to None)

MicroPythonReplWidget.clearOSD

clearOSD()

Public slot to clear the OSD info.

MicroPythonReplWidget.replEdit

replEdit()

Public method to get a reference to the REPL edit.

Return:
reference to the REPL edit
Return Type:
MicroPythonReplEdit

MicroPythonReplWidget.setOSDInfo

setOSDInfo(infoStr)

Public slot to set the OSD information.

infoStr (str)
string to be shown
Up