[Twisted-Python] getPeer() inside conch

2009-09-28 Thread Benjamin Rutt
t inside a conch ssh server? (For starters, I wish to log all successful client connections so I know who's connecting). I searched and found the below issue. I assume it is related, but could someone confirm? http://twistedmatrix.com/trac/ticket/2453

Re: [Twisted-Python] getPeer() inside conch

2009-09-29 Thread Benjamin Rutt
The code: print 'hello, peer %s' % (self.terminal.transport.getPeer()) Fails with: AttributeError: SSHSessionProcessProtocol instance has no attribute 'getPeer' One possible patch to twisted 8.2.0's conch/ssh/session.py's SSHSessionProcessProtocol class to add a getPeer() method would b

Re: [Twisted-Python] getPeer() inside conch

2009-10-01 Thread Benjamin Rutt
(A/B) it looks like the SSHChannel implementation of getPeer() is faulty. If I change my two-line implementation of getPeer() inside SSHSessionProcessProtocol to simply 'return self.session.getPeer()', I get: File "/home/ruttbe/dev/python/twisted-8.2.0-inst/lib/python/twisted/conch/ssh/session.p

[Twisted-Python] complete producer/consumer example

2009-12-14 Thread Benjamin Rutt
connection lost from IPv4Address(TCP, '127.0.0.1', 54859) connection made from IPv4Address(TCP, '127.0.0.1', 54864) pausing connection from IPv4Address(TCP, '127.0.0.1', 54864) pausing connection from IPv4Address(TCP, '127.0.0.1', 54864) pausing connection f

Re: [Twisted-Python] complete producer/consumer example

2009-12-15 Thread Benjamin Rutt
Ok, this is done. See http://twistedmatrix.com/trac/ticket/4171. I decided to start by just adding the example. For me to rework the whole howto around this example, I'm afraid I'd need to understand how it all works a bit more than I do now. So, baby steps first. Do you need anything more fro

[Twisted-Python] waiting on any deferred in a list?

2016-04-24 Thread Benjamin Rutt
one (default behavior), or getting the first one that's ready (fireOnOneCallback=True). I want all results, but I want the processing of the results to unfold as the results come in. Thanks for any ideas. -- Benjamin Rutt ___ Twisted-Python maili

[Twisted-Python] integrating a python REPL into my existing twisted application

2011-05-25 Thread Benjamin Rutt
Dear twisted-python, I’m trying to integrate a python REPL into my existing twisted 8.2.0 client-side program (which talks to another twisted server running a custom protocol). This client side program uses twisted.internet.stdio.StandardIO already to interact with the user, to read commands from

Re: [Twisted-Python] integrating a python REPL into my existing twisted application

2011-05-27 Thread Benjamin Rutt
On Thu, May 26, 2011 at 9:38 AM, wrote: > > In addition to what Andrew said, I'll also point out that rather than > making code that expects blocking writes to stdout work by putting > stdout back into blocking mode, you can make it work by instead > providing a stdout which will buffer anything

[Twisted-Python] twisted and kerberos

2011-09-15 Thread Benjamin Rutt
artReading() self.transport.startWriting() to let twisted take over the socket again for the rest of the conversation. So in the event there are no ready-to-go twisted libraries for kerberos, is the above approach totally insane? -- Benjamin Rutt ___ Twisted-Python ma

[Twisted-Python] how to ensure writes to stdout via stdio.StandardIO are completed before we shutdown the reactor?

2012-01-31 Thread Benjamin Rutt
top)’ is obviously a hack to let the reactor send out the buffered message before shutting down.  Any ideas? Thanks, -- Benjamin Rutt ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] how to ensure writes to stdout via stdio.StandardIO are completed before we shutdown the reactor?

2012-02-11 Thread Benjamin Rutt
r the output buffer is > completely written. > > Jean-Paul > > ___ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python -- Benjamin Rutt

[Twisted-Python] MemoryError in twisted causes the program to exit, or not

2012-09-27 Thread Benjamin Rutt
allbacks into user code such as dataReceived, outReceived, lineReceived, etc.). i.e. is the observed behavior (that MemoryError in user code is caught and MemoryError in twisted core is not) intentional, or an accident? Thanks, -- Benjamin Rutt ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] inlineCallbacks loses custom exception type?

2012-12-05 Thread Benjamin Rutt
d catch your own custom exceptions. Somehow a generic Exception is constructed. Is there any workaround or is this a known issue? Thanks, -- Benjamin Rutt ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Re: [Twisted-Python] inlineCallbacks loses custom exception type?

2012-12-07 Thread Benjamin Rutt
___ > Twisted-Python mailing list > Twisted-Python@twistedmatrix.com > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python > > > -- Benjamin Rutt ___ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

[Twisted-Python] deferToThread and thrown exceptions break gc - ticket 3853

2013-06-26 Thread Benjamin Rutt
Hi, I believe I hit http://twistedmatrix.com/trac/ticket/3853 in production this week, in the form of what looked like a resource leak, but turned out to be a case of a resource held for much longer than expected. (I'm using python 2.7, and twisted 12.3.0). That is, I had a function invoked by d

Re: [Twisted-Python] deferToThread and thrown exceptions break gc - ticket 3853

2013-06-26 Thread Benjamin Rutt
bviously I'm using CPython, which uses reference counting gc, so there is no reason to delay the reclaim of the SomeClass instance until after the function exit. On Wed, Jun 26, 2013 at 1:03 PM, Christopher Armstrong < ra...@twistedmatrix.com> wrote: > On Wed, Jun 26,

[Twisted-Python] twisted.names.client.getHostByName() vs. reactor.resolve()

2014-07-13 Thread Benjamin Rutt
12.3.0 on linux. Naturally I'm preferring reactor.resolve at this point, as it works better for the hostname in question (it happens to be a hostname that uses a CNAME record to alias to another hostname). Thanks, -- Benjamin Rutt ___ Twisted-P