diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-07-16 00:12:35 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2015-07-16 00:12:35 +0300 |
commit | 45b2027439e96c366e188a12bd831802d30bbddc (patch) | |
tree | 4333fb83ed667b1000f3d6bf71bc11b44e76c468 /wiki2text.py | |
parent | 6f963022315d4306f50f2e7046f2872cfd3c0500 (diff) | |
download | wit-45b2027439e96c366e188a12bd831802d30bbddc.tar.gz wit-45b2027439e96c366e188a12bd831802d30bbddc.tar.bz2 |
Support for Python 3
* wiki2html.py: Import urllib.parse if importing urllib fails.
Use list comprehensions to build lists from maps.
* wiki2texi.py: Use 'in' instead of has_key.
Use list comprehensions to build lists from maps.
* wiki2text.py: Likewise.
* wikicvt.py: Use print function.
Import StringIO from io if unable to import is as a module
* wikimarkup.py: Use print function.
Fix some UTF strings.
Diffstat (limited to 'wiki2text.py')
-rw-r--r-- | wiki2text.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wiki2text.py b/wiki2text.py index 6308da1..916391e 100644 --- a/wiki2text.py +++ b/wiki2text.py @@ -16,7 +16,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. from wikimarkup import * -from types import TupleType from wikins import wiki_ns_re, wiki_ns import re import urllib @@ -68,7 +67,7 @@ class TextWikiMarkup (WikiMarkup): def fmtlink(self, elt, istmpl): arg = self.format(elt['content'][0]) if len(elt['content']) > 1: - s = map(self.format, elt['content']) + s = [x for x in map(self.format, elt['content'])] text = s[1] else: s = None |