http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10915
Revision: 10915 Author: saper Date: 2013-01-14 10:03:33 +0000 (Mon, 14 Jan 2013) Log Message: ----------- Use sys.argv[0] for the usage line
Modified Paths: -------------- trunk/pywikipedia/generate_family_file.py
Modified: trunk/pywikipedia/generate_family_file.py =================================================================== --- trunk/pywikipedia/generate_family_file.py 2013-01-13 20:11:57 UTC (rev 10914) +++ trunk/pywikipedia/generate_family_file.py 2013-01-14 10:03:33 UTC (rev 10915) @@ -328,8 +328,8 @@
if __name__ == "__main__": if len(sys.argv) != 3: - print "Usage: %s <url> <short name>" - print "Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki" + print "Usage: %s <url> <short name>" % sys.argv[0] + print "Example: %s http://www.mywiki.bogus/wiki/Main_Page mywiki" % sys.argv[0] print "This will create the file families/mywiki_family.py"
FamilyFileGenerator(*sys.argv[1:]).run()
pywikipedia-svn@lists.wikimedia.org