Re: [Twisted-Python] test if thread is reactor's thread

2011-05-11 Thread Alessandro Dentella
thanks to both of you for the hints. My situation is so simple that i guess a twisted.python.threadable.isInIOThread() should suffice. sandro *:-) ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman

Re: [Twisted-Python] test if thread is reactor's thread

2011-05-11 Thread Thomas Hervé
Le 11/05/2011 20:18, Alessandro Dentella a écrit : > Hi, > > > is there a way to test if the thread a function is called is the reactor's > thread? > > I have a function that can be called from the main thread or from the > reactor's thread and should behave differently... Hi, twisted.python.thre

Re: [Twisted-Python] EuroPython 2011 early bird ends in 2 days

2011-05-11 Thread Thomas Hervé
Le 11/05/2011 20:26, Laurens Van Houtven a écrit : > Wooo! > > Perhaps as an extra advertisement we should make a list of Twisted people > showing up? > > At the very least it's going to be me (lvh) and apparently also Valentino > (dialtone) :-) Heya! Just booked my tickets as well, going to be t

Re: [Twisted-Python] test if thread is reactor's thread

2011-05-11 Thread Jamu Kakar
Hi Alessandro, On Wed, May 11, 2011 at 8:18 PM, Alessandro Dentella wrote: > is there a way to test if the thread a function is called is the reactor's > thread? Yes, you can do it with code like this: from threading import currentThread if currentThread().getName() == 'MainThread': # Code

Re: [Twisted-Python] EuroPython 2011 early bird ends in 2 days

2011-05-11 Thread Laurens Van Houtven
Wooo! Perhaps as an extra advertisement we should make a list of Twisted people showing up? At the very least it's going to be me (lvh) and apparently also Valentino (dialtone) :-) cheers lvh ___ Twisted-Python mailing list Twisted-Python@twistedmatrix

[Twisted-Python] test if thread is reactor's thread

2011-05-11 Thread Alessandro Dentella
Hi, is there a way to test if the thread a function is called is the reactor's thread? I have a function that can be called from the main thread or from the reactor's thread and should behave differently... thanks sandro *:-) -- Sandro Dentella *:-) http://www.reteisi.org So

[Twisted-Python] EuroPython 2011 early bird ends in 2 days

2011-05-11 Thread Valentino Volonghi
Hi everyone, this is just a gentle reminder that EuroPython 2011 early bird ends in 2 days, some core Twisted developers will be there and there will be at least one tutorial about Twisted. EuroPython is the official European conference about the Python programming language. It is aimed at eve

Re: [Twisted-Python] Some "spread" objects and comparison semantics

2011-05-11 Thread Facundo Batista
On Wed, May 11, 2011 at 2:05 PM, wrote: > I doubt anyone remembers the rationale for these methods.  We should err > on the safe side and preserve the existing behavior. Ok, I'll add tests to check this also. -- .    Facundo Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.or

Re: [Twisted-Python] Some "spread" objects and comparison semantics

2011-05-11 Thread exarkun
On 10 May, 06:51 pm, facundobati...@gmail.com wrote: >I'm analysing the code in twisted/spread/flavors.py and >twisted/spread/pb.py, trying to remove the __cmp__ and cmp() in >RemoteCache, RemoteCacheMethod and RemoteCacheObserver classes. > >They all have __cmp__ methods, but as there is not any t