Re: [Twisted-Python] Twisted with wxPython in a thread

2010-08-24 Thread Gabriel Rossetti
On 08/24/2010 04:26 PM, Itamar Turner-Trauring wrote: > On Tue, 2010-08-24 at 15:22 +0200, Gabriel Rossetti wrote: > > >> Ok, so you put Twisted in a thread? I read in several posts that this >> posed problems, have you had any drawbacks? >> > reactor.spawn

Re: [Twisted-Python] Twisted with wxPython in a thread

2010-08-24 Thread Gabriel Rossetti
On 08/24/2010 04:37 PM, Stephen Waterbury wrote: > On 08/24/2010 10:08 AM, Stephen Waterbury wrote: >> On 08/24/2010 09:24 AM, Stephen Waterbury wrote: >>> On 08/24/2010 09:22 AM, Gabriel Rossetti wrote: >>>> Ok, so you put Twisted in a thread? I read in several posts

Re: [Twisted-Python] Twisted with wxPython in a thread

2010-08-24 Thread Gabriel Rossetti
On 08/24/2010 07:32 PM, Andrew Francis wrote: > Hi > > >> I can't find any examples of using Twisted with wxPython, were wx is in >> a seperate thread. I used to have one somewhere but can' t find it >> either. I'm looking because for some reason my code doesn't work (the >> GUI freezes), even

Re: [Twisted-Python] Twisted with wxPython in a thread

2010-08-24 Thread Gabriel Rossetti
On 08/24/2010 02:11 PM, Itamar Turner-Trauring wrote: > On Tue, 2010-08-24 at 11:40 +0200, Gabriel Rossetti wrote: > >> Hello, >> >> I can't find any examples of using Twisted with wxPython, were wx is in >> a seperate thread. I used to have one somewher

Re: [Twisted-Python] Twisted with wxPython in a thread

2010-08-24 Thread Gabriel Rossetti
On 08/24/2010 03:06 PM, Stephen Waterbury wrote: > On 08/24/2010 05:40 AM, Gabriel Rossetti wrote: > >> Hello, >> >> I can't find any examples of using Twisted with wxPython, were wx is in >> a seperate thread. I used to have one somewhere but can' t fi

Re: [Twisted-Python] Twisted with wxPython in a thread

2010-08-24 Thread Gabriel Rossetti
Are you sure that wx.CallAfter is the right thing for wx calls from Twisted? Since Twisted is an event loop, it may not release control in the same fashion as other wx calls. Jason On Tue, Aug 24, 2010 at 5:40 AM, Gabriel Rossetti mailto:gabriel.rosse...@arimaz.com>> wrote: Hel

[Twisted-Python] Twisted with wxPython in a thread

2010-08-24 Thread Gabriel Rossetti
Hello, I can't find any examples of using Twisted with wxPython, were wx is in a seperate thread. I used to have one somewhere but can' t find it either. I'm looking because for some reason my code doesn't work (the GUI freezes), even though I use reactor.callFromThread() for Twisted calls fro

[Twisted-Python] twisted + wx + pypubsub = progress bar update problem

2010-05-28 Thread Gabriel Rossetti
Hello everyone, I am using wx (wxreactor) and pypubsub with twisted and I'm having some issues. I have a loop that updates values and I'm trying to show the user the progress. The loop uses pypubsub to update the progress bar but even if I explicitly refrech the progress bar widget it doesn't d

Re: [Twisted-Python] can the reactor be told to stop processing events and to just queue them?

2010-05-28 Thread Gabriel Rossetti
Gabriel Rossetti wrote: > Itamar Turner-Trauring wrote: > >> On Thu, 2010-05-27 at 14:08 +0200, Gabriel Rossetti wrote: >> >> >>> is there a way to tell the reactor to just queue the events and not to >>> process them for a specific protocol?

Re: [Twisted-Python] can the reactor be told to stop processing events and to just queue them?

