Revision: 4113 Author: russblau Date: 2007-08-26 13:28:01 +0000 (Sun, 26 Aug 2007)
Log Message: ----------- remove garbage chars from end of file that were causing SyntaxError
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-08-26 13:07:35 UTC (rev 4112) +++ trunk/pywikipedia/wikipedia.py 2007-08-26 13:28:01 UTC (rev 4113) @@ -1,4 +1,4 @@ -## -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- """ Library to get and put pages on a MediaWiki.
@@ -4507,8 +4507,6 @@ logfile.write(plaintext) logfile.flush()
- - output_lock = threading.Lock() input_lock = threading.Lock() output_cache = [] @@ -4722,7 +4720,8 @@ site = unicode(repr(site).replace(u':',u'_')) filename = '%s_%s__%s.dump' % (name, site, time.asctime()) filename = filename.replace(' ','_').replace(':','-') - f = file(filename, 'wb') #trying to write it in binary #f = codecs.open(filename, 'w', 'utf-8') + f = file(filename, 'wb') #trying to write it in binary + #f = codecs.open(filename, 'w', 'utf-8') f.write(u'Error reported: %s\n\n' % error) try: f.write(data.encode("utf8")) @@ -4758,4 +4757,3 @@ print 'Pywikipediabot %s' % version.getversion() print 'Python %s' % sys.version doctest.testmod() -