Re: [Twisted-Python] db connections

2009-03-27 Thread Enrique Samson Jr.
On Wed, 2009-03-25 at 11:00 +0100, Pet wrote: > > Hi, > > > > thanks for example! > > In that way, I'm getting error: > > > > exceptions.AttributeError: MyProtocol instance has no attribute 'factory' > > > > How can MyProtocol access self.factory.dbcon? > > Ups! I didn't followed exactly your exam

[Twisted-Python] Sending domish.Element results to Unpersistable

2009-12-27 Thread Enrique Samson Jr.
Hi, I'm using PB to to send copies of domish.Element instances to another application. I just don't want to parse XML again and thought it would be better to send Element copies and save parsing on the other end. But receiving application just gets an Unpersistable. I'm considering reducing the E

Re: [Twisted-Python] Client Application service.Service

2016-03-18 Thread Enrique Samson Jr.
Hi Tim, I think you need to keep a reference to an instance of your MyClientProtocol. Your example does not show how you actually connected your bot to a server but I assume it follows on the call to load_config on startService. One way to do this: class MyService(Service): def __init__(self):

Re: [Twisted-Python] How do I know the server from reactor.listenTCP already started listening?

2011-09-27 Thread Enrique Samson Jr.
On Tue, Sep 27, 2011 at 4:33 PM, David Kao wrote: > When the call to listenTCP returns, is the server actively waiting for > TCP connections? > Looking at the code here, I would think so. > > Let's

Re: [Twisted-Python] How do I know the server from reactor.listenTCP already started listening?

2011-09-27 Thread Enrique Samson Jr.
On Tue, Sep 27, 2011 at 5:28 PM, David Kao wrote: > I have an existing program that connects to a TCP port to serve data. I > need to > > 1) start a TCPServer 2) start my program and tell it which port to connect to > In case you already did, you might want to take a deeper look again at the Tw

Re: [Twisted-Python] Basic Resource Tree question

2012-03-14 Thread Enrique Samson Jr,
On 03/14/2012 05:46 PM, Lusana Ali wrote: > class Main(Resource): > > def get_child(self, name, request): > print "trying to get main" > return IndexPage() Try changing get_child to getChild. --Enrique ___ Twisted-Python mailing lis

[Twisted-Python] Log file ownership

2012-06-06 Thread Enrique Samson Jr,
Hi, I am running an app as root on Linux using a .tac file and twistd. The application object is initialized with a certain gid and uid. Logging is configured to rotate daily by way of DailyLogFile. However, the log file it creates is owned by root with 600 file permission and log rotation is fail

Re: [Twisted-Python] Log file ownership

2012-06-06 Thread Enrique Samson Jr,
On 6/7/12 10:27 AM, Itamar Turner-Trauring wrote: > On 06/06/2012 08:46 PM, Enrique Samson Jr, wrote: >> Hi, >> >> I am running an app as root on Linux using a .tac file and twistd. The >> application object is initialized with a certain gid and uid. Logging is >>