http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10886
Revision: 10886
Author: valhallasw
Date: 2013-01-11 21:35:15 +0000 (Fri, 11 Jan 2013)
Log Message:
-----------
New monkey-patching to make generate_family_file work again...
Modified Paths:
--------------
trunk/pywikipedia/generate_family_file.py
Modified: trunk/pywikipedia/generate_family_file.py
===================================================================
--- trunk/pywikipedia/generate_family_file.py 2013-01-11 12:01:12 UTC (rev 10885)
+++ trunk/pywikipedia/generate_family_file.py 2013-01-11 21:35:15 UTC (rev 10886)
@@ -40,11 +40,12 @@
import wikipediatools
wikipediatools.get_base_dir = lambda: '.'
-# Monkey-patch os.path.exists to prevent config.py from loading user_config.py
-import os.path
-os.path.exists = lambda x: False
+# Set some config settings
+import config
+config.mylang = 'en'
-# Now we can load family.py
+# Now we can boot the framework
+import wikipedia
import family
class FamilyFileGenerator(object):