[sumtrix22@hotmail.com: [Anygui-users] window creation doesn't work after some socket calls in msw]
Brought to you by:
mlh
|
From: Magnus L. H. <ma...@he...> - 2003-05-09 10:33:11
|
Does anyone have an answer to this? (The poster is not, AFAIC, a member
of either Anygui list, so please Cc.)
----- Forwarded message from sum trix <sum...@ho...> -----
From: "sum trix" <sum...@ho...>
To: us...@an...
Subject: [Anygui-users] window creation doesn't work after some socket ca=
lls in msw
Date: Fri, 09 May 2003 01:38:35 +0000
The window created after accept() appears and dissappears instantly in ms=
w=20
on Windows. Sometimes the window appears in a "hanged" state and doesn't=20
respond to its event queue. It seems to work in tk, but I had similar cod=
e=20
with a SOCK_DGRAM that would hang in msw and tk when creating a window af=
ter=20
recv().
Is this a problem with specific backends or creating windows in a thread?
from anygui import *
from threading import *
from socket import *
def socket_accept():
s =3D socket(AF_INET, SOCK_STREAM)
s.bind(('', 8001))
s.listen(1)
create_window('works here too')
s1 =3D s.accept()[0]
print 'accepted'
create_window('not working')
def create_window(title):
win =3D Window(title=3Dtitle)
btn =3D Button(text=3D'Click')
win.add(btn)
app.add(win)
app =3D Application()
t =3D Thread(None, socket_accept, None, (), {})
t.start()
create_window('works here')
app.run()
_________________________________________________________________
Charla con tus amigos en l=EDnea mediante MSN Messenger:=20
http://messenger.yupimsn.com/
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
Anygui-users mailing list
Any...@li...
https://lists.sourceforge.net/lists/listinfo/anygui-users
----- End forwarded message -----
--=20
Magnus Lie Hetland "If you can't take a joke, you have no business
http://hetland.org having a heart condition!" Igor, Dork Tower
|