Теперь, когда я могу запустить Orange в сценарии python:
...
# transform a pandas dataframe to an orange table
from Orange.data.pandas_compat import table_from_frame
ot1 = table_from_frame(data)
...
import sys
from Orange.canvas import __main__ as om
sys.exit(om.main(["-l 1","--no-splash","--no-welcome"]))
Вопрос теперь как преобразовать оранжевую таблицу ot1 в оранжевую, поместить ее в виджет и поместить на холст.
И я изменяю исходный код orangecanvas / main.py, чтобы обойти проблему stdout & stderr, эта ошибка исправлено в Python3 .7.5:
...
def fix_win_pythonw_std_stream():
"""
On windows when running without a console (using pythonw.exe without I/O
redirection) the std[err|out] file descriptors are invalid
(`http://bugs.python.org/issue706263`_). We `fix` this by setting the
stdout/stderr to `os.devnull`.
"""
if sys.platform == "win32" and \
os.path.basename(sys.executable) == "pythonw.exe":
# if sys.stdout is None or sys.stdout.fileno() < 0:
# sys.stdout = open(os.devnull, "w")
# if sys.stderr is None or sys.stderr.fileno() < 0:
# sys.stderr = open(os.devnull, "w")
# This bug is fixed in Python3.7.5
print("win32 pythonw.exe")
...