On Thu, Sep 9, 2010 at 2:33 PM, wrote:
> On 09:42 am, petshm...@googlemail.com wrote:
>>Hello,
>>
>>if an error occurs in HTTP11ClientProtocol request method
>>(twisted.web._newclient) then error is stored in
>>RequestGenerationFailed Exception and wrapped in Failure object:
>>
>>
>> def e
Hello,
if an error occurs in HTTP11ClientProtocol request method
(twisted.web._newclient) then error is stored in
RequestGenerationFailed Exception and wrapped in Failure object:
def ebRequestWriting(err):
if self._state == 'TRANSMITTING':
self._state = 'GENER
On Mon, Aug 30, 2010 at 1:56 PM, Itamar Turner-Trauring
wrote:
> On Mon, 2010-08-30 at 10:54 +0200, Pet wrote:
>> Hello!
>>
>> I have modified Agent.request method (twisted.web.client.Agent) to
>> pass timeout parameter to
>> d = cc.connectTCP(host, port, timeout
Hello!
I have modified Agent.request method (twisted.web.client.Agent) to
pass timeout parameter to
d = cc.connectTCP(host, port, timeout=timeout)
but it looks like timeout is ignored (cbConnected is called). Is this
known issue?
Thanks!
___
Twisted-P
y code, I'm not calling it anywhere. so
it must be framework holding reference returned by getChild. Well now
after some minutes they were destroyed.
Thanks
Pet
>
> Jean-Paul
>
>
> ___
> T
On Thu, Aug 5, 2010 at 5:01 PM, wrote:
> On 02:21 pm, petshm...@googlemail.com wrote:
>>
>> On Thu, Aug 5, 2010 at 3:32 PM, Alan Franzoni wrote:
>>>
>>> On 8/4/10 1:30 PM, Pet wrote:
>>>>
>>>> AFAIU this works only if Factory is subclass
On Thu, Aug 5, 2010 at 5:01 PM, wrote:
> On 02:21 pm, petshm...@googlemail.com wrote:
>>
>> On Thu, Aug 5, 2010 at 3:32 PM, Alan Franzoni wrote:
>>>
>>> On 8/4/10 1:30 PM, Pet wrote:
>>>>
>>>> AFAIU this works only if Factory is subclass
On Thu, Aug 5, 2010 at 3:32 PM, Alan Franzoni wrote:
> On 8/4/10 1:30 PM, Pet wrote:
>
>> AFAIU this works only if Factory is subclassing
>> protocol.ServerFactory, XMLRPCFactory subclasses server.Site, where
>> protocol attribute is not present
>
> server.Site subc
On Wed, Aug 4, 2010 at 2:13 PM, Itamar Turner-Trauring
wrote:
> On Wed, 2010-08-04 at 12:00 +0200, Pet wrote:
>
>> Now, for XMLRPC this looks for me like Protocol instance is reused for
>> all connection. If it is so, can I change this behavior, so I have one
>>
On Wed, Aug 4, 2010 at 12:25 PM, Alan Franzoni wrote:
> Just ovverride the "protocol" attribute on your factory with the
> callable you want to be called when a new protocol needs to be
Hello Alan,
AFAIU this works only if Factory is subclassing
protocol.ServerFactory, XMLRPCFactory subclasses s
PC this looks for me like Protocol instance is reused for
all connection. If it is so, can I change this behavior, so I have one
instance of Protocol per connection?
Thanks for help!
Pet
class MyXMLRPCFactory(server.Site):
def __init__(self):
self.db = adbapi.ConnectionPool()
self.r
and that's not allowed.
That is why it not worked. I should redesign my application.
Thanks!
>
> Jean-Paul
>>Thanks for help!
>>Pet
>>
>>
>>class Test:
>> def __init__(self, cursor):
>> self.cursor = cursor
>>
>> def t
ested runInteraction ok?
Thanks for help!
Pet
class Test:
def __init__(self, cursor):
self.cursor = cursor
def test(db, params):
if params.get('query'):
params['q'] = self.someFunc3(db, params)
def processResults(results, out):
On Thu, May 6, 2010 at 4:37 PM, wrote:
> On 02:30 pm, petshm...@googlemail.com wrote:
>>Hello!
>>
>>Is it possible to print multiline debug messages into log?
>>
>>If print a query it looks like this
>>
>>
>>2010-05-06 10:10:07 [HTTPChannel,0,192.168.2.15]
>>SELECT *
>>2010-05-06 10:10:07 [HTTPCh
Hello!
Is it possible to print multiline debug messages into log?
If print a query it looks like this
2010-05-06 10:10:07 [HTTPChannel,0,192.168.2.15] SELECT *
2010-05-06 10:10:07 [HTTPChannel,0,192.168.2.15]
FROM foo AS a
2010-05-06 10:10:07 [HTTPChannel,0,192.168.2.15]
JOI
On Wed, May 5, 2010 at 4:54 PM, Itamar Turner-Trauring
wrote:
> On Wed, 2010-05-05 at 16:47 +0200, Pet wrote:
>> Now, I'm getting Exception with
>>
>> File
>> "/usr/local/tw10/lib/python2.5/site-packages/Twisted-10.0.0-py2.5-linux-x86_64.egg/tw
On Wed, May 5, 2010 at 4:29 PM, Pet wrote:
> On Wed, May 5, 2010 at 4:15 PM, Pet wrote:
>> On Wed, May 5, 2010 at 2:49 PM, Itamar Turner-Trauring
>> wrote:
>>> On Wed, 2010-05-05 at 13:45 +0200, Pet wrote:
>>>> Hello!
>>>>
>>>> I
On Wed, May 5, 2010 at 4:15 PM, Pet wrote:
> On Wed, May 5, 2010 at 2:49 PM, Itamar Turner-Trauring
> wrote:
>> On Wed, 2010-05-05 at 13:45 +0200, Pet wrote:
>>> Hello!
>>>
>>> I'm using Twisted 10.0 and as usually sometime print debug infos with
>
On Wed, May 5, 2010 at 2:49 PM, Itamar Turner-Trauring
wrote:
> On Wed, 2010-05-05 at 13:45 +0200, Pet wrote:
>> Hello!
>>
>> I'm using Twisted 10.0 and as usually sometime print debug infos with
>> myunicodestr.encode('UTF-8') which are saved to logfile,
On Wed, May 5, 2010 at 2:47 PM, Phil Mayers wrote:
> On 05/05/10 13:31, Pet wrote:
>> On Wed, May 5, 2010 at 2:05 PM, Maarten ter Huurne
>> wrote:
>>> On Wednesday 05 May 2010, Pet wrote:
>>>
>>>> I'm using Twisted 10.0 and as usually someti
On Wed, May 5, 2010 at 2:05 PM, Maarten ter Huurne
wrote:
> On Wednesday 05 May 2010, Pet wrote:
>
>> I'm using Twisted 10.0 and as usually sometime print debug infos with
>> myunicodestr.encode('UTF-8') which are saved to logfile, but sinc
Hello!
I'm using Twisted 10.0 and as usually sometime print debug infos with
myunicodestr.encode('UTF-8') which are saved to logfile, but since
using twisted 10 I'm getting
UnicodeEncodeError: 'ascii' codec can't encode characters...
type(myunicodestr) returns
What is the problem here?
Thank
On Tue, Apr 27, 2010 at 5:28 PM, wrote:
> On 02:43 pm, petshm...@googlemail.com wrote:
>>
>>Hi,
>>
>>I can't install Twisted in VirtualEnv. Can someone explain what is
>>wrong, please? Thanks!
>>
>>
>>(newtwisted)hostname:/usr/local/development/newtwisted/bin#
>>easy_install Twisted
>>[snip]
>>Ru
On Sat, Feb 13, 2010 at 6:05 AM, Glyph Lefkowitz
wrote:
> On Feb 11, 2010, at 5:27 PM, Timothy Allen wrote:
>
>> On Thu, 11 Feb 2010 11:54:47 -0600
>> Kevin Horn wrote:
>>> Not entirely related to this discussion (though not entirely
>>> unrelated), I think that Twisted's whole release/distributi
functions which runs in other threads?
Thanks!
Pet
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
On Thu, Feb 11, 2010 at 1:55 PM, Matt Bone wrote:
> You could try virtualenv:
>
> http://pypi.python.org/pypi/virtualenv
>
> And have one virtual environment with Twisted 9.0 and another with
> Twisted 8.2, etc, etc.
>
Thanks! Will try it out
> --matt
>
> On Thu
Hi,
I'd like to upgrade twisted to the newest version and obviously first
test if my application works fine with new version. What is the best
(safest) way to do it?
Thanks for help, Pet
___
Twisted-Python mailing list
Twisted-Python@twistedmatri
On Thu, Jan 28, 2010 at 9:46 AM, Pet wrote:
> On Fri, Jan 22, 2010 at 10:21 PM, Lucas Taylor
> wrote:
>> 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 Fri, Jan 22, 2010 at 10:21 PM, Lucas Taylor wrote:
> 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
>>>>
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:
>>>
>>>> This can occur if you have multip
ogfile.LogFile somewhere?
>
> Maybe twistd's log rotation?
Yes, may be. I start my daemon with
/usr/bin/twistd -y mydaemon.py --logfile=/var/log/my.log
--pidfile=/var/lock/mydaemon.pid
How do I start twistd, so it doesn't produce own log file?
Thanks for help!
root root 301K 2010-01-20 13:26 /var/log/my.log
it writes simultaneously to both my.log.5 and my.log. It is not big
problem, but in this way I have only recent files, because they grows
quickly
Pet
from twisted.python import log
from twisted.python import logfile
from twisted.application import
ult from callRemote method.
>>
>>Thanks for any help!
>>
>>Pet
>>
>>class Cred:
>>
>> �...@inlinecallbacks
>> def login(self):
>> proxy = Proxy(LOGIN_PROXY)
>> l = {"user":LOGIN_USERNAME, "
Hi,
calling in client code self.cred.login() I can't print login result.
What I'm doing wrong? login method returns deffered, but should yield
result from callRemote method.
Thanks for any help!
Pet
class Cred:
@inlineCallbacks
def login(self):
proxy = Proxy(L
ed
>
> # same as above, code won't get executed until "secondDeferred" has a
> result
>
> then you'll get the behavior you're looking for.
>
> See
> http://twistedmatrix.com/documents/8.2.0/api/twisted.internet.defer.html#inlineCallbacks
> for s
On Tue, Sep 15, 2009 at 6:21 PM, Pet wrote:
> On Tue, Sep 15, 2009 at 5:19 PM, Mark Visser wrote:
>> exar...@twistedmatrix.com wrote:
>>> On 10:37 am, petshm...@googlemail.com wrote:
>>>>
>>>> I'd like to run several queries in background, so
yield db.runInteraction(two)
> except:
> pass
>
> try:
> yield db.runInteraction(three)
> except:
> pass
>
> Or with callback/errbacks, like this:
>
> def someInteractions(db)
> d = db.runInteraction(one).addBoth(db.runInt
Hi,
I'd like to run several queries in background, some of them may fail.
Currently, I do runInteraction for each query. Is there a way to run
them all in one deferred, so that if one of them fails, other are not
aborted?
Thanks in advance!
On Wed, Aug 12, 2009 at 6:51 PM, wrote:
> On 03:28 pm, petshm...@googlemail.com wrote:
>>Hello,
>>
>>does pyPgSQL doesn't support unicode?
>>
>>execute(query, params) #all items in params list are of >'unicode'>
>>
>>I'm getting
>>'ascii' codec can't encode character u'\xfc' in position 1: ordina
decode all
results back to unicode?
Pet
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Hi,
I'm trying to process several items in callback function writeLog
d.addCallback(self.writeLog,g=g)
see below.
Can writeLog return DeferredList instead of Deferred?
WriteLog should run several inserts into db (some of which may fail).
Or am I completely wrong here?
Thanks
On Tue, May 19, 2009 at 11:48 AM, Pet wrote:
> On Tue, May 19, 2009 at 10:59 AM, wrote:
>> On 07:51 am, petshm...@googlemail.com wrote:
>>>after playing with reactor, factory and protocol, I'm trying to
>>>implement XML-RPC server, but it seems that it is not a
On Tue, May 19, 2009 at 10:59 AM, wrote:
> On 07:51 am, petshm...@googlemail.com wrote:
>>after playing with reactor, factory and protocol, I'm trying to
>>implement XML-RPC server, but it seems that it is not able to handle
>>several clients in parallel. If I call the slow function with first
>>
sults after slow function returned. There is no
factory for clients in server.Site() like in Protokoll? What is the
way to do that for XML-RPC?
Thanks for your help!
Pet
from twisted.web import xmlrpc, server
from twisted.application import internet
from time import sleep
PORT = 1
MyObj(self.db), but it doesn't work and runInteraction passes
automatically db variable to interaction method.
I'm new to Python and Twisted and would appreciate your advises.
Pet
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
On Sat, Mar 28, 2009 at 2:32 AM, Enrique Samson Jr. wrote:
> 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 in
On Wed, Mar 25, 2009 at 10:22 AM, Pet wrote:
> On Tue, Mar 24, 2009 at 6:10 PM, Alvin Delagon wrote:
>> Something like this:
>>
>> from twisted.protocols import basic
>> from twisted.internet import protocol, reactor
>> from twisted.enterprise imp
adbapi.ConnectionPool("pyPgSQL.PgSQL", database="data",
> user='pet', host='local', password='some')
>
> if __name__ == "__main__":
> reactor.listenTCP(8080, MyFactory())
> reactor.run()
>
> I usually put persist
ue, Mar 24, 2009 at 6:45 AM, Alvin Delagon wrote:
>> Put self.dbcon in the MyFactory class. MyProtocol instances can access it
>> via self.factory.
>>
>>
>> On Tue, Mar 24, 2009 at 6:10 PM, Pet wrote:
>>>
>>> Hi,
>>>
>>> I've wrote
I do as you suggested.
>
>
> On Tue, Mar 24, 2009 at 6:10 PM, Pet wrote:
>>
>> Hi,
>>
>> I've wrote an daemon which does some queries to db and sends response
>> back to client. Do I need to make for every request from client (new
>> insta
pass it to Protocol? But what happens if too much
clients are connected to server? What is the way to control it?
Regards, Pet
class MyProtocol(basic.LineReceiver):
def __init__(self):
print "new connection"
self.dbcon = adbapi.ConnectionPool("pyPgSQL.Pg
On Wed, Mar 18, 2009 at 1:19 PM, Jean-Paul Calderone wrote:
> On Wed, 18 Mar 2009 13:10:12 +0100, Pet wrote:
>>
>> Hi,
>>
>> in LineReceiver there is MAX_LENGTH = 16384 limitation. Is it possible
>> to set it bigger at start of an application?
>
> It's
Hi,
in LineReceiver there is MAX_LENGTH = 16384 limitation. Is it possible
to set it bigger at start of an application?
Regards, Pet
___
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo
On Mon, Mar 9, 2009 at 9:02 PM, Drew Smathers wrote:
> On Mon, Mar 9, 2009 at 8:02 AM, Pet wrote:
>> Hello,
>>
>> I'm trying an example from twisted book and when I run this:
>> twistd -n reverse_app.py
>>
>> application works, but no .tap file is cre
Hello,
I'm trying an example from twisted book and when I run this:
twistd -n reverse_app.py
application works, but no .tap file is created
Another question, how are twisted daemons actually stopped?
Pet
reverse_app.py
from twisted.application import service
import reverse
applic
On Tue, Mar 3, 2009 at 2:04 PM, Tim Allen wrote:
> On Tue, Mar 03, 2009 at 01:17:48PM +0100, Pet wrote:
> > what is a proper way to escape user input in database query strings?
> > I've used quote from twisted.enterprise.util, but it is deprecated now.
> > Is there
Hi,
what is a proper way to escape user input in database query strings?
I've used quote from twisted.enterprise.util, but it is deprecated now.
Is there any other module for this purpose?
Thanks, Pet
___
Twisted-Python mailing list
Twisted-P
57 matches
Mail list logo