问题
I need to accept info from the user in python's turtle. however the turtle.textinput function only works in versions 3.x and upwards is there an alternative I can use in version 2.X ?
回答1:
This is what textinput
actually does:
import tkSimpleDialog
tkSimpleDialog.askstring('title', 'prompt')
It requires you to have a turtle screen open, of course.
来源:https://stackoverflow.com/questions/20105816/textinput-equivalent-in-python-2-x