Python重启程序无法正常工作

时间:2017-11-07 16:53:22

标签: python python-2.7 restart

在python 2.7中使用tkinter创建GUI时,我希望程序重启。这似乎很简单,经过短暂的研究后,我发现了以下代码,这似乎有用:

def check_password(self, raw_password):
    """
    Return a boolean of whether the raw_password was correct. Handles
    hashing formats behind the scenes.
    """
    def setter(raw_password):
        self.set_password(raw_password)
        # Password hash upgrades shouldn't be considered password changes.
        self._password = None
        self.save(update_fields=["password"])
    return check_password(raw_password, self.password, setter)
然而,它刚刚停止工作,因为程序第一次完美运行,但是当重新启动它时说:

=============================== RESTART:Shell ============= ================= >>>

没有任何反应。如果有人知道为什么我会非常感激,任何解决这个问题的方法都将是一个巨大的帮助。

更新: 我尝试在命令行中运行它,然而,同样的问题发生但是这次它说,"没有这样的文件或目录"重新启动时,有什么想法吗?

0 个答案:

没有答案