2010-05-27 Thread Gabriel Rossetti
Itamar Turner-Trauring wrote: > On Thu, 2010-05-27 at 14:08 +0200, Gabriel Rossetti wrote: > >> is there a way to tell the reactor to just queue the events and not to >> process them for a specific protocol? >> > > No, Twisted doesn't have an event que

[Twisted-Python] can the reactor be told to stop processing events and to just queue them?

2010-05-27 Thread Gabriel Rossetti
Hello everyone, is there a way to tell the reactor to just queue the events and not to process them for a specific protocol? I have two protocols running on my reactor, one that monitors the network and one for a usb device, I'd like to pause the event processing for the network side when certa

Re: [Twisted-Python] exception not being trapped with Failure.trap

2010-05-03 Thread Gabriel Rossetti
Michael Tharp wrote: > On 05/03/2010 09:46 AM, Gabriel Rossetti wrote: >> f.trap(MyException) raises MyException and f.value == MyException >> evaluates to True as expected, so why isn't it being trapped? > > f.value should be an instance of MyException, not the class

[Twisted-Python] exception not being trapped with Failure.trap

2010-05-03 Thread Gabriel Rossetti
Hello everyone, I'm getting something strange: f.trap(MyException) raises MyException and f.value == MyException evaluates to True as expected, so why isn't it being trapped? Thanks, Gabriel ___ Twisted-Python mailing list Twisted-Python@twistedmat

Re: [Twisted-Python] Question about processes in python

2010-04-12 Thread Gabriel Rossetti
and receive file descriptors. > > -J > Hi Jason, yes, I was going to use that but I read in several threads that this didn't work correctly in Twisted Gabriel > On Mon, Apr 12, 2010 at 6:09 AM, Gabriel Rossetti > wrote: > >> Hello everyone, >> >>

Re: [Twisted-Python] Question about processes in python

2010-04-12 Thread Gabriel Rossetti
Reza Lotun wrote: > Hi, > > >> I'd like to run a python function in a new process, like python 2.6's >> multiprocessing does. I wanted to use ProcessProtocol, but it seems to >> only work for executing executables and interacting with them using >> stdin/stdout/other fds. Is there a way of runni

[Twisted-Python] Question about processes in python

2010-04-12 Thread Gabriel Rossetti
Hello everyone, I'd like to run a python function in a new process, like python 2.6's multiprocessing does. I wanted to use ProcessProtocol, but it seems to only work for executing executables and interacting with them using stdin/stdout/other fds. Is there a way of running a python piece of co

Re: [Twisted-Python] domish.Element.__getattr__() or xpath.XPathQuery

