[Pywikipedia-l] Replace.py should save -- please comment

Merlijn van Deen valhallasw at arctus.nl
Sat Oct 23 13:08:42 UTC 2010


On 23 October 2010 12:13, Bináris <wikiposta at gmail.com> wrote:

> quitting with "q". Not applicable with ctrl C. Here is a little bug, the
> counter cannot check if put_async _will_ be successful.
>

It can.

    def put_async(self, newtext,
                  comment=None, watchArticle=None, minorEdit=True, force=False,
                  callback=None):
(...)
        callback: a callable object that will be called after the page put
                  operation; this object must take two arguments:
                  (1) a Page object, and (2) an exception instance, which
                  will be None if the page was saved successfully.

Just make sure you know how to do multithreading, or this will come back to
bite you. (No, incrementing a global variable is not the right way.)

Best regards,
Merlijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wikimedia.org/pipermail/pywikipedia-l/attachments/20101023/816882c3/attachment.htm 


More information about the Pywikipedia-l mailing list