Re: [Twisted-Python] Polling from Twisted

2009-04-28 Thread Lucas Taylor
On 4/27/09 5:06 PM, Juanjo Conti wrote: > Hi, this is my first mail to the list. > > I am writing a server using Twisted, extending LineOnlyReceiver. In it I > maintain a list of clients connected. > > I'd like to poll every client for certain status information every 30 > seconds. Which is the c

Re: [Twisted-Python] Polling from Twisted

2009-04-28 Thread Lucas Taylor
On 4/28/09 4:11 AM, Juanjo Conti wrote: > > Another question. Thinking twisted (and thinking about performance), > it's ok to loop every 30 seconds over the clients asking their status or > should be better to schudle a new polling rutine starting 30 seconds > from now every time a client is conne

Re: [Twisted-Python] twisted.internet.task.LoopingCall

2009-06-04 Thread Lucas Taylor
On 6/4/09 4:12 PM, Doug Farrell wrote: > Hi all, > > I'm using the twisted.internet.task.LoopingCall system to run periodic > tasks in a Twisted server. If I had code like this: > > from twisted.internet.task import LoopingCall > > lp = LoopingCall(someFunction) > lp.start(5.0) # run every 5 s

Re: [Twisted-Python] SerialPort.loseConnection() BUG Still

2009-06-17 Thread Lucas Taylor
On 6/16/09 12:37 PM, Nestor A. Diaz wrote: > Hello, i had wrapper the loseConnection method, but it still throws the > same excepcion: > > class MySerialPort ( SerialPort ) : > > def __init__(self, the_protocol, port, reactor): > # type, host and port are used for my own purposes. >

Re: [Twisted-Python] Seeking advice on use of Perspective Broker

2009-09-17 Thread Lucas Taylor
ackage. Lucas Taylor ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] Seeking advice on use of Perspective Broker

2009-09-20 Thread Lucas Taylor
On 9/18/09 2:57 AM, Arthur Pemberton wrote: > On Thu, Sep 17, 2009 at 8:06 PM, Lucas Taylor wrote: >> On 9/17/09 1:31 PM, Arthur Pemberton wrote: >>> 2) How easy it to package Twisted for distribution on Windows system >>> (which would be inevitable) >> You

Re: [Twisted-Python] Twisted Client

2009-11-10 Thread Lucas Taylor
) -- If you want to maintain state between protocol instances, then create a ClientFactory. You could look at how ReconnectingClientFactory is implemented for ideas. The Writing Clients howto should help: http://twistedmatrix.com/projects/core/documentation/howto/clients.html Lucas T

Re: [Twisted-Python] serialport protocol as a service

2009-12-08 Thread Lucas Taylor
On 12/8/09 5:24 AM, Aníbal Pacheco wrote: > Hello list, > > Is there any way to get a service like the twisted.internet.TCPServer > but for serialport? > > I read the serialport code but couldn't figure out how to build such an > analogy with the tcp server. > > The goal I wanna reach is to at

Re: [Twisted-Python] Twistd logging

2009-12-09 Thread Lucas Taylor
On 12/9/09 11:14 AM, Landreville wrote: > > > On Wed, Dec 9, 2009 at 12:26 PM, > wrote: > > On 8 Dec, 09:04 pm, landrevi...@deadtreepages.com > wrote: > >Is there a way I can customize the format of log file? >

Re: [Twisted-Python] Signalling twistd with SIGUSR1 to rotate also interrupts txAMQP connections

2010-01-15 Thread Lucas Taylor
On 1/13/10 1:00 PM, Anthony wrote: > We run some services that use txAMQP within twistd to connect to an AMQP > bus. > > When we send twistd a SIGUSR1 to rotate its logs, it appears our > application loses connection to the AMQP bus and needs to reconnect. > This doesn't crash the app, but means t

Re: [Twisted-Python] Log rotates not as expected

2010-01-21 Thread Lucas Taylor
On 1/20/10 5:35 AM, Pet wrote: > Hi, > > in code below I try to rotate log files if they reach 500 limit, > but this happens only to every 5 files, ls -althr: > > -rw-r--r-- 1 root root 977K 2010-01-19 19:03 /var/log/my.log.12 > -rw-r--r-- 1 root root 977K 2010-01-19 19:55 /var/log/my.log.10

