[英]How to run python GUI using tkinter from nodered
When i try to run a python file using EXEC from node red, it does work as long as it does not contain any GUI like tkinter. 当我尝试从节点red使用EXEC运行python文件时,只要它不包含tkinter之类的GUI,它就可以工作。 the error on node red side when i try to execute is: _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY
environment variable 当我尝试执行时,节点红色侧的错误是:_tkinter.create(screenName,baseName,className,交互式,wantobjects,useTk,sync,use)_tkinter.TclError:无显示名称和$DISPLAY
环境变量
This is my Python file code 这是我的Python文件代码
from tkinter import *
root = Tk()
l = Label(text="Hello world", font=("Helvetica",20))
l.pack()
add 加
mainloop( )
to the end of the python file and it should display the form. 到python文件的末尾,它应该显示表格。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.