Move the "b" function to pycompat.

This commit is contained in:
Georg Brandl
2010-07-28 18:43:40 +02:00
parent 24f1d4c12d
commit ec5a5e739b
3 changed files with 10 additions and 8 deletions

View File

@@ -10,7 +10,6 @@
"""
import re
import sys
from util import *
@@ -18,15 +17,10 @@ from docutils import frontend, utils, nodes
from docutils.parsers import rst
from sphinx.util import texescape
from sphinx.util.pycompat import b
from sphinx.writers.html import HTMLWriter, SmartyPantsHTMLTranslator
from sphinx.writers.latex import LaTeXWriter, LaTeXTranslator
if sys.version_info > (3, 0):
def b(s):
return s.encode('utf-8')
else:
b = str
def setup_module():
global app, settings, parser
texescape.init() # otherwise done by the latex builder