2010-02-07 Thread Gabriel Rossetti
exar...@twistedmatrix.com wrote: > On 4 Feb, 10:48 am, gabriel.rosse...@arimaz.com wrote: > >> Hello everyone, >> >> I was wondering what you would recommend, accessing nodes via >> domish.Element.__getattr__() >> (e.g. el.node1.node1_1, where el is /msg) or via xpath.XPathQuery() >> (e.g. xpath

[Twisted-Python] domish.Element.__getattr__() or xpath.XPathQuery

2010-02-04 Thread Gabriel Rossetti
Hello everyone, I was wondering what you would recommend, accessing nodes via domish.Element.__getattr__() (e.g. el.node1.node1_1, where el is /msg) or via xpath.XPathQuery() (e.g. xpath.XPathQuery("/msg/node1/node1_1").queryForNodes(el)[0])? I was wondering which would be faster, the __getattr_

[Twisted-Python] How to diagnose slowness

2010-01-26 Thread Gabriel Rossetti
Hello everyone, I have noticed slowness sometimes in between two twisted apps. It doesn't happen often, and I'm not sure where it comes from. It may either be when the msg is sent, that it really isn't sent until after a delay (why?), or when the other service receives it, it takes time to proc

Re: [Twisted-Python] Proxy support through urllib2?

2010-01-19 Thread Gabriel Rossetti
Kevin Horn wrote: > On Mon, Jan 11, 2010 at 7:33 AM, Gabriel Rossetti > mailto:gabriel.rosse...@arimaz.com>> wrote: > > Hello everyone, > > Is it possible to use a proxy with Twisted? I can do this with > urllib2 : > > proxy = urllib2.ProxyHand

Re: [Twisted-Python] Proxy support through urllib2?

2010-01-19 Thread Gabriel Rossetti
exar...@twistedmatrix.com wrote: > On 01:33 pm, gabriel.rosse...@arimaz.com wrote: > >> Hello everyone, >> >> Is it possible to use a proxy with Twisted? I can do this with urllib2 >> : >> >> proxy = urllib2.ProxyHandler({"http": "http://my.proxy.com:8080"}) >> opener = urllib2.build_opener(pro

[Twisted-Python] Proxy support through urllib2?

2010-01-11 Thread Gabriel Rossetti
Hello everyone, Is it possible to use a proxy with Twisted? I can do this with urllib2 : proxy = urllib2.ProxyHandler({"http": "http://my.proxy.com:8080"}) opener = urllib2.build_opener(proxy) urllib2.install_opener(opener) will that suffice? I'd need SOCKSv5 and HTTP proxy support. Thanks, Gab

[Twisted-Python] copy.deepcopy domish.Element works in python 2.5 but not in 2.6

2009-12-17 Thread Gabriel Rossetti
Hello everyone, for some reason copy.deepcopy forks great on a domish.Element on 2.5 but not in 2.6 : Python 2.5.4 (r254:67916, Sep 20 2009, 10:05:43) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from twisted.words.xish import domish >>> impo

[Twisted-Python] reactor.callLater() or reactor.callFromThread() when sending msg just before quit

2009-12-08 Thread Gabriel Rossetti
Hello everyone, I have to send a message just before my service quits, but sometimes the reactor quits before the msg is sent. I was wondering if I should user reactor.callLater like so : self.sendMessage(msg) reactor.callLater(1, self.stop) (which I don't really like), or use reactor.callFromT

[Twisted-Python] What is the difference in between reactor.running and reactor._stopped

2009-09-18 Thread Gabriel Rossetti
Hello, I tried using reactor.running for a test, to not try to stop the reactor if it's already stopped, but it doesn't work. If I use reactor._stopped instead, it works. I know I'm not supposed to access it sonce it is prefixed by the underscore, so my question is what is the difference in be

Re: [Twisted-Python] Twisted, wxPython & PyPubSub

2009-09-11 Thread Gabriel Rossetti
exar...@twistedmatrix.com wrote: > On 01:47 pm, gabriel.rosse...@arimaz.com wrote: > >> exar...@twistedmatrix.com wrote: >> >>> On 9 Sep, 07:12 am, gabriel.rosse...@arimaz.com wrote: >>> exar...@twistedmatrix.com wrote: > On 02:21 pm, gabriel.rosse...@arimaz.co

Re: [Twisted-Python] Twisted, wxPython & PyPubSub

2009-09-10 Thread Gabriel Rossetti
exar...@twistedmatrix.com wrote: > On 9 Sep, 07:12 am, gabriel.rosse...@arimaz.com wrote: > >> exar...@twistedmatrix.com wrote: >> >>> On 02:21 pm, gabriel.rosse...@arimaz.com wrote: >>> Hello everyone, I am using wx with twisted and pubsub (not the on in wx but the >>

Re: [Twisted-Python] Twisted, wxPython & PyPubSub

2009-09-09 Thread Gabriel Rossetti
Arimaz SA Ingénieur en Informatique Av. du 24 Janvier 11 Ateliers de la Ville de Renens, Atelier 5 1020 Renens, Switzerland www.arimaz.com www.mydeskfriend.com Mob: +41-(0)79-539-0069 Tel: +41-(0)21-566-7343 exar...@twistedmatrix.com wrote: > On 02:21 pm, gabriel.rosse...@arimaz.com wrote: >

[Twisted-Python] Twisted, wxPython & PyPubSub

2009-09-07 Thread Gabriel Rossetti
Hello everyone, I am using wx with twisted and pubsub (not the on in wx but the independent one) to notify each one of what is going on. I was wondering if I should use reactor.callFromThread to call publisher.sendMessage or not? I haven't been doing that until now but I wondered if it was bett

Re: [Twisted-Python] twisted.names.error.DNSNameError on MacOsX but not on linux

2009-08-27 Thread Gabriel Rossetti
Ralph Meijer wrote: > On Tue, 2009-08-11 at 18:30 +0200, Gabriel Rossetti wrote: > >> [..] >> > > Apparently you modified the original example here: > > >> [..] >> connector = XMPPClientConnector(reactor, "10.204.232.117", f) &

Re: [Twisted-Python] Twisted, wxPython & Mac OS X 10.5 freezes

2009-08-23 Thread Gabriel Rossetti
Glyph Lefkowitz wrote: > On Wed, Aug 12, 2009 at 11:47 AM, Gabriel Rossetti > mailto:gabriel.rosse...@arimaz.com>> wrote: > > I have written an application using Twisted, WX and I wanted to > test it > under Mac. I have successfully used it on linux and wi

Re: [Twisted-Python] Twistd .tac + wxpython

2009-08-21 Thread Gabriel Rossetti
Glyph Lefkowitz wrote: > Hi Gabriel, > > On Thu, Aug 20, 2009 at 5:20 AM, Gabriel Rossetti > mailto:gabriel.rosse...@arimaz.com>> wrote: > > I thought > of maybe putting the wx mainloop in a thread and using the standard > reactor but I don't know

[Twisted-Python] Twisted Trac keeps on bugging

2009-08-20 Thread Gabriel Rossetti
Hello everyone, I must be the onlyone having problems with this, sin no one has said anything, but the Twisted Trac keeps on bugging out on me, I get : Traceback (most recent call last): File "/srv/trac/.local/lib/python2.5/site-packages/trac/web/api.py", line 382, in send_error 'text/htm

[Twisted-Python] Twistd .tac + wxpython

2009-08-20 Thread Gabriel Rossetti
Hello everyone, I have some services written that I'd like to run in a ta.c w/ twistd. One of them uses wxpython. I originally used the wxreactor but it seams to have some problems on Mac OS X and Windows, so with help from some people on this list I ended up using the wx mainloop as the mainlo

Re: [Twisted-Python] self.socket.accept() in doRead() in tcp.py has (11, 'Resource temporarily unavailable') error

2009-08-18 Thread Gabriel Rossetti
exar...@twistedmatrix.com wrote: > On 11:43 am, gabriel.rosse...@arimaz.com wrote: > >> Hello everyone, >> >> I have been trying to debug a Twisted app of mine and I noticed that in >> tcp.py in >> doRead() self.socket.accept() raises the following exception : error: >> (11, 'Resource temporar

[Twisted-Python] self.socket.accept() in doRead() in tcp.py has (11, 'Resource temporarily unavailable') error

2009-08-18 Thread Gabriel Rossetti
Hello everyone, I have been trying to debug a Twisted app of mine and I noticed that in tcp.py in doRead() self.socket.accept() raises the following exception : error: (11, 'Resource temporarily unavailable'). It seems to just smother the exception though. I read in the python doc that sockets

Re: [Twisted-Python] Twisted, PushProducer, Words & big msgs, any limit?

2009-08-13 Thread Gabriel Rossetti
Terry Jones wrote: >>>>>> "Gabriel" == Gabriel Rossetti writes: >>>>>> > Gabriel> I have a sort of XMPP router I wrote using Twisted and there seems > Gabriel> to be a size limit of some sort. I have been using it for over a &

[Twisted-Python] Twisted, PushProducer, Words & big msgs, any limit?

2009-08-13 Thread Gabriel Rossetti
Hello everyone, I have a sort of XMPP router I wrote using Twisted and there seems to be a size limit of some sort. I have been using it for over a year now without any problems, but today I had a larger than usual msg (175213 bytes) try to go through and it never did. I haven't pinpointed the

[Twisted-Python] Twisted, wxPython & Mac OS X 10.5 freezes

2009-08-12 Thread Gabriel Rossetti
Hello everyone, I have written an application using Twisted, WX and I wanted to test it under Mac. I have successfully used it on linux and windows before. When I run it, I often get the pinwheel of death and then the whole OS locks up, even SSH no longer accepts connections, I have to hard reb

Re: [Twisted-Python] twisted.names.error.DNSNameError on MacOsX but not on linux

2009-08-11 Thread Gabriel Rossetti
exar...@twistedmatrix.com wrote: > On 03:50 pm, gabriel.rosse...@arimaz.com wrote: > >> Hello everyone, >> >> I wrote a twisted app using the XMPP code that works fin on linux (and >> windows), but on Mac I get a twisted.names.error.DNSNameError, I >> searched google but found nothing on this, i

Re: [Twisted-Python] twisted.names.error.DNSNameError on MacOsX but not on linux

2009-08-11 Thread Gabriel Rossetti
Gabriel Rossetti wrote: > Hello everyone, > > I wrote a twisted app using the XMPP code that works fin on linux (and > windows), but on Mac I get a twisted.names.error.DNSNameError, I > searched google but found nothing on this, is there a known bug with > Twisted on Mac? &

[Twisted-Python] twisted.names.error.DNSNameError on MacOsX but not on linux

2009-08-11 Thread Gabriel Rossetti
Hello everyone, I wrote a twisted app using the XMPP code that works fin on linux (and windows), but on Mac I get a twisted.names.error.DNSNameError, I searched google but found nothing on this, is there a known bug with Twisted on Mac? I have Mac OS X 10.5.8, and the latest version of twisted

Re: [Twisted-Python] OT - adbapi, connection timeouts, mysql - OT

2009-07-21 Thread Gabriel Rossetti
y: > curs.execute(query, *args) > except adbapi.ConnectionLost: > print > print ' rerunning query' > print > curs.execute(query, *args) #simply resend > query, assuming

Re: [Twisted-Python] OT - adbapi, connection timeouts, mysql - OT

2009-07-21 Thread Gabriel Rossetti
#x27; >print >curs.execute(query, *args) #simply resend > query, assuming cp_reconnect=True > result = curs.fetchall() > columns = [d[0] for d in curs.description] > return [dict(zip(columns, r)) for r in result] > >def runOperatio

Re: [Twisted-Python] OT - adbapi, connection timeouts, mysql - OT

2009-07-21 Thread Gabriel Rossetti
unning query' >print >curs.execute(query, *args)#simply resend > query, assuming cp_reconnect=True > result = curs.fetchall() > columns = [d[0] for d in curs.description] > return [dict(zip(columns, r)) for r in result] > &g

[Twisted-Python] OT - adbapi, connection timeouts, mysql - OT

2009-07-20 Thread Gabriel Rossetti
Hello everyone, I have been experiencing the ConnectionError with adbapi & cp_reconnect=True. I know that because of the cp_reconnect=True param tha is reconnects and that the query is not re-run. I have written some code that should re-run the query in that case (if I get a Failure back becau

Re: [Twisted-Python] adbapi : sqlite3.OperationalError : database is locked

2009-06-22 Thread Gabriel Rossetti
Jean-Paul Calderone wrote: > On Mon, 22 Jun 2009 11:06:24 +0200, Gabriel Rossetti > wrote: > >> Hello everyone, >> >> I am using twisted.enterprise.adbapi with sqlite3 database adapter and >> "runInteraction()". I keep on getting "sqlite3.Ope

[Twisted-Python] adbapi : sqlite3.OperationalError : database is locked

2009-06-22 Thread Gabriel Rossetti
Hello everyone, I am using twisted.enterprise.adbapi with sqlite3 database adapter and "runInteraction()". I keep on getting "sqlite3.OperationalError : database is locked" errors. I understand the problem, multiple threads try to access the DB and it being already locked by a thread it raises

Re: [Twisted-Python] Twisted plugins and py2exe

2009-05-10 Thread Gabriel Rossetti
it would help if I attatched the patch :-) gl...@divmod.com wrote: On 04:55 pm, exar...@divmod.com wrote: Tue, 24 Feb 2009 17:35:14 +0100, Gabriel Rossetti wrote: Jean-Paul Calderone wrote: On Tue, 24 Feb 2009 11:49:13 +0100, Gabriel Rossetti wrote: Has anyone ever had this problem

Re: [Twisted-Python] Twisted plugins and py2exe

2009-05-10 Thread Gabriel Rossetti
gl...@divmod.com wrote: > > On 04:55 pm, exar...@divmod.com wrote: >> Tue, 24 Feb 2009 17:35:14 +0100, Gabriel Rossetti >> wrote: >>> Jean-Paul Calderone wrote: >>>> On Tue, 24 Feb 2009 11:49:13 +0100, Gabriel Rossetti >>>> wrote: > >

Re: [Twisted-Python] Twisted plugins and py2exe

2009-02-24 Thread Gabriel Rossetti
Jean-Paul Calderone wrote: On Tue, 24 Feb 2009 11:49:13 +0100, Gabriel Rossetti wrote: Hello everyone! I used py2exe on a Twisted app of mine and I get this exception : Traceback (most recent call last): File "proj\service.pyc", line 1308, in connectionMade File "proj\ser

[Twisted-Python] Twisted plugins and py2exe

2009-02-24 Thread Gabriel Rossetti
Hello everyone! I used py2exe on a Twisted app of mine and I get this exception : Traceback (most recent call last): File "proj\service.pyc", line 1308, in connectionMade File "proj\service.pyc", line 1640, in _register File "proj\service.pyc", line 504, in loadPlugins File "twisted\plug

Re: [Twisted-Python] raw xml to element, char encoding/decoding error

2009-02-18 Thread Gabriel Rossetti
gl...@divmod.com wrote: On 18 Feb, 02:26 pm, gabriel.rosse...@arimaz.com wrote: Ahh, yes, I see my error, thanks :-) I'm glad everything is unicode in python 3 Erm, input to the parser will still be bytes in python 3. The failure mode will hopefully be more obvious, but it's not that

Re: [Twisted-Python] raw xml to element, char encoding/decoding error

2009-02-18 Thread Gabriel Rossetti
Ralph Meijer wrote: On 2009-02-18 14:57, Gabriel Rossetti wrote: Ralph Meijer wrote: On 2009-02-18 12:14, Gabriel Rossetti wrote: [..] >> Parser input is expected to be a string, not unicode. Try this instead: parser.parse(tmp.toXml().encode('utf-8')) ralphm Hello Ral

Re: [Twisted-Python] raw xml to element, char encoding/decoding error

2009-02-18 Thread Gabriel Rossetti
Ralph Meijer wrote: On 2009-02-18 12:14, Gabriel Rossetti wrote: Hello, I wrote some code to transform a raw XML string into a domish.Element, and I keep on getting char encoding/decoding errors : [..] parser.parse(tmp.toXml()) > [..] Parser input is expected to be a str

Re: [Twisted-Python] raw xml to element, char encoding/decoding error : OT

2009-02-18 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Hello, I wrote some code to transform a raw XML string into a domish.Element, and I keep on getting char encoding/decoding errors : class __RawXmlToElement(object): def __call__(self, s): self.result = None def onStart(el

[Twisted-Python] raw xml to element, char encoding/decoding error

2009-02-18 Thread Gabriel Rossetti
Hello, I wrote some code to transform a raw XML string into a domish.Element, and I keep on getting char encoding/decoding errors : class __RawXmlToElement(object): def __call__(self, s): self.result = None def onStart(el): self.result = e

Re: [Twisted-Python] thread + signal + reactor.stop problem

2009-02-13 Thread Gabriel Rossetti
though Twisted would stop them somehow, That must be it then one of my threads must not exit and thus runs forever and Twisted waits on it. I made the modifications and sending a cntrl-C made the program exit just fine. Cheers, Reza Thank you! Gabriel On Fri, Feb 13, 2009 at 8:37 AM, Gabri

[Twisted-Python] thread + signal + reactor.stop problem

2009-02-13 Thread Gabriel Rossetti
al redefinition at all or not. Thank you, Gabriel Rossetti #!/usr/bin/python # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. from twisted.internet.protocol import ClientFactory from twisted.internet.protocol import Protocol from twisted.internet import reactor, d

Re: [Twisted-Python] redefine signal handlers

2009-02-04 Thread Gabriel Rossetti
Jean-Paul Calderone wrote: On Wed, 4 Feb 2009 10:32:19 +, Reza Lotun wrote: Hi Gabriel, On Wed, Feb 4, 2009 at 10:15 AM, Gabriel Rossetti wrote: Hello everyone, I would like to run some cleanup code when my Twisted app receives a signal (SIGINT/SIGBREAK/SIGTERM). I saw that

[Twisted-Python] redefine signal handlers

2009-02-04 Thread Gabriel Rossetti
Hello everyone, I would like to run some cleanup code when my Twisted app receives a signal (SIGINT/SIGBREAK/SIGTERM). I saw that "_SignalReactorMixin" sets the handlers and that "ReactorBase" defines the default handlers : def sigInt(self, *args): """Handle a SIGINT interrupt.

Re: [Twisted-Python] reactor.stop() and thread and wxPython problem

2009-01-16 Thread Gabriel Rossetti
eCall)) Hmmm, I'll give that a try later on, does it work better than the official way of doing it? Has anyone else tried this? Hope this helped, Reza Thanks Reza On Fri, Jan 16, 2009 at 7:37 AM, Gabriel Rossetti wrote: Hello everyone, I have written some code using Twis

[Twisted-Python] reactor.stop() and thread and wxPython problem

2009-01-15 Thread Gabriel Rossetti
Hello everyone, I have written some code using Twisted that spawns threads and another using wxPython integration. For some reason when reactor.stop() is called they don't always exit. I suspect that the reactor is waiting on the threads to finish, which they apparently don't do, and as for th

Re: [Twisted-Python] IPushProducer problem

2009-01-14 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Jean-Paul Calderone wrote: On Tue, 13 Jan 2009 16:34:29 +0100, Gabriel Rossetti wrote: Hello everyone, I implemented a push-produce a while back and I though it works, but it didn't. When the msgs where spaced out, it worked, but if several msgs were sent one

Re: [Twisted-Python] IPushProducer problem

2009-01-14 Thread Gabriel Rossetti
Jean-Paul Calderone wrote: On Tue, 13 Jan 2009 16:34:29 +0100, Gabriel Rossetti wrote: Hello everyone, I implemented a push-produce a while back and I though it works, but it didn't. When the msgs where spaced out, it worked, but if several msgs were sent one after the other, then thin

[Twisted-Python] IPushProducer problem

2009-01-13 Thread Gabriel Rossetti
Hello everyone, I implemented a push-produce a while back and I though it works, but it didn't. When the msgs where spaced out, it worked, but if several msgs were sent one after the other, then things go bad (the msgs get mixed up)... I found this thread : http://www.twistedmatrix.com/piper

Re: [Twisted-Python] XmlStream and addObserver - root element's name?

2008-12-18 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Hello Marcin, Marcin Gliński wrote: 2008/12/17 Alvin Delagon: XmlStream is an implementation of XMPP/Jabber protocol (which is widely used for Instant Messaging). Which XmlStream? I've found two: XMPP: twisted.words.protocols.jabber.xmlstream

Re: [Twisted-Python] XmlStream and addObserver - root element's name?

2008-12-18 Thread Gabriel Rossetti
Hello Marcin, Marcin Gliński wrote: 2008/12/17 Alvin Delagon: XmlStream is an implementation of XMPP/Jabber protocol (which is widely used for Instant Messaging). Which XmlStream? I've found two: XMPP: twisted.words.protocols.jabber.xmlstream X-ish: twisted.words.xish.xmlstream I'v

Re: [Twisted-Python] python properties in twisted don't work

2008-12-18 Thread Gabriel Rossetti
Jean-Paul Calderone wrote: On Thu, 18 Dec 2008 14:35:00 +0100, Gabriel Rossetti wrote: Hello everyone! I have a problem, if I try to use python property in a twisted program, it doesn't really work...the accessor works but as soon as I use the mutator, it no longer uses the property

[Twisted-Python] python properties in twisted don't work

2008-12-18 Thread Gabriel Rossetti
Hello everyone! I have a problem, if I try to use python property in a twisted program, it doesn't really work...the accessor works but as soon as I use the mutator, it no longer uses the property (and doesn't set the "real" variable. I tried an example without twisted, it works, and with the

Re: [Twisted-Python] Deferred question

2008-12-09 Thread Gabriel Rossetti
James Y Knight wrote: On Dec 9, 2008, at 4:09 AM, Gabriel Rossetti wrote: Forget it, I monkey-patched defer.Deferred to add __del__ to see if it was called, and it was, so they are getting destroyed... BTW, that is not a good way to tell if objects are being deleted. Simply the act of adding

Re: [Twisted-Python] How to see the number of received msgs?

2008-12-09 Thread Gabriel Rossetti
Jean-Paul Calderone wrote: On Tue, 09 Dec 2008 17:12:32 +0100, Gabriel Rossetti <[EMAIL PROTECTED]> wrote: tarjei wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gabriel Rossetti wrote: Hello eveyone, is there a way to see how many msgs have been received and are waiting

Re: [Twisted-Python] How to see the number of received msgs?

2008-12-09 Thread Gabriel Rossetti
tarjei wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gabriel Rossetti wrote: Hello eveyone, is there a way to see how many msgs have been received and are waiting to be processed by a client? Hi, I think you need to be far more specific if you want an answer. Which protocol is

[Twisted-Python] How to see the number of received msgs?

2008-12-09 Thread Gabriel Rossetti
Hello eveyone, is there a way to see how many msgs have been received and are waiting to be processed by a client? Thank you, Gabriel ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/

Re: [Twisted-Python] Deferred question

2008-12-09 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Hello everyone, I have a question concerning defers, I have a service that needs to query IO until it answers. The IO can be disconnected, connected but off, connected and on; depending on the state I get different exceptions. I wrote something like : def

[Twisted-Python] Deferred question

2008-12-08 Thread Gabriel Rossetti
e collected 6. the new request follows the same path Can anyone confirm that this is correct, or are my defers somehow staying alive and not being garbage collected? Thank you, Gabriel Rossetti ___ Twisted-Python mailing list Twisted-Python@twisted

Re: [Twisted-Python] XMPP server connection question

2008-12-05 Thread Gabriel Rossetti
Phil Mayers wrote: Christopher Zorn wrote: On Tue, Dec 2, 2008 at 8:21 AM, Gabriel Rossetti <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Gabriel Rossetti wrote: Hello everyone, I wrote an XMPP client and I have a question, when it tries to

Re: [Twisted-Python] XMPP server connection question

2008-12-05 Thread Gabriel Rossetti
Christopher Zorn wrote: On Tue, Dec 2, 2008 at 8:21 AM, Gabriel Rossetti <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Gabriel Rossetti wrote: Hello everyone, I wrote an XMPP client and I have a question, when it tries to connect and the s

Re: [Twisted-Python] XMPP server connection question

2008-12-02 Thread Gabriel Rossetti
Gabriel Rossetti wrote: Hello everyone, I wrote an XMPP client and I have a question, when it tries to connect and the server is not listening, it doesn't send back an error and tries forever. I see that this function (twisted/names/srvconnect.py): def _ebGotServers(self, fa

[Twisted-Python] XMPP server connection question

2008-12-01 Thread Gabriel Rossetti
Hello everyone, I wrote an XMPP client and I have a question, when it tries to connect and the server is not listening, it doesn't send back an error and tries forever. I see that this function (twisted/names/srvconnect.py): def _ebGotServers(self, failure): failure.trap(DNSNameError)