如何将python调用的结果添加到GUI中,但不使用html中的htmlpy类?

2024-10-02 12:28:55 发布

您现在位置:Python中文网/ 问答频道 /正文

我是python和htmlpy的新手。我有一个python结果,我想在一个特定的类中输出它。目前我正在做以下工作:

           counter += 1
            roads = ""
            for m in suggestedroute:
                if suggestedroute is not 0:
                    output = "If you're taking Route " + counter.__str__() + " try to avoid: "
                    roads += m
                    if counter is not 1:
                        result += ". "+output + roads
                    else:
                        result +=output + roads

            self.app.html = u"<div style='color:red'> "+result+u"<div>"

然而结果是覆盖了整个html页面。如何让它在一个特定类的div中查看


Tags: indivforoutputifishtmlcounter

热门问题