hi there, folks:
I'd really like to release 0.7.0 but I would like it to be at least a
little bit tested before I do so. Could those of you with CVS trees check
everything out and see if it performs as advertised? Deeper bugs than
that will have to wait for the next release, but I'd at least like to know
if it works for someone other than me.
______ __ __ _____ _ _
| ____ | \_/ |_____] |_____|
|_____| |_____ | | | |
@ t w i s t e d m a t r i x . c o m
I have an xml file in my application,
I have created an element using
Example goes like this.........
and i appeneded it by using append() method.
But how i can reflect this change to my xml file?
and one more thing is i want to create element with some other parameters....
<abc m=" " n=" ">
and i have m and n values as strings with me.
can anybody help me to create this element and write it to the existing xml file
as a child of an existing element?
Thanks in advance..
Forgot the famous last words? Access your message archive online at http://in.messenger.yahoo.com/webmessengerpromo.php
On 18 May 2004, the following message was posted to this mailinglist:
Jp Calderone exarkun at divmod.com wrote:
>Daniel Newton wrote:
> I have a simple XML-PRC server similar to the example below:
> from twisted.web import xmlrpc, server
> class Example(xmlrpc.XMLRPC):
> """An example object to be published."""
> def xmlrpc_add(self, a, b):
> """Return sum of arguments."""
> return a + b
> if __name__ == '__main__':
> from twisted.internet import reactor
> r = Example()
> reactor.listenTCP(7080, server.Site(r))
> I want to be able to get the address of the client that calls the
> method can anyone help me with this?
This solution didn't work because 'transport' isn't a property of the
I'm currently in the process of changing from a customized
SimpleXMLRPCServer to a twisted XMLRPC server solution and I need to
insert the client IP into the attributes passed to the called xmlrpc
method. Anyone who knows the answer and is willing to share the info?
raise NetstringParseError, "netstring too long"
def dataReceived(self, data):
self.brokenPeer = 1
The error message "netstring too long" is shadowed by the except
block. I'd like to see it in my log files.
Would it make sense to emit logging messaged for those errors, or is
there any particular reason why they are silenced?
It's been a while, I know you were all waiting with baited breath...
First a few fixes:
- Thanks to Tim Allen and Steve Steiner, several theme issues were fixed.
fixes a few minor display bugs and should make pages validate properly.
- inline markup will now include child contents. This causes rst not to
properly in cases of "nested inline markup", but should make it easier to
manually fix these places later
- :download: links are now generated for non-rst files ending in .py (most
examples), as welll as .tac and .sql files
- toc entries which end in a "/" character now have "index appended to them
in the ReST output, which fixes a few issues where the built-Sphinx docs
would end up with broken navigation links.
A couple of issues were also fixed at the PyCon sprints:
- <cite> tags are now handled...sort of. According to Glyph, these aren't
very important, so we just return the contents of the tag without any
markup. If we feel the need to put citation markup back into the docs we
do that post-transition.
- Glyph also found an easy way to improve the CSS of the theme somewhat.
issue where the sidebar drops below the main content should now be less of
problem, though it's not gone entirely.
- Glyph and I also discussed a few different ways to handle links to the API
and agreed on a way forward. Basically, well change the <code
tags into something like: :api:`path.to.documented object <label>`, and
create a docutils extension to convert that into a link. The beginnings
are in the hg repos, but it looks like it won't be quite as simple as we
First, the way pydoctor generates links is deceptively simple.
If you look up a module, like "twisted.internet.defer", the link looks
If you look up a class, like "twisted.internet.defer.Deferred" for
the link looks like this:
Pretty simple right? But if you look up a function or method like
"twisted.internet.defer.Deferred.callback", the link has an anchor, like
So we'll need to do some checking on either the api docs or on twisted
to determine what sort of object is being linked to. Shouldn't be
super-difficult, just haven't had time yet.
Second, I haven't yet figured out how to access the Sphinx config object
a docutils role function. I'm sure this is just a matter of finding an
or getting an answer from the mailing list, but I just haven't gotten to
I think the API links are the only major issue still remaining until we
the conversion, so once this issue is handled, I'll probably file a ticket
a branch in SVN for the conversion.
If anyone has any docs tickets open, now is the time to get them fixed!
And if anyone has some great ideas about how to organize the new docs in the
repository, I'd love to hear them.
As always, converted docs are here:
The lore2Sphinx Hg repos is here:
Comments, ideas, patches and pull requests gratefully accepted (or at least
I need to create a COM object in a Windows application, and call it.
Since the call will take some time to execute, I wrap it in a deferToThread.
I've found that, when I create the object inline, it works. However,
when I defer it, it hangs up in the win32com.client.Dispatch call. I've
tried several things, including digging into the guts of Dispatch -- the
hangup occurs during the creation of the object.
I've discussed this with Mark Hammond, who suggests one lead:
"The Windows message loop is used by the COM marshalling process. IIRC,
the first thread to initialize COM in a process is the thread in which
single-threaded objects will always end up being called in. If a
different thread creates the object, COM uses Windows messages to
marshall all calls back to that main thread. IOW, your second thread
makes a call - even to create the object - which results in that thread
sending a windows message to the main thread to act on the request.
What this probably means in practice is that twisted needs to use a
reactor which calls MsgWaitForMultipleObjects() and runs a message loop
when the function detects a new message is in the queue. I'm not sure
if there is an existing reactor which does this."
I'm posting this on the off chance that someone else has wandered into
this corner of Windows arcana, and has come up with something useful.
I'm about to give up on doing this "inside" the twisted app, and running
it in a separate app that I'll call from the thread.
Advanced Publishing Technology
I think we should give screwtape an SVN account and make him an official reviewer. He's been doing a lot of work on the distutils code which would be made easier by that, and he's been doing pretty decent reviews.
Thoughts? (Feel free to voice any comments off-list, too.)
I'm trying to process results from several Deferreds (d1, d2) with
DeferredList, merging it into one list and sending back to client.
While merging works, the client has no results. What is the way to do
tasks (db queries in my case) in parallel and then merge results?
BTW, are nested runInteraction ok?
Thanks for help!
def __init__(self, cursor):
self.cursor = cursor
def test(db, params):
params['q'] = self.someFunc3(db, params)
def processResults(results, out):
#merge results into one
for _, r in results:
out = 
d1 = self.cursor.runInteraction(self.someFunc, params)
d2 = self.cursor.runInteraction(self.someFunc2, params)
d = DeferredList([d1,d2])
self.db = adbapi.ConnectionPool()
def xmlrpc_test(self, param):
t = Test(self.db)
return self.db.runInteraction(t.test, param)