Port pelican to python 3.

Stays compatible with 2.x series, thanks to an unified codebase.
This commit is contained in:
Dirk Makowski 2013-01-11 02:57:43 +01:00 committed by Alexis Métaireau
commit 71995d5e1b
43 changed files with 495 additions and 287 deletions

View file

@ -1,13 +1,15 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
__all__ = [
'get_article',
'unittest',
]
import cStringIO
import os
import re
import subprocess
import sys
from six import StringIO
import logging
from logging.handlers import BufferingHandler
@ -101,7 +103,7 @@ def mute(returns_output=False):
def wrapper(*args, **kwargs):
saved_stdout = sys.stdout
sys.stdout = cStringIO.StringIO()
sys.stdout = StringIO()
try:
out = func(*args, **kwargs)