
June 8th, 2004, 08:41 AM
|
|
Registered User
|
|
Join Date: May 2004
Posts: 21
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Tkinter script not refreshed
Hi,
I have a little problem linked to my previous not problem any more...
So my graphic interface made with Tkinter launches a script that communicates his log strings to the inferface to control what is happening...
I can print with no problem theses string on the standard output, but i cannot print theses strings on a text box in the interface, everthing goes as if it were "frozen" and waits for the end of the script...
I tried several ways to launch the script, the popen method and the spawn with the os.P_NOWAIT method, but they don't seem to work. If I use the os.system method the connection to the socket is refused...
Here's a piece of my script to judge it:
Code:
P = os.spawnv(os.P_NOWAIT,'/home/winwin/stage/maj_pdb.py',['maj_pdb.py'])
s.listen(1)
conn, addr = s.accept()
data = "debut"
while data != "end of prog":
data = conn.recv(1024)
print data
log.insert(END,data)
conn.close()
If you have an idea I would be very grateful... thanks
erwin
|