aboutsummaryrefslogtreecommitdiffstats
path: root/gui/pythontab.cc
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-04-03 16:08:33 +0100
committerDavid Shah <dave@ds0.me>2019-04-03 16:08:33 +0100
commit6fffe24177f9b99d6c332c18e343648cf33d4397 (patch)
treea75edfc7a224b588af0d7d7656915db8246d4506 /gui/pythontab.cc
parenta05593da624d08e6b5c0356448238639479dd250 (diff)
downloadnextpnr-6fffe24177f9b99d6c332c18e343648cf33d4397.tar.gz
nextpnr-6fffe24177f9b99d6c332c18e343648cf33d4397.tar.bz2
nextpnr-6fffe24177f9b99d6c332c18e343648cf33d4397.zip
generic: GUI Python bindings
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'gui/pythontab.cc')
-rw-r--r--gui/pythontab.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gui/pythontab.cc b/gui/pythontab.cc
index 827f1907..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();