OpenROAD icon indicating copy to clipboard operation
OpenROAD copied to clipboard

gui: initial support to open GUI with python

Open gadfort opened this issue 2 years ago • 3 comments

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.

gadfort avatar Jan 15 '23 19:01 gadfort

@maliberty it's still a work in progress, but if you have any thoughts let me know

gadfort avatar Jan 15 '23 19:01 gadfort

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 avatar Jan 26 '23 18:01 maliberty

@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.

gadfort avatar Jan 26 '23 19:01 gadfort