Re: [Twisted-Python] Protocol stack in twisted

2012-01-06 Thread Michael Thompson
On 6 January 2012 08:54, nivedita datta wrote: > A simple query,.. Is it possible to implement protocols & protocol > stack using twisted?? > > yes, http://twistedmatrix.com/documents/current/core/howto/servers.html ___ Twisted-Python mailing list Twist

Re: [Twisted-Python] Basic problem with deferreds

2011-08-22 Thread Michael Thompson
On 23 August 2011 04:52, wrote: > action and add the results to a list. No matter how I place the methods or > how I call them when > evaluating the user or the security code, I always get a Deferred object and > I need the actual result > so that the method continue to be executed or not, eva

Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-03 Thread Michael Thompson
On Jul 2, 2011 10:28 p.m., "Glyph Lefkowitz" wrote: > > > On Jul 2, 2011, at 1:07 PM, Michael Thompson wrote: > >> On 1 July 2011 18:38, Glyph Lefkowitz wrote: > > >> I think github means less effort for the reviewer because they can >> review comm

Re: [Twisted-Python] Moving Twisted off Trac and SVN to somewhere nicer

2011-07-02 Thread Michael Thompson
On 1 July 2011 18:38, Glyph Lefkowitz wrote: > As Itamar has already suggested, I think that this is a solution in search > of a problem.  Aside from occasionally saving a contributor the trouble of > typing 'review' in the keywords field every so often, what is this actually > going to accomplish

Re: [Twisted-Python] Instrumenting Reactors

2011-04-06 Thread Michael Thompson
On 6 April 2011 10:55, Paul Thomas wrote: > Should I just hack into the reactor somewhere? Or is there something sitting > in a library I haven't seen that will help with this? You can time blocking calls by instrumenting twisted.python.log.callWithContext and you could try writing the timing in

Re: [Twisted-Python] running several services from a single app

2011-03-28 Thread Michael Thompson
On 28 March 2011 16:29, Aljoša Mohorović wrote: > is it possible to run several services from a single app? yes see http://twistedmatrix.com/documents/current/core/howto/application.html and http://twistedmatrix.com/documents/current/api/twisted.application.service.MultiService.html Regards,

Re: [Twisted-Python] Benchmark of Python WSGI servers

2011-03-19 Thread Michael Thompson
On 19 March 2011 08:29, Glyph Lefkowitz wrote: > On Mar 18, 2011, at 9:35 PM, exar...@twistedmatrix.com wrote: > > A multi-process WSGI container might actually be of practical use, since > it may make more cores available to your server.  If an application is > bottlenecked on CPU rather than som

[Twisted-Python] Benchmark of Python WSGI servers

2011-03-18 Thread Michael Thompson
>From the guys who brought you async socket benchmark, http://nichol.as/asynchronous-servers-in-python, comes Python WSGI benchmark http://nichol.as/benchmark-of-python-web-servers. Is twisted coming out of this so badly because they are using the default reactor, as opposed to epoll? Perhaps the

[Twisted-Python] Fwd: Slow data transfer with Twisted + socat + Windows

2011-03-08 Thread Michael Thompson
-- Forwarded message -- From: Michael Thompson Date: 9 March 2011 07:02 Subject: Re: [Twisted-Python] Slow data transfer with Twisted + socat + Windows To: Jason Heeris On 9 March 2011 01:47, Jason Heeris wrote: > On 9 March 2011 03:49, Michael Thompson wrote: >>

Re: [Twisted-Python] Slow data transfer with Twisted + socat + Windows

2011-03-08 Thread Michael Thompson
On 8 March 2011 08:38, Jason Heeris wrote: > I'm writing an application with Twisted/GTK to manage a serial device, > for use on both Windows and Linux. Unfortunately I can't use serial > comms directly under Windows[1], so my workaround is to launch > socat[2] in a subprocess to relay data betwee

Re: [Twisted-Python] Failing tests in trunk

2011-03-08 Thread Michael Thompson
On 8 March 2011 12:04, Facundo Batista wrote: > On Mon, Mar 7, 2011 at 9:34 PM,   wrote: > >> None of these are known failures: >> >>    http://buildbot.twistedmatrix.com/boxes-supported >> >> Just looking at the list of failing tests, I would make a small bet that >> the failures are caused by yo

Re: [Twisted-Python] Error (and response) handling in protocols

2011-02-21 Thread Michael Thompson
On 21 February 2011 14:06, Jason Heeris wrote: > On 21 February 2011 21:30,   wrote: >> Not intentionally: >> >>  http://twistedmatrix.com/trac/ticket/3690 > > Interesting... > > As an aside, the problem of serial port availability for unit tests is > something I've encountered before too. I solve

Re: [Twisted-Python] Error (and response) handling in protocols

