raw_input into Tkinter ?
mccredie at gmail.com
Tue Jul 1 00:49:34 CEST 2008
On Jun 30, 9:55 am, jamitwi... at gmail.com wrote:
> Is there any way to type into a Tkinter frame window?
> I want to use raw_input() within a Tkinter frame.
`raw_input(prompt)` just calls `sys.stdout.write(prompt)` and returns
`sys.stdin.readline()`. So, you can just create file-like objects to
replace stdout and stdin that are aware of your Tkinter gui.
Alternatively, you could just replace __builtins__.raw_input with your
Actual implementation left as an exercise for the user.
More information about the Python-list