Did I find the right examples for you? yes no

All Samples(12)  |  Call(10)  |  Derive(0)  |  Import(2)
unicode(object='') -> unicode object
unicode(string[, encoding[, errors]]) -> unicode object

Create a new Unicode object from the given encoded string.
encoding defaults to the current default string encoding.
errors can be 'strict', 'replace' or 'ignore' and defaults to 'strict'.

src/b/d/bdist_mpkg-0.5.0/bdist_mpkg/plists.py   bdist_mpkg(Download)
from . import __version__ as bdist_mpkg_version
from . import tools
from .py3k import unicode, u, any_str_type
 
def _major_minor(v):
def common_info(name, version):
    # Keys that can appear in any package
    name, version = unicode(name), tools.Version(version)
    major, minor = _major_minor(version)
    return dict(
        CFBundleGetInfoString=u('%s %s' % (name, version)),
        CFBundleIdentifier=u('org.pythonmac.%s' % (name,)),
        CFBundleName=name,
        CFBundleShortVersionString=unicode(version),
        IFRequirementDicts=[path_requirement(u('/'))],
        PythonInfoDict=dict(
            PythonLongVersion=unicode(sys.version),
            PythonShortVersion=unicode(sys.version[:3]),
            PythonExecutable=unicode(sys.executable),

src/b/d/bdist_mpkg-0.5.0/bdist_mpkg/tools.py   bdist_mpkg(Download)
 
from .tmpdirs import InTemporaryDirectory
from .py3k import unicode
 
 
def unicode_path(path, encoding=sys.getfilesystemencoding()):
    if isinstance(path, unicode):
        return path
    return unicode(path, encoding)