Skip to content Skip to sidebar Skip to footer

Textinput() Equivalent In Python 2.x

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.

Solution 1:

This is what textinput actually does:

import tkSimpleDialog
tkSimpleDialog.askstring('title', 'prompt')

It requires you to have a turtle screen open, of course.

Post a Comment for "Textinput() Equivalent In Python 2.x"