Krita Source Code Documentation
Loading...
Searching...
No Matches
krita.sceditor.console.PythonConsole Class Reference
+ Inheritance diagram for krita.sceditor.console.PythonConsole:

Public Member Functions

 __init__ (self, parent=None, namespace=None)
 
 clear (self)
 
 push (self, line)
 
- Public Member Functions inherited from krita.sceditor.console.ConsoleWidget
 focusInEvent (self, event)
 
 keyPressEvent (self, event)
 
 mousePressEvent (self, event)
 
- Public Member Functions inherited from krita.sceditor.console.OutputWidget
 __del__ (self)
 
 attach (self)
 
 detach (self)
 
 write (self, s)
 
 writelines (self, lines)
 

Public Attributes

 completer
 
 highlighter
 
 inter
 
 namespace
 
 ps1
 
- Public Attributes inherited from krita.sceditor.console.ConsoleWidget
 history
 
 history_index
 
 ps1
 
 ps2
 
 tab_state
 
- Public Attributes inherited from krita.sceditor.console.OutputWidget
 echo
 

Detailed Description

Definition at line 268 of file console.py.

Constructor & Destructor Documentation

◆ __init__()

krita.sceditor.console.PythonConsole.__init__ ( self,
parent = None,
namespace = None )

Reimplemented from krita.sceditor.console.ConsoleWidget.

Definition at line 270 of file console.py.

270 def __init__(self, parent=None, namespace=None):
271 ConsoleWidget.__init__(self, parent, ps1=">>> ", ps2="... ")
272 self.highlighter = PythonHighlighter(self)
273 self.inter = PythonInterpreter(locals=namespace)
274 self.namespace = self.inter.locals
275 self.completer = PythonCompleter(self.namespace)
276 # print("Python", sys.version)
277 # print("Autocomplete with (Shift+)Tab, insert spaces with Ctrl+Tab")
278 self.push("pass")
279

Member Function Documentation

◆ clear()

◆ push()

krita.sceditor.console.PythonConsole.push ( self,
line )

Reimplemented from krita.sceditor.console.ConsoleWidget.

Definition at line 280 of file console.py.

280 def push(self, line):
281 return self.inter.push(line)
282

References krita.sceditor.console.PythonConsole.inter, krita.sceditor.console.QtQmlConsole.inter, and krita.sceditor.console.PythonConsole.push().

Member Data Documentation

◆ completer

krita.sceditor.console.PythonConsole.completer

Definition at line 275 of file console.py.

◆ highlighter

krita.sceditor.console.PythonConsole.highlighter

Definition at line 272 of file console.py.

◆ inter

krita.sceditor.console.PythonConsole.inter

Definition at line 273 of file console.py.

◆ namespace

krita.sceditor.console.PythonConsole.namespace

Definition at line 274 of file console.py.

◆ ps1

krita.sceditor.console.PythonConsole.ps1

Definition at line 285 of file console.py.


The documentation for this class was generated from the following file: