Did I find the right examples for you? yes no

All Samples(12)  |  Call(0)  |  Derive(0)  |  Import(12)

src/p/y/python-creole-1.1.1/creole/shared/utils.py   python-creole(Download)
import shlex
 
from creole.py3compat import TEXT_TYPE, PY3, repr2
 
 
    See test_creole2html.TestString2Dict()
    """
    if not PY3 and isinstance(raw_content, TEXT_TYPE):
        # shlex.split doesn't work with unicode?!?
        raw_content = raw_content.encode(encoding)

src/p/y/python-creole-HEAD/creole/shared/utils.py   python-creole(Download)
import shlex
 
from creole.py3compat import TEXT_TYPE, PY3, repr2
 
 
    See test_creole2html.TestString2Dict()
    """
    if not PY3 and isinstance(raw_content, TEXT_TYPE):
        # shlex.split doesn't work with unicode?!?
        raw_content = raw_content.encode(encoding)

src/p/y/python-creole-1.1.1/creole/rest2html/clean_writer.py   python-creole(Download)
 
from creole.exceptions import DocutilsImportError
from creole.py3compat import TEXT_TYPE, PY3
 
try:
    SystemExit: 13
    """
    if not PY3:
        content = unicode(content)
 

src/p/y/python-creole-HEAD/creole/rest2html/clean_writer.py   python-creole(Download)
 
from creole.exceptions import DocutilsImportError
from creole.py3compat import TEXT_TYPE, PY3
 
try:
    SystemExit: 13
    """
    if not PY3:
        content = unicode(content)
 

src/p/y/python-creole-1.1.1/creole/html_tools/deentity.py   python-creole(Download)
    from html import entities # python 3
 
from creole.py3compat import PY3
 
 
    def replace_number(self, text):
        """ unicode number entity """
        unicode_no = int(text)
        if PY3:
            return chr(unicode_no)
    def replace_hex(self, text):
        """ hex entity """
        unicode_no = int(text, 16)
        if PY3:
            return chr(unicode_no)
        else:
            codepoint = entities.name2codepoint[text]
            if PY3:
                return chr(codepoint)
            else:

src/p/y/python-creole-HEAD/creole/html_tools/deentity.py   python-creole(Download)
    from html import entities # python 3
 
from creole.py3compat import PY3
 
 
    def replace_number(self, text):
        """ unicode number entity """
        unicode_no = int(text)
        if PY3:
            return chr(unicode_no)
    def replace_hex(self, text):
        """ hex entity """
        unicode_no = int(text, 16)
        if PY3:
            return chr(unicode_no)
        else:
            codepoint = entities.name2codepoint[text]
            if PY3:
                return chr(codepoint)
            else:

src/p/y/python-creole-1.1.1/creole/shared/HTMLParsercompat.py   python-creole(Download)
# ------------------------------------------------------------------- add start
from __future__ import division, absolute_import, print_function, unicode_literals
from creole.py3compat import PY3
# --------------------------------------------------------------------- add end
 
    def unescape(self, s):
        if '&' not in s:
            return s
        # -------------------------------------------------------- change start
        if PY3:

src/p/y/python-creole-HEAD/creole/shared/HTMLParsercompat.py   python-creole(Download)
# ------------------------------------------------------------------- add start
from __future__ import division, absolute_import, print_function, unicode_literals
from creole.py3compat import PY3
# --------------------------------------------------------------------- add end
 
    def unescape(self, s):
        if '&' not in s:
            return s
        # -------------------------------------------------------- change start
        if PY3:

src/p/y/python-creole-1.1.1/creole/setup_utils.py   python-creole(Download)
from creole import creole2html, html2rest
from creole.shared.unknown_tags import raise_unknown_node, transparent_unknown_nodes
from creole.py3compat import PY3
 
 
            emitter_kwargs={"unknown_emit":unknown_emit}
        )
        if PY3:
            long_description_rest = long_description_rest_unicode
        else:

src/p/y/python-creole-HEAD/creole/setup_utils.py   python-creole(Download)
from creole import creole2html, html2rest
from creole.shared.unknown_tags import raise_unknown_node, transparent_unknown_nodes
from creole.py3compat import PY3
 
 
            emitter_kwargs={"unknown_emit":unknown_emit}
        )
        if PY3:
            long_description_rest = long_description_rest_unicode
        else:

  1 | 2  Next