This is a nice script, I like the idea, thanks. Some remarks:<br><br><div class="gmail_quote">2011/6/12  <span dir="ltr">&lt;<a href="mailto:multichill@svn.wikimedia.org">multichill@svn.wikimedia.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<a href="http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9294" target="_blank">http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9294</a><br>
+-alway          (not implemented yet) Don&#39;t ask, just do the edit.<br></blockquote><div>A small typo in always.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

+__version__ = &#39;$Id: create_categories.py 9042 2011-03-13 10:14:47Z xqt $&#39;<br></blockquote><div>Must have remained in accidentally, as well as a long series of unused imports.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

+    newpage = pywikibot.Page(pywikibot.getSite(u&#39;commons&#39;, u&#39;commons&#39;),<br>
+                                 u&#39;Category:&#39; + basename + u&#39; &#39; + title)<br></blockquote><div>At this point, it seems to work only for Commons, and not using the -lang and -family parameters given in the example.<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
+    newtext = u&#39;&#39;<br>
+    newtext += u&#39;[[Category:&#39; + parent + u&#39;|&#39; + title + u&#39;]]\n&#39;<br></blockquote><div>While &quot;Category&quot; works for all wikiprojects as default, <span style="font-family: courier new,monospace;">site.namespace(14)</span> would be more appropriate for use outside of Commons (preventing the bot owner of getting angry messages pointing out the advantages of mother tongue).<br>
 </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
+    newtext += u&#39;[[Category:&#39; + title + u&#39;]]\n&#39;<br></blockquote><div>This should be optional. In other wikis it is not sure that all the topics have an own category; as a matter of fact, I looked at User:Multichill/Wallonia in Commons that has also a few red links.<br>
<br></div></div><br>-- <br>Bináris<br>