simple script - Tkinter question.

J

jkuo22

Hi everyone,

Here is my simple Tkinter script:

## start of entry.py
from Tkinter import *
root=Tk()
e1=Entry(root, width=16)
e1.pack()
e2=Entry(root, width=16)
e2.pack()
mainloop()
## end

First, it works on win2k. When I run it as 'python entry.py' on linux,
both 'e1' and 'e2' appear perfectly except I cannot enter any
character in 'e1' entry, but 'e2' entry is ok.

Second, when I run it in python interactive shell LINE BY LINE, then
'e1' and 'e2' entry both can accept user input, no problem! But when I
copy and paste it into interactive shell, then the first situation
happens again.

So..., has anyone ever run into this problem like me? and how do you
fix it? I use python2.3.4 now.
Thank you!
 
E

Eric Brunel

Hi everyone,

Here is my simple Tkinter script:

## start of entry.py
from Tkinter import *
root=Tk()
e1=Entry(root, width=16)
e1.pack()
e2=Entry(root, width=16)
e2.pack()
mainloop()
## end

First, it works on win2k. When I run it as 'python entry.py' on linux,
both 'e1' and 'e2' appear perfectly except I cannot enter any
character in 'e1' entry, but 'e2' entry is ok.

Second, when I run it in python interactive shell LINE BY LINE, then
'e1' and 'e2' entry both can accept user input, no problem! But when I
copy and paste it into interactive shell, then the first situation
happens again.

So..., has anyone ever run into this problem like me? and how do you
fix it? I use python2.3.4 now.

It works without problem for me... What is the Linux distribution you're
using? And with which window manager? And what is your tcl/tk version? For
the latter, you can get it with:

from Tkinter import *
root = Tk()
root.tk.eval('puts $tk_patchLevel')
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top