36 #pragma GCC diagnostic push
37 #pragma GCC diagnostic ignored "-Wshadow"
38 #include "pybind11/embed.h"
39 #include "pybind11/eval.h"
40 #include "pybind11/functional.h"
41 #include "pybind11/operators.h"
42 #include "pybind11/stl.h"
43 #include "pybind11/stl_bind.h"
44 #pragma GCC diagnostic pop
48 class PythonContextSubscriber;
119 bool interpretBackground(
QObject* caller,
const QString&
input,
bool multiple_expressions =
false);
147 void scheduleClear();
152 void scheduleReset();
171 std::vector<std::tuple<std::string, std::string>> complete(
const QString& text,
bool use_console_context);
178 int checkCompleteStatement(
const QString& text);
197 void updateNetlist();
201 static void initializeContext(py::dict* context);
202 static void initializeScript(py::dict* context);
205 void abortThreadAndWait();
209 void handleThreadFinished();
210 void handleScriptOutput(
const QString& txt);
211 void handleScriptError(
const QString& txt);
213 void handleConsoleInputReceived(
const QString& input);
226 std::string mHistoryFile;
234 PyThreadState* mMainThreadState;
237 void startThread(
const QString& input,
bool singleStatement);
An interactable python console.
bool isThreadRunning() const
Interface for handling python outputs.
PythonGateSelectionReceiver(PythonThread *thread, QObject *parent=nullptr)
void handleGatesPicked(const QSet< u32 > &gats) override
PythonModuleSelectionReceiver(PythonThread *thread, QObject *parent=nullptr)
void handleModulesPicked(const QSet< u32 > &gats) override
QObject * parent() const const
QThread * thread() const const