OpenROAD
OpenROAD copied to clipboard
gui: initial support to open GUI with python
This is a draft. It is meant to show a basic implementation of the GUI Python widget.
Adds:
- Python inputs
Changes needed:
- Need to move the stdout/stderr redirects to utl so it's consistent with Tcl and all printout go through the logger.
- Opening and closing of GUI is very closely tied to Tcl at the moment and therefore might not be possible to implement for Python until the restore code is updated
- Reading of gui settings is disabled until that can be fixed as well.
@maliberty it's still a work in progress, but if you have any thoughts let me know
I tried to compile this but get
from /workspaces/mliberty/w3/OpenROAD-flow-scripts/tools/OpenROAD/src/gui/src/pythonCmdInputWidget.cpp:36:
/usr/include/python3.6m/modsupport.h:41:24: error: redundant redeclaration of 'PyObject* _Py_BuildValue_SizeT(const char*, ...)' in same scope [-Werror=redundant-decls]
PyAPI_FUNC(PyObject *) _Py_BuildValue_SizeT(const char *, ...);
^~~~~~~~~~~~~~~~~~~~
/usr/include/python3.6m/modsupport.h:20:41: note: previous declaration of 'PyObject* _Py_BuildValue_SizeT(const char*, ...)'
#define Py_BuildValue _Py_BuildValue_SizeT
^~~~~~~~~~~~~~~~~~~~
/usr/include/python3.6m/modsupport.h:40:24: note: in expansion of macro 'Py_BuildValue'
PyAPI_FUNC(PyObject *) Py_BuildValue(const char *, ...);
^~~~~~~~~~~~~
@maliberty Python generates a lot of warnings, when included, I haven't taken time to figure out why yet. The tasks listed as need to be completed, need to be fixed, I haven't had time to look into it yet.