Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/python-3.x/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x 蟒蛇3海龟如何等待按键_Python 3.x_Turtle Graphics - Fatal编程技术网

Python 3.x 蟒蛇3海龟如何等待按键

Python 3.x 蟒蛇3海龟如何等待按键,python-3.x,turtle-graphics,Python 3.x,Turtle Graphics,我有一个用蟒蛇3编写的简单游戏 游戏结束后,我想显示消息“继续?”?(是/否),并等待用户按下键盘上的按钮。您知道如何实现等待功能吗?查看textinput方法: def textinput(self, title, prompt): """Pop up a dialog window for input of a string. Arguments: title is the title of the dialog window, prompt is a text m

我有一个用蟒蛇3编写的简单游戏
游戏结束后,我想显示消息“继续?”?(是/否),并等待用户按下键盘上的按钮。您知道如何实现等待功能吗?

查看
textinput
方法:

def textinput(self, title, prompt):
    """Pop up a dialog window for input of a string.

    Arguments: title is the title of the dialog window,
    prompt is a text mostly describing what information to input.

    Return the string input
    If the dialog is canceled, return None.

    Example (for a TurtleScreen instance named screen):
    >>> screen.textinput("NIM", "Name of first player:")

    """
    return simpledialog.askstring(title, prompt)

不,我不知道yetAlready测试此功能。这不是我想要的。我通过在游戏中添加新场景解决了这个问题。但是谢谢你的回答这是什么“simpledialog”?它似乎不与海龟模块一起提供。