itom
Loading...
Searching...
No Matches
pythonEngine.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2024, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom.
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 itom is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17 General Public Licence for more details.
18
19 You should have received a copy of the GNU Library General Public License
20 along with itom. If not, see <http://www.gnu.org/licenses/>.
21*********************************************************************** */
22
23#pragma once
24
25/*if you add any include to this file you will DIE an immediate, horrible, painful death*/
26
27#include <string>
28#include <exception>
29//#ifndef Q_MOC_RUN
30// #define PY_ARRAY_UNIQUE_SYMBOL itom_ARRAY_API
31// #define NO_IMPORT_ARRAY
32//#endif
33
34#include "pythonJedi.h"
35
36#ifndef Q_MOC_RUN
37 #include "pythonWrapper.h"
38
39 //python
40 // see http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=7f3f750596a105d48ea84ebfe1b1c4ca03e0bab3
41 #if (defined _DEBUG) && (defined WIN32)
42 // see https://github.com/microsoft/onnxruntime/issues/9735#issuecomment-970718821
43 #include <corecrt.h>
44 #undef _DEBUG
45 #if (PY_VERSION_HEX < 0x03070000)
46 #include "node.h"
47 #endif
48 #define _DEBUG
49 #else
50 #if (PY_VERSION_HEX < 0x03070000)
51 #include "node.h"
52 #endif
53 #endif
54
55#endif // Q_MOC_RUN
56
57/* includes */
58
59#include "pythonItom.h"
60#include "pythonProxy.h"
61#include "pythonStream.h"
62#include "pythonCommon.h"
63#include "pythonJediRunner.h"
64
65#include "../models/breakPointModel.h"
66#include "../../common/sharedStructuresQt.h"
67#include "../../common/addInInterface.h"
68#include "../../common/functionCancellationAndObserver.h"
69#include "../codeEditor/codeCheckerItem.h"
70#include "../global.h"
71
72#include "pythonWorkspace.h"
73
74#include <qstringlist.h>
75#include <qqueue.h>
76#include <qset.h>
77#include <qpointer.h>
78#include <qatomic.h>
79#include <qelapsedtimer.h>
80#include <qtimer.h>
81#include <qsettings.h>
82
83/* definition and macros */
84
85/* global variables (avoid) */
86
87/* content */
88
89class QDesktopWidget;
90class QTimer;
91
92namespace ito
93{
94
96{
97public:
99 FuncWeakRef(PythonProxy::PyProxy *proxyObject, PyObject *argTuple = NULL);
100 FuncWeakRef(const FuncWeakRef &rhs);
101 ~FuncWeakRef();
102 FuncWeakRef& operator =(FuncWeakRef rhs);
103
104 PythonProxy::PyProxy* getProxyObject() const { return m_proxyObject; } //borrowed reference
105 PyObject* getArguments() const { return m_argument; } //borrowed reference
106 bool isValid() const { return (m_proxyObject != NULL); }
107
108 void setHandle(const size_t &handle);
109 size_t getHandle() const { return m_handle; }
110private:
111 PythonProxy::PyProxy *m_proxyObject;
112 PyObject *m_argument;
113 size_t m_handle;
114};
115
116
117class PythonEngine : public QObject
118{
119 Q_OBJECT
120
121public:
122 PythonEngine(); //constructor
123 ~PythonEngine(); //destructor
124
125 Q_INVOKABLE void pythonSetup(ito::RetVal *retValue, QSharedPointer<QVariantMap> infoMessages); //setup
126
127 Q_INVOKABLE ito::RetVal scanAndRunAutostartFolder(QString currentDirAfterScan = QString() );
128 Q_INVOKABLE ito::RetVal pythonShutdown(ItomSharedSemaphore *aimWait = NULL); //shutdown
129 Q_INVOKABLE ito::RetVal stringEncodingChanged();
130
131 inline ito::BreakPointModel *getBreakPointModel() const { return m_bpModel; }
132 inline bool isPythonBusy() const { return m_pythonState != ito::pyStateIdle; }
133 inline bool isPythonDebugging() const { return (m_pythonState == ito::pyStateDebuggingWaitingButBusy || m_pythonState == ito::pyStateDebugging || m_pythonState == ito::pyStateDebuggingWaiting); }
134 inline bool isPythonDebuggingAndWaiting() const { return m_pythonState == ito::pyStateDebuggingWaiting; }
135 inline bool execInternalCodeByDebugger() const { return m_executeInternalPythonCodeInDebugMode; }
136 inline void setExecInternalCodeByDebugger(bool value) { m_executeInternalPythonCodeInDebugMode = value; }
137 void printPythonErrorWithoutTraceback();
138 void pythonDebugFunction(PyObject *callable, PyObject *argTuple, bool gilExternal = false);
139 void pythonRunFunction(PyObject *callable, PyObject *argTuple, bool gilExternal = false);
140 inline PyObject *getGlobalDictionary() const { return m_pGlobalDictionary; }
141 inline bool pySyntaxCheckAvailable() const { return (m_pyModCodeChecker != NULL); }
142 bool tryToLoadJediIfNotYetDone(); //returns true, if Jedi is already loaded or could be loaded; else false
143
145 /* From Python 3.7 on, the AST is parsed to check for the major blocks. Then the encoding is always empty.
146 Before, PyParser_SimpleParseString is used with the old Python compiler and an optional encoidng can be detected.
147
148 This methods acquires the GIL, therefore it must directly called from a non-python thread.
149 */
150 QList<int> parseAndSplitCommandInMainComponents(const QString &str, QByteArray &encoding) const;
151
152 QString getPythonExecutable() const { return m_pythonExecutable; }
153 Qt::HANDLE getPythonThreadId() const { return m_pythonThreadId; }
154
157
160
163
166
168 void enqueueJediRenameRequest(const ito::JediRenameRequest& request);
169
170 static bool isInterruptQueued();
171 static const PythonEngine *getInstance();
172
174 void addFunctionCancellationAndObserver(QWeakPointer<ito::FunctionCancellationAndObserver> observer);
175
177 void removeFunctionCancellationAndObserver(ito::FunctionCancellationAndObserver* observer = NULL);
178
179protected:
180 ito::RetVal runPyFile(const QString &pythonFileName); // run file pythonFileName
181 ito::RetVal debugFile(const QString &pythonFileName); // debug file pythonFileName
182 ito::RetVal runString(const QString &command); // run string command
183 ito::RetVal debugString(const QString &command); // debug string command
184 ito::RetVal debugFunction(PyObject *callable, PyObject *argTuple, bool gilExternal = false);
185 ito::RetVal runFunction(PyObject *callable, PyObject *argTuple, bool gilExternal = false);
186
187 ito::RetVal modifyTracebackDepth(int NrOfLevelsToPopAtFront = -1, bool showTraceback = true);
188
189 PyObject* setPyErrFromException(const std::exception &exc);
190 void startupInitPythonWorkspaceUpdateQueue();
191 ito::RetVal startupInitPythonHelpStreamConsumer(QSettings& settings);
193 ito::RetVal startupLoadAndImportAdditionalModules(QSharedPointer<QVariantMap>& infoMessages);
194 void connectNotify(const QMetaMethod &signal);
195
196 enum DebuggerErrorCode
197 {
198 DbgErrorNo = 0,
199 DbgErrorInvalidBp = 1, // the breakpoint candidate could not be set and will be deleted
200 DbgErrorOther = 2 // any other error
201 };
202
203private:
204 enum DictUpdateFlag
205 {
206 DictUpdate,
207 DictReset,
208 DictNoAction
209 };
210
212 {
214 actionGlobal(DictNoAction),
215 actionLocal(DictNoAction),
217 timerElapsedSinceLastUpdate(nullptr)
218 {
219 }
220
221 void reset()
222 {
223 actionGlobal = DictNoAction;
224 actionLocal = DictNoAction;
225 timerElapsedSinceLastUpdate->stop();
227 }
228
232
235 QTimer *timerElapsedSinceLastUpdate;
236
237 DictUpdateFlag actionGlobal;
238 DictUpdateFlag actionLocal;
239 };
240
242
245 inline PyObject *getLocalDictionary() { return m_pLocalDictionary; }
246
247 PyObject *getPyObjectByFullName(bool globalNotLocal, const QStringList &fullNameSplittedByDelimiter, QString *validVariableName = NULL); //Python GIL must be locked when calling this function!
248 PyObject *getPyObjectByFullName(bool globalNotLocal, const QString &fullName, QString *validVariableName = NULL); //Python GIL must be locked when calling this function!
249
250 void setGlobalDictionary(PyObject* mainDict = NULL);
251 void setLocalDictionary(PyObject* localDict);
252
253 void updatePythonWorkspaces(DictUpdateFlag globalDict, DictUpdateFlag localDict, bool lockGIL, bool delayExecution = false);
254
255 ito::RetVal pickleDictionary(PyObject *dict, const QString &filename);
256 ito::RetVal unpickleDictionary(PyObject *destinationDict, const QString &filename, bool overwrite, bool replaceKeyByValidPyIdentifier);
257
259 void pythonRunString(QString cmd);
260
262 void pythonDebugString(QString cmd);
263
264 QString modifyCommandStringInCaseOfSpecialComments(const QString& command);
265
266 //methods for debugging
267 void enqueueDbgCmd(ito::tPythonDbgCmd dbgCmd);
268 ito::tPythonDbgCmd dequeueDbgCmd();
269 bool DbgCommandsAvailable();
270 void clearDbgCmdLoop();
271
272 ito::RetVal pythonStateTransition(tPythonTransitions transition, bool immediate = true);
273
274 //methods for breakpoint
275 ito::RetVal pythonAddBreakpoint(const BreakPointItem &breakpoint, int &pyBpNumber);
276 ito::RetVal pythonEditBreakpoint(const int pyBpNumber, const BreakPointItem &newBreakpoint);
277 ito::RetVal pythonDeleteBreakpoint(const int pyBpNumber);
279
280 ito::RetVal autoReloaderCheck();
281
282 static int queuedInterrupt(void *arg);
283
284 PyObject* getAndCheckIdentifier(const QString &identifier, ito::RetVal &retval) const;
285
286 QVariantMap checkCodeCheckerRequirements();
287 ito::RetVal handlePythonSysExit();
288
296
297 //member variables
298 bool m_started;
299 CodeCheckerOptions m_codeCheckerOptions;
300
301 QMutex m_dbgCmdMutex;
302 QMutex m_pythonStateChangeMutex;
303 QQueue<ito::tPythonDbgCmd> m_debugCommandQueue;
304
305 ito::tPythonState m_pythonState;
306
307 ito::BreakPointModel *m_bpModel;
308
309 PyObject* m_mainModule;
313 PyObject *m_itomDbgModule;
315 PyObject *m_itomModule;
316 PyObject *m_itomFunctions;
317 PyObject *m_pyModGC;
318 PyObject *m_pyModCodeChecker;
321
322 QSharedPointer<PythonJediRunner> m_jediRunner;
323 Qt::HANDLE m_pythonThreadId;
324 PyObject *m_dictUnicode;
325 PyObject *m_slotsUnicode;
326
327
328 QSet<ito::PyWorkspaceContainer*> m_mainWorkspaceContainer;
329 QSet<ito::PyWorkspaceContainer*> m_localWorkspaceContainer;
330 QHash<size_t, FuncWeakRef> m_pyFuncWeakRefHashes;
331 size_t m_pyFuncWeakRefAutoInc;
332
334
336
337
340
342 QString m_includeItomImportString;
343
344 wchar_t *m_pUserDefinedPythonHome;
345
346 QList<QWeakPointer<ito::FunctionCancellationAndObserver> > m_activeFunctionCancellations;
347
349 {
350 PyObject *modAutoReload;
351 PyObject *classAutoReload;
352 bool enabled;
353 bool checkFileExec;
354 bool checkStringExec;
355 bool checkFctExec;
356 };
357
358 AutoReload m_autoReload;
359
361
363 static PyMethodDef PyMethodItomDbg[];
364 static PyModuleDef PyModuleItomDbg;
365 static PyObject* PyInitItomDbg(void);
366 static PyObject* PyDbgCommandLoop(PyObject *pSelf, PyObject *pArgs);
367 static PyObject* PyDbgClearBreakpoint(PyObject* pSelf, PyObject* pArgs);
368
369 //other static members
370 static QMutex instancePtrProtection;
371 static QString fctHashPrefix;
372 static PythonEngine* instance;
373
374 QAtomicInt m_interruptCounter; //protects that a python interrupt can only be placed if there is no interrupt event queued yet.
375
376 // friend class
377 friend class ito::PythonItom;
378 friend class ito::PyStream;
379
380signals:
381 void pythonDebugPositionChanged(QString filename, int lineNo);
382 void pythonStateChanged(tPythonTransitions pyTransition, bool immediate);
383 void pythonModifyLocalDict(PyObject* localDict, ItomSharedSemaphore* semaphore);
384 void pythonModifyGlobalDict(PyObject* globalDict, ItomSharedSemaphore* semaphore);
385 void pythonCurrentDirChanged();
386 void updateCallStack(QStringList filenames, IntList lines, QStringList methods);
387 void deleteCallStack();
388
389 void pythonSetCursor(const Qt::CursorShape cursor);
390 void pythonResetCursor();
391 void pythonAutoReloadChanged(bool enabled, bool checkFile, bool checkCmd, bool checkFct);
392 void clearCommandLine();
393 void interruptCommandInput();
394 void startInputCommandLine(QSharedPointer<QByteArray> buffer, ItomSharedSemaphore *semaphore);
395
396private slots:
397 void processPythonWorkspaceUpdateQueue();
398
399public slots:
400 void pythonExecStringFromCommandLine(QString cmd);
401 void pythonRunFile(QString filename);
402 void pythonDebugFile(QString filename);
403 void pythonRunStringOrFunction(QString cmdOrFctHash);
404 void pythonDebugStringOrFunction(QString cmdOrFctHash);
405 void pythonInterruptExecutionThreadSafe(bool *interruptActuatorsAndTimers = NULL); //if interruptActuatorsAndTimers is NULL, the itom settings will be read, else this boolean variable decides
406 void pythonDebugCommand(tPythonDbgCmd cmd);
407
408 void setAutoReloader(bool enabled, bool checkFile, bool checkCmd, bool checkFct);
409
410 // Settings are necessary for automatic itom inclusion and syntax check
411 void readSettings();
412 void propertiesChanged();
413
414 void pythonCodeCheck(const QString &code, const QString &filename, bool fileSaved, QPointer<QObject> sender, QByteArray callbackFctName);
415
417 void breakPointAdded(BreakPointItem bp, int row);
418 void breakPointDeleted(QString filename, int lineNo, int pyBpNumber);
419 void breakPointChanged(BreakPointItem oldBp, BreakPointItem newBp);
420 ito::RetVal setupBreakPointDebugConnections();
421 ito::RetVal shutdownBreakPointDebugConnections();
422
423 bool renameVariable(bool globalNotLocal, const QString &oldFullItemName, QString newKey, ItomSharedSemaphore *semaphore = NULL);
424 bool deleteVariable(bool globalNotLocal, const QStringList &fullItemNames);
425 ito::RetVal pickleVariables(bool globalNotLocal, QString filename, QStringList varNames, ItomSharedSemaphore *semaphore = NULL);
426 ito::RetVal pickleSingleParam(QString filename, QSharedPointer<ito::Param> value, const QString &valueName, ItomSharedSemaphore *semaphore = NULL);
427 ito::RetVal unpickleVariables(bool globalNotLocal, QString filename, QString packedVarName, ItomSharedSemaphore *semaphore = NULL);
428 ito::RetVal saveMatlabVariables(bool globalNotLocal, QString filename, QStringList varNames, ItomSharedSemaphore *semaphore = NULL);
429 ito::RetVal saveMatlabSingleParam(QString filename, QSharedPointer<ito::Param> value, const QString &valueName, ItomSharedSemaphore *semaphore = NULL);
430 ito::RetVal loadMatlabVariables(bool globalNotLocal, QString filename, QString packedVarName, ItomSharedSemaphore *semaphore = NULL);
431 ito::RetVal registerAddInInstance(QString varname, ito::AddInBase *instance, ItomSharedSemaphore *semaphore = NULL);
432 ito::RetVal getSysModules(QSharedPointer<QStringList> modNames, QSharedPointer<QStringList> modFilenames, QSharedPointer<IntList> modTypes, ItomSharedSemaphore *semaphore = NULL);
433 ito::RetVal reloadSysModules(QSharedPointer<QStringList> modNames, ItomSharedSemaphore *semaphore = NULL);
434
435 void registerWorkspaceContainer(PyWorkspaceContainer *container, bool registerNotUnregister, bool globalNotLocal);
436 void workspaceGetChildNode(PyWorkspaceContainer *container, QString fullNameParentItem);
437 void workspaceGetValueInformation(PyWorkspaceContainer *container, const QString &fullItemName, QSharedPointer<QString> extendedValue, ItomSharedSemaphore *semaphore = NULL);
438
439 ito::RetVal checkVarnamesInWorkspace(bool globalNotLocal, const QStringList &names, QSharedPointer<IntList> existing, ItomSharedSemaphore *semaphore = NULL);
440 ito::RetVal putParamsToWorkspace(bool globalNotLocal, const QStringList &names, const QVector<SharedParamBasePointer > &values, ItomSharedSemaphore *semaphore = NULL);
441 ito::RetVal getVarnamesListInWorkspace(bool globalNotLocal, const QString &find, QSharedPointer<QStringList> varnameList, ItomSharedSemaphore *semaphore /*= NULL*/);
442 ito::RetVal getParamsFromWorkspace(bool globalNotLocal, const QStringList &names, QVector<int> paramBaseTypes, QSharedPointer<SharedParamBasePointerVector > values, ItomSharedSemaphore *semaphore = NULL);
443
444 ito::RetVal pythonGetClearAllValues();
445 ito::RetVal pythonClearAll();
446
447};
448
449} //end namespace ito
semaphore which can be used for asynchronous thread communication. By using this class it is possible...
Definition sharedStructuresQt.h:58
Base class for all plugins.
Definition addInInterface.h:386
model for management of all breakpoints. This model will be displayed by a viewer-widget in the main ...
Definition breakPointModel.h:69
Definition pythonEngine.h:96
This class can be passed to a long running method (e.g. as QSharedPointer instance) for two reasons:
Definition functionCancellationAndObserver.h:57
static class which implements a new python type. The members cout and cerr of the python system are s...
Definition pythonStream.h:38
Definition pythonWorkspace.h:92
CodeCheckerMode
< mode that can be chosen for the code checker
Definition pythonCommon.h:75
CodeCheckerMessageType
Definition pythonCommon.h:84
Definition pythonEngine.h:118
ito::RetVal pythonStateTransition(tPythonTransitions transition, bool immediate=true)
< signals a state change of the Python interpreter
Definition pythonEngine.cpp:3606
QHash< size_t, FuncWeakRef > m_pyFuncWeakRefHashes
hash table containing weak reference to callable python methods or functions and as second,...
Definition pythonEngine.h:330
void enqueueJediCompletionRequest(const ito::JediCompletionRequest &request)
thread-safe method (can be called from any thread) to enqueue a jedi calltip request
Definition pythonEngine.cpp:2542
PyObject * m_itomDbgInstance
debugger instance
Definition pythonEngine.h:314
void submitAllBreakpointsToDebugger()
< submits all breakpoints to the debugger. This should be called before code is debugged.
Definition pythonEngine.cpp:2758
bool m_pyModCodeCheckerHasPyFlakes
true if m_pyModCodeChecker could be loaded and pretends to have the syntax check feature (package: py...
Definition pythonEngine.h:319
PyObject * getAndCheckIdentifier(const QString &identifier, ito::RetVal &retval) const
get the unicode object from identifier and checks if it is a valid python identifier (variable name)....
Definition pythonEngine.cpp:6388
void enqueueGoToAssignmentRequest(const ito::JediAssignmentRequest &request)
thread-safe method (can be called from any thread) to enqueue a jedi get-help request
Definition pythonEngine.cpp:2560
static PythonEngine * getInstanceInternal()
Definition pythonEngine.cpp:162
ito::RetVal debugFile(const QString &pythonFileName)
Definition pythonEngine.cpp:2263
bool m_executeInternalPythonCodeInDebugMode
if true, button events, user interface connections to python methods... will be executed by debugger
Definition pythonEngine.h:335
ito::RetVal pythonAddBreakpoint(const BreakPointItem &breakpoint, int &pyBpNumber)
Definition pythonEngine.cpp:2807
void enqueueJediGetHelpRequest(const ito::JediGetHelpRequest &request)
thread-safe method (can be called from any thread) to enqueue a jedi rename request
Definition pythonEngine.cpp:2533
void addFunctionCancellationAndObserver(QWeakPointer< ito::FunctionCancellationAndObserver > observer)
will remove the given observer from the list of function cancellations and observers....
Definition pythonEngine.cpp:4603
PyObject * m_itomDbgModule
debugger module
Definition pythonEngine.h:313
QList< int > parseAndSplitCommandInMainComponents(const QString &str, QByteArray &encoding) const
< parses a (multiline) python string and returns the line numbers of the start of every major block.
Definition pythonEngine.cpp:1586
PyObject * m_pLocalDictionary
local dictionary of python [borrowed], usually NULL unless if debugger is in "interaction-mode",...
Definition pythonEngine.h:311
PyObject * m_mainModule
main module of python (builtin) [borrowed]
Definition pythonEngine.h:309
Qt::HANDLE getPythonThreadId() const
thread-safe method (can be called from any thread) to enqueue a jedi completion request
Definition pythonEngine.h:153
PyObject * getGlobalDictionary() const
Definition pythonEngine.h:140
PyObject * m_itomModule
itom module [new ref]
Definition pythonEngine.h:315
ito::RetVal startupAddModulesToItomModule()
Definition pythonEngine.cpp:942
ito::RetVal debugFunction(PyObject *callable, PyObject *argTuple, bool gilExternal=false)
Definition pythonEngine.cpp:2151
PyObject * m_itomFunctions
ito functions [additional python methods] [new ref]
Definition pythonEngine.h:316
void setAutoReloader(bool enabled, bool checkFile, bool checkCmd, bool checkFct)
Definition pythonEngine.cpp:1691
static const PythonEngine * getInstance()
add a new function cancellation / observer. Each valid observer on the list will be requested to be c...
Definition pythonEngine.cpp:154
static PyObject * PyDbgCommandLoop(PyObject *pSelf, PyObject *pArgs)
Definition pythonEngine.cpp:4736
ito::RetVal startupLoadAndImportAdditionalModules(QSharedPointer< QVariantMap > &infoMessages)
Definition pythonEngine.cpp:784
PythonWorkspaceUpdateQueue m_pyWorkspaceUpdateQueue
debugger functionality
Definition pythonEngine.h:360
void pythonRunString(QString cmd)
debugs the given Python string command
Definition pythonEngine.cpp:3190
ito::RetVal saveMatlabSingleParam(QString filename, QSharedPointer< ito::Param > value, const QString &valueName, ItomSharedSemaphore *semaphore=NULL)
Definition pythonEngine.cpp:5504
ito::RetVal debugString(const QString &command)
Definition pythonEngine.cpp:2375
ito::RetVal pickleSingleParam(QString filename, QSharedPointer< ito::Param > value, const QString &valueName, ItomSharedSemaphore *semaphore=NULL)
Definition pythonEngine.cpp:6670
void enqueueJediCalltipRequest(const ito::JediCalltipRequest &request)
thread-safe method (can be called from any thread) to enqueue a jedi calltip request
Definition pythonEngine.cpp:2524
PyObject * m_pGlobalDictionary
global dictionary of python [borrowed], equals to m_pMainDictionary unless if debugger is in "interac...
Definition pythonEngine.h:312
bool m_includeItomImportBeforeCodeAnalysis
string that is prepended to each script before syntax check (if m_includeItomImportBeforeCodeAnalysis...
Definition pythonEngine.h:339
ito::RetVal checkVarnamesInWorkspace(bool globalNotLocal, const QStringList &names, QSharedPointer< IntList > existing, ItomSharedSemaphore *semaphore=NULL)
Definition pythonEngine.cpp:5773
ito::RetVal unpickleDictionary(PyObject *destinationDict, const QString &filename, bool overwrite, bool replaceKeyByValidPyIdentifier)
runs the given Python string command
Definition pythonEngine.cpp:7014
void pythonCodeCheck(const QString &code, const QString &filename, bool fileSaved, QPointer< QObject > sender, QByteArray callbackFctName)
these slots are only connected if python in debug-mode; while waiting these slots will be treated due...
Definition pythonEngine.cpp:2581
Q_INVOKABLE void pythonSetup(ito::RetVal *retValue, QSharedPointer< QVariantMap > infoMessages)
Definition pythonEngine.cpp:314
QString m_pythonExecutable
absolute path to the python executable
Definition pythonEngine.h:333
bool m_pyModCodeCheckerHasFlake8
true if m_pyModCodeChecker could be loaded and pretends to have the syntax and style check feature (p...
Definition pythonEngine.h:320
PyObject * m_pMainDictionary
main dictionary of python [borrowed]
Definition pythonEngine.h:310
Definition pythonItom.h:45
Class for managing status values (like errors or warning)
Definition retVal.h:54
Definition apiFunctionsGraph.cpp:40
DataObject arg(const DataObject &dObj)
Definition dataobj.cpp:12926
item of BreakPointModel
Definition breakPointModel.h:43
Definition pythonJedi.h:103
Definition pythonJedi.h:36
Definition pythonJedi.h:70
Definition pythonJedi.h:130
Definition pythonJedi.h:154
Definition pythonEngine.h:349
Definition pythonEngine.h:290
PythonCommon::CodeCheckerMessageType minVisibleMessageTypeLevel
minimum message class that should be shown in editor margin
Definition pythonEngine.h:293
QByteArray furtherPropertiesJson
these parameters are parsed from a QVariantMap to json and will be passed to itomSyntaxCheck....
Definition pythonEngine.h:294
QTimer * timerElapsedSinceFirstAction
Definition pythonEngine.h:231
void reset()
Definition pythonEngine.h:221
Definition pythonProxy.h:41