Re: [Twisted-Python] Log rotates not as expected

2010-01-21 Thread Lucas Taylor
On 1/21/10 11:17 AM, Pet wrote: > On Thu, Jan 21, 2010 at 7:02 PM, Maarten ter Huurne > wrote: >> On Thursday 21 January 2010, Lucas Taylor wrote: >> >>> This can occur if you have multiple instances of logfile.LogFile setup >>> to manage the same file. The d

Re: [Twisted-Python] Log rotates not as expected

2010-01-22 Thread Lucas Taylor
On 1/22/10 3:15 AM, Pet wrote: > On Fri, Jan 22, 2010 at 12:13 AM, Lucas Taylor > wrote: >> On 1/21/10 11:17 AM, Pet wrote: >>> On Thu, Jan 21, 2010 at 7:02 PM, Maarten ter Huurne >>> wrote: >>>> On Thursday 21 January 2010, Lucas Taylor wrote: >

Re: [Twisted-Python] Question about ReconnectingClientFactory and conch StatefulTelnetProtocol

2010-02-05 Thread Lucas Taylor
On 2/5/10 5:23 PM, Mark Bailey wrote: > Good day, everyone: > > Continuing my effort to learn Python and Twisted, I need to create > several Telnet clients and somehow send two arguments to each and > receive data from each. > > I tried the same pattern that I used with the Telnet server and crea

Re: [Twisted-Python] Getting factory with AuthenticatingTelnetProtocol

2010-02-27 Thread Lucas Taylor
On 2/27/10 6:19 AM, Skye wrote: > Hello, > > I used the code from this thread to figure out how to use > the twisted.conch.telnet.AuthenticatingTelnetProtocol class: > > http://www.mail-archive.com/twisted-python@twistedmatrix.com/msg01581.html > > (with the addition of av.state = 'Command' in

Re: [Twisted-Python] smtp-server: issue with checkers.FilePasswordDB and hash

2010-04-04 Thread Lucas Taylor
On 4/4/10 5:41 PM, aleu...@inwind.it wrote: > Hi all, >I use FilePasswordDB with a small smtp-server (a very small toy), but when > I use the hash function the authentication doesn't work. > > Here few lines of code: > """ > def _hash(name, clearpsw, hashedpsw): > # a very simple hash fun

Re: [Twisted-Python] R: Re: smtp-server: issue with checkers.FilePasswordDB and hash

2010-04-06 Thread Lucas Taylor
On 4/5/10 6:22 AM, aleu...@inwind.it wrote: > >> If your passwords are already hashed before they are sent to the server >> for authentication, then there is no need for a hash function. >> FilePasswordDB will accept either IUsernamePassword or >> IUsernameHashedPassword credentials. > > I want t

Re: [Twisted-Python] asynchronous python generator

2010-07-12 Thread Lucas Taylor
On 7/12/10 11:43 AM, Jean Daniel wrote: > Hello, > > I wrote a small client protocol which connects to a notification > server. The client role is to connect, and then to print the > notification which comes from the server until the server says "stop" > > Does someone knows how to make the f

Re: [Twisted-Python] trial newbie

2010-07-21 Thread Lucas Taylor
On 7/21/10 7:30 PM, Nathan wrote: > Anyone know what's going on? I installed/upgraded version 10.1.0 by > downloading the tarball and running "sudo python setup.py install" http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions FAQ 3.20 (Search for "Permission denied") You can follow the a

Re: [Twisted-Python] Get trial to use the docstring?

2010-08-05 Thread Lucas Taylor
On 8/5/10 6:25 PM, Nathan wrote: > I have a number of questions: > > 1) I found the TreeReporter class that produces the default output > (twisted/trial/reporter.py), and I found the file that seems to get > run by trial (twisted/scripts/trial.py) but for the life of me I > couldn't figure out ho

Re: [Twisted-Python] design of twisted application

2011-02-02 Thread Lucas Taylor
On Feb 2, 2011, at 12:15 AM, Kurt Spindler wrote: Second question is that, in that other bunch of code, I need to be able to write things to the socket. How can I access the instance of my protocol subclass that is used by the factory, so I can make protocolInstance.transport.write type c

Re: [Twisted-Python] twisted site should link to tx site ...

