GSoC/GCI Archive
Google Code-in 2014 Wikimedia Foundation

Pywikibot: Replace optparse with argparse

completed by: mloc

mentors: Fabian, John Vandenberg

Pywikibot is a Python-based framework to write bots for MediaWiki. See for more information. Patches can be submitted via Gerrit (you need a account). More documentation on Gerrit can be found at After you have successfully claimed this task in Google Melange please do use the task in Phabricator for communication instead of Google Melange. This allows more PWB developers to be reached! General development questions can be asked on the Pywikibot mailing list at and the #pywikibot IRC channel (see

The Pywikibot script named "" uses optparse which is deprecated in Python 3.2, this should be replaced by argparse. Another script (named "") already uses argparse which could be uses as an orientation. See also:

Students are required to read Wikimedia's general instructions at first.