# Path: resources/lib/kindleunpack/compatibility_utils.py
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
# ASCII_CHARS   = set(chr(x) for x in range(128))
# URL_SAFE      = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ'
#                     'abcdefghijklmnopqrstuvwxyz'
#                     '0123456789' '#' '_.-/~')
# IRI_UNSAFE = ASCII_CHARS - URL_SAFE
#     def bchr(s):
#     def bstr(s):
#     def bord(s):
#     def bchar(s):
#     def bchr(s):
#     def bstr(s):
#     def bord(s):
#     def bchar(s):
#     def lrange(*args, **kwargs):
#     def lzip(*args, **kwargs):
#     def lmap(*args, **kwargs):
#     def lfilter(*args, **kwargs):
# def hexlify(bdata):
# def utf8_str(p, enc='utf-8'):
# def unicode_str(p, enc='utf-8'):
# def quoteurl(href):
# def unquoteurl(href):
# def unescapeit(sval):
# def unicode_argv():
# def add_cp65001_codec():


from .compatibility_utils import PY2, text_type, binary_type
import sys
import os
            pass
    return s

def exists(s):
    return os.path.exists(pathof(s))

def isfile(s):
    return os.path.isfile(pathof(s))

def isdir(s):
    return os.path.isdir(pathof(s))

def mkdir(s):
    return os.mkdir(pathof(s))

def listdir(s):
    rv = []
    for file in os.listdir(pathof(s)):
        rv.append(pathof(file))
    return rv

def getcwd():
    if PY2:
        return os.getcwdu()
    return os.getcwd()

def walk(top):
    top = pathof(top)
    rv = []
    for base, dnames, names in os.walk(top):

# Path: resources/lib/kindleunpack/compatibility_utils.py
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
# ASCII_CHARS   = set(chr(x) for x in range(128))
# URL_SAFE      = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ'
#                     'abcdefghijklmnopqrstuvwxyz'
#                     '0123456789' '#' '_.-/~')
# IRI_UNSAFE = ASCII_CHARS - URL_SAFE
#     def bchr(s):
#     def bstr(s):
#     def bord(s):
#     def bchar(s):
#     def bchr(s):
#     def bstr(s):
#     def bord(s):
#     def bchar(s):
#     def lrange(*args, **kwargs):
#     def lzip(*args, **kwargs):
#     def lmap(*args, **kwargs):
#     def lfilter(*args, **kwargs):
# def hexlify(bdata):
# def utf8_str(p, enc='utf-8'):
# def unicode_str(p, enc='utf-8'):
# def quoteurl(href):
# def unquoteurl(href):
# def unescapeit(sval):
# def unicode_argv():
# def add_cp65001_codec():


# Path: resources/lib/kindleunpack/unipath.py
from .compatibility_utils import PY2, text_type, binary_type
import sys
import os

            pass
    return s

def exists(s):
    return os.path.exists(pathof(s))

def isfile(s):
    return os.path.isfile(pathof(s))

def isdir(s):
    return os.path.isdir(pathof(s))

def mkdir(s):
    return os.mkdir(pathof(s))

def listdir(s):
    rv = []
    for file in os.listdir(pathof(s)):
        rv.append(pathof(file))
    return rv

def getcwd():
    if PY2:
        return os.getcwdu()
    return os.getcwd()

def walk(top):
    top = pathof(top)
    rv = []
    for base, dnames, names in os.walk(top):

        base = pathof(base)