diff options
Diffstat (limited to 'gui/pythontab.cc')
-rw-r--r-- | gui/pythontab.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/pythontab.cc b/gui/pythontab.cc index 80d731e9..c83f1ece 100644 --- a/gui/pythontab.cc +++ b/gui/pythontab.cc @@ -96,9 +96,10 @@ void PythonTab::newContext(Context *ctx) console->clear();
pyinterpreter_preinit();
- init_python("nextpnr", !initialized);
+ init_python("nextpnr", true);
pyinterpreter_initialize();
pyinterpreter_aquire();
+ init_python("nextpnr", false);
python_export_global("ctx", ctx);
pyinterpreter_release();
@@ -114,4 +115,6 @@ void PythonTab::clearBuffer() { console->clear(); } void PythonTab::info(std::string str) { console->displayString(str.c_str()); }
+void PythonTab::execute_python(std::string filename) { console->execute_python(filename); }
+
NEXTPNR_NAMESPACE_END
|