[Twisted-Python] how to change an qt4 applicaion using twisted?

2013-11-17 Thread yangyouxiu
Hi,all! I have to change an QT application to client-server model, and i found twisted and qt4 reactor. But i don't know where to start? how should i do to split the qt application? what's the step. as for the server, what should i initialize? thanks all.

Re: [Twisted-Python] how to change an qt4 applicaion using twisted?

2013-11-17 Thread Laurens Van Houtven
Hi yangyouxiu, Like Twisted, Qt (and almost all GUI toolkits) work on a single thread, evented mechanism, with an event loop at its core. Qt4Reactor, I believe, just merges these two loops into one loop. The documentation for Qt4Reactor should tell you how to do that. Presumably there's a reacto

Re: [Twisted-Python] how to change an qt4 applicaion using twisted?

2013-11-17 Thread yangyouxiu
Thank you very much. Is it reasonable to bulid only one protocol to deal with datas tranports between client and server ? If in this way, i believe i have to write lots of case to deal with the message, such as to call differnent method,it's impressive. Is there any suggestions? 杨有秀 敬上 Fro

Re: [Twisted-Python] how to change an qt4 applicaion using twisted?

2013-11-17 Thread Laurens Van Houtven
On Sun, Nov 17, 2013 at 11:10 AM, yangyouxiu wrote: > Thank you very much. > > Is it reasonable to bulid only one protocol to deal with datas tranports > between client and server ? If in this way, i believe i have to write lots > of case to deal with the message, such as to call differnent meth

Re: [Twisted-Python] question : use existing tac file with tap.

2013-11-17 Thread Sayid Munawar
Hi Bino, i _never_ write code using twisted (yet, i hope), but reading your question lead me to one (i think) example: https://github.com/praekelt/vumi/blob/develop/vumi/servicemaker.py#L174 hope it helps -- Sayid Munawar Sent with Sparrow (http://www.sparrowmailapp.com/?sig) On Monday, 1

Re: [Twisted-Python] how to change an qt4 applicaion using twisted?

2013-11-17 Thread Daniel Sank
Yangyouxiu, I can definitely help you with this as I've recently written a chat server/client with twisted+PyQt4 and am working on a more complex program that uses PyQt4 with twisted's perspective broker. I have attached five files: 1. client-pyqtreactor.py is a chat client using pyqtreactor and

Re: [Twisted-Python] Is a Viewable Cacheable a good idea?

2013-11-17 Thread Daniel Sank
> So may be (IMHO) you could have one viewable object acting like a > stockroom-manager > that clients will (remote)call to make changes on the server side > stockroom-object, and > a cacheable stockroom-object, that you will sync with client. Now that I've been working on this for a while and u

Re: [Twisted-Python] Returning a deferred from buildProtocol t.i.p.Factory

2013-11-17 Thread Tom van Neerijnen
Thanks for both those suggestions. I'll be taking a closer look at txLoadbabancer when I get time as it looks like it'll take care of a lot of my desired functionality out the box. To get started tho I'll move my async routing decision call into the protocol as suggested. Is there any reason why t

Re: [Twisted-Python] Returning a deferred from buildProtocol t.i.p.Factory

2013-11-17 Thread exarkun
On 05:44 pm, twis...@tomvn.com wrote: Thanks for both those suggestions. I'll be taking a closer look at txLoadbabancer when I get time as it looks like it'll take care of a lot of my desired functionality out the box. To get started tho I'll move my async routing decision call into the protoco

Re: [Twisted-Python] Ticket #1330 - Socks V5 functionality

2013-11-17 Thread Kevin Horn
David, You may also wish to take a look at Proxy65, which is a socks5 proxy specifically for XMPP XEP-0065. I have no idea how complete or correct it is, and it's pretty old, but it might be helpful. https://code.google.com/p/proxy65/ On Sat, Nov 16, 2013 at 2:28 PM, David Stainton wrote: > H

Re: [Twisted-Python] how to change an qt4 applicaion using twisted?

2013-11-17 Thread yangyouxiu
Thanks for all the suggestions. I will try your advices. 杨有秀 敬上 From: Daniel Sank Date: 2013-11-18 01:01 To: Twisted general discussion Subject: Re: [Twisted-Python] how to change an qt4 applicaion using twisted? Yangyouxiu, I can definitely help you with this as I've recently written a chat

[Twisted-Python] perspective argument missing from Viewable.view_*

2013-11-17 Thread Daniel Sank
I'm trying to understand exactly how context management works in perspective broker. I thought the point of Viewable was that you always know who's calling. However if I run the simple fully working example pasted below, I see that the perspective argument is None. What gives? Kind regards, Daniel