2011-02-21 Thread Michael Thompson
On 21 February 2011 07:00, Jason Heeris wrote: > On 21 February 2011 14:50, Michael Thompson wrote: >> This might be better expressed as how do you write a protocol to >> handle errors when using an unreliable transport. It down to your >> protocol as to how you need to

Re: [Twisted-Python] Error (and response) handling in protocols

2011-02-20 Thread Michael Thompson
On 21 February 2011 06:26, Jason Heeris wrote: > So how I do I deal with protocol errors in a connectionless protocol? This might be better expressed as how do you write a protocol to handle errors when using an unreliable transport. It down to your protocol as to how you need to handle errors by

[Twisted-Python] SerialPort testing on the Twisted build slaves

2011-02-04 Thread Michael Thompson
Hi, Ticket http://twistedmatrix.com/trac/ticket/3690 is adding some serial port testing. The patch adds code to discover serial ports on Windows and Posix and the test uses the first serial port that is discovered. Will this approach work for the build slaves, or is it better to use an environ

Re: [Twisted-Python] Guidance needed on serial device interaction

2011-02-02 Thread Michael Thompson
On 2 February 2011 10:11, Jason Heeris wrote: > On 2 February 2011 17:53, Albert Brandl wrote: >> "string" could be interpreted as "complete message". It might e.g. happen >> that a message arrives in three chunks. Each time a chunk is read, the >> dataReceived method is called. When it detects t

Re: [Twisted-Python] design of twisted application

2011-02-02 Thread Michael Thompson
On 2 February 2011 07:15, Kurt Spindler wrote: > Hey, > I am trying to design a twisted application, (I'm pretty new to twisted and > networking in general) and I feel like I'm not approaching it quite the > right way and would appreciate your feedback. First part, is that I am > trying to couple

Re: [Twisted-Python] Guidance needed on serial device interaction

2011-02-02 Thread Michael Thompson
On 2 February 2011 06:36, Jason Heeris wrote: > This is a bit long, sorry... > > I have a PyGTK program that uses threads and pyserial's blocking > methods to interact with an RS232 connected device. I'd like to throw > out the threading awfulness and redo it in Twisted, if possible, but > I'm a l

Re: [Twisted-Python] Refactoring Documentation

2011-01-21 Thread Michael Thompson
On 21 January 2011 22:35, Glyph Lefkowitz wrote: >  I don't believe we have a mirror on > github, but maybe somebody could correct me. There are 79 repos on github that match the word twisted. This one claims to be updated every 15 minutes and seems to be pretty up to date (has a commit from 13

Re: [Twisted-Python] Design advice

2011-01-15 Thread Michael Thompson
On 14 January 2011 14:56, wrote: > I see how I can tell a client to retrieve specific messages from the database > to send them. > What I'm not sure about is the "live" part (sending messages coming from the > external system). Note that when I say "live", a small delay (up to 2-3 > seconds) i

Re: [Twisted-Python] Twisted and ipython

2011-01-13 Thread Michael Thompson
On 11 January 2011 07:48, Alessandro Dentella wrote: > So what's the suggested way to play with twisted? It depends what you're trying to do. I'd suggest you get some form of skeleton program running first. At that point you can interact with the program using twisted manhole. ipython has a tas

Re: [Twisted-Python] sudo asking for a password during utils.getProcessOutputAndValue()

2009-07-07 Thread Michael Thompson
2009/7/7 Steve Freitas : > Hi all, > > If from inside my twisted program I do... > > commands.getstatusoutput('sudo blah blah') > > ...it works great. If instead I do... Does working mean it sucessfully asks for the password or that it doesn't ask for the password? > > utils.getProcessOutputAndVa

[Twisted-Python] Question about a custom byte oriented TCP protocol

2009-06-02 Thread Michael Thompson
Hi, I'm trying to use twisted to talk to an existing system that uses a byte oriented protocol stuffed inside a TCP packet. I have implemented this using the IntNStringReceiver modified to look at some bytes to calculate the size of the string to receive. For simple test cases where I send a si

Re: [Twisted-Python] Guidance on Proxy-type Application

2009-05-29 Thread Michael Thompson
2009/5/29 Michael Thompson > 2009/5/28 > >> >> On 01:23 am, asb.b...@gmail.com wrote: >> >>> I have just started to look at the Twisted framework and would like to >>> put it >>> to use for a new project I am working on. Not being very fa

Re: [Twisted-Python] Guidance on Proxy-type Application

2009-05-29 Thread Michael Thompson
2009/5/28 > > On 01:23 am, asb.b...@gmail.com wrote: > >> I have just started to look at the Twisted framework and would like to put >> it >> to use for a new project I am working on. Not being very familiar with >> the >> framework and fairly new to Python in general I would like to ask a >> de