2011-02-10 Thread Lucas Taylor
On Feb 10, 2011, at 1:24 PM, Stephen Waterbury wrote: This url should really be linked either from Twisted's main page or at the very least on the "Twisted Community" page: https://launchpad.net/tx It is linked from here, with a description: http://twistedmatrix.com/trac/wiki/ProjectsUsingT

Re: [Twisted-Python] twisted site should link to tx site ...

2011-02-11 Thread Lucas Taylor
On Feb 11, 2011, at 8:04 AM, Stephen Waterbury wrote: > On 02/11/2011 01:30 AM, Lucas Taylor wrote: >> On Feb 10, 2011, at 1:24 PM, Stephen Waterbury wrote: >> >>> This url should really be linked either from Twisted's main page >>> or at the very

Re: [Twisted-Python] Question : Combining wokel XMPP and twisted.internet.serial

2011-12-21 Thread Lucas Taylor
On Dec 21, 2011, at 9:52 PM, bino oetomo wrote: Dear All .. A year ago, I need send some defined message to a jabber conference. The message content will depend on a "button-press". My trick is to use ttyctrl (http://ttyctrl.sourceforge.net/). So basicaly my "system" is builded from several p

Re: [Twisted-Python] ProcessMonitor stderr stdout

2012-02-29 Thread Lucas Taylor
On Feb 29, 2012, at 5:16 PM, Kevin McIntyre wrote: > Newbie question: > > I'm calling addProcess and everything works well, but I'm trying to > understand how to capture/handle stderr stdout for that spawned process. > Look into subclassing ProcessMonitor and override startProcess to provide

Re: [Twisted-Python] git repo maintenance

2012-10-22 Thread Lucas Taylor
ridge. That's not terribly interesting, but the point is that there are probably other workflows that are effective and it would be useful if they could be documented and shared easily. I created a ticket to address some of these points and carry on the docs discussion elsewhere. If it s

Re: [Twisted-Python] logging in twisted based projects

2013-03-14 Thread Lucas Taylor
On Mar 14, 2013, at 3:05 AM, Sergey Gerasimov wrote: > I’m implementing some project based on twisted. > > I would like to use some logging mechanism in my modules and see both twisted > generated log records and log records from my modules > and be able to filter log records by level and sou

Re: [Twisted-Python] AMQP listening and user-facing daemon

2013-07-10 Thread Lucas Taylor
On Jul 8, 2013, at 3:31 PM, Justin Chiu wrote: > Hi all, > > *I posted this to python-list and tutor-list and received no replies. Any > advice would be much appreciated. Thank you.* > > What is the best approach to writing a concurrent daemon that can execute > callbacks for different types

[Twisted-Python] Serial transport protocol logging on Raspberry Pi

2013-08-23 Thread Lucas Taylor
I have written a simple serial-to-serial logging proxy in order to discover and document the protocol used by two hardware devices. The goal is to incrementally replace one of the devices with a Twisted application, but right now I'm just trying to gather data. A RaspberryPi seemed ideal for th

Re: [Twisted-Python] Serial transport protocol logging on Raspberry Pi

2013-08-24 Thread Lucas Taylor
On Aug 23, 2013, at 1:53 PM, Phil Mayers wrote: > On 08/23/2013 06:39 PM, Lucas Taylor wrote: > >> I suppose the obvious answer may be that the Pi is underpowered for >> this task, but I am hoping to better understand why. I may be able >> to defer logging to a queue o

Re: [Twisted-Python] serial communication - getting started

2013-10-21 Thread Lucas Taylor
On Oct 21, 2013, at 6:57 AM, Robert Voigtländer wrote: > Thanks for the fast reply. > I don't yet understand your answer. I may have to dig more into Python. > > On 21 October 2013 13:45, Itamar Turner-Trauring wrote: > > 3. A reasonable place for the write() might be in your Protocol's >

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

2013-11-16 Thread Lucas Taylor
On Nov 16, 2013, at 7:09 AM, Tom van Neerijnen wrote: > Hi all > > I'm building a simple TCP load balancer based on a code snippet from Glyph on > SO: > http://stackoverflow.com/questions/4096061/general-question-regarding-wether-or-not-use-twisted-in-tcp-proxy-project > > It's served me well