Re: [Twisted-Python] Difficulty restarting/shutting down a twisted server - ports not closing

2013-06-12 Thread Laurens Van Houtven
Hi Paul

The documentation covers how to use Twisted with Tk (and many other event
loops). Here's the link you want:
https://twistedmatrix.com/documents/current/core/howto/choosing-reactor.html#auto16

Hope that helps :)
lvh
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python


Re: [Twisted-Python] Difficulty restarting/shutting down a twisted server - ports not closing

2013-06-12 Thread Naveen Michaud-Agraw
Hi Paul,

Have you tried the solution listed here:

http://twistedmatrix.com/documents/13.0.0/core/howto/choosing-reactor.html#auto16

With this approach, twisted would manage tkinter and you won't block on any 
twisted API calls.

Sent from my iPhone

On Jun 12, 2013, at 3:58 PM, Paul Sajna sajatt...@gmail.com wrote:

 I'm using Tkinter. When I do the reactor.listenTCP(), the server takes over 
 the main thread and the GUI freezes. Could you help me craft a GUI-safe 
 solution?
 
 
 On 12 June 2013 00:06, Glyph gl...@twistedmatrix.com wrote:
 
 On Jun 11, 2013, at 6:20 PM, Paul Sajna sajatt...@gmail.com wrote:
 
 I continue to use threads because my application uses a GUI that becomes 
 blocked when the server starts. Also, I am now having a problem where port 
 is undefined until the server is stopped and started again.
 
 Paul,
 
 Until you stop using threads in this manner, you are using threads in a 
 totally unsupported way and Twisted will be broken.
 
 Twisted supports most GUIs directly though; there is generally no need to 
 use threads.  What GUI library are you using?
 
 -glyph
 
 
 ___
 Twisted-Python mailing list
 Twisted-Python@twistedmatrix.com
 http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
 
 ___
 Twisted-Python mailing list
 Twisted-Python@twistedmatrix.com
 http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python