# Path: momo/utils.py
# MIN_PAGE_LINES = 50
# PY3 = sys.version_info[0] == 3
# def eval_path(path):
# def smart_print(*args, **kwargs):
# def utf8_decode(s):
# def utf8_encode(s):
# def run_cmd(cmd_str=None, cmd=None, cmd_args=None, stdout=sys.stdout,
#             stderr=sys.stderr, stdin=None):
# def open_default(path):
# def mkdir_p(path):
# def page_lines(lines):


import re
from inspect import getmembers, isfunction
from momo.utils import txt_type, bin_type


FALSE_STR_PATTREN = '^(0|false|False)$'


def get_public_functions(module):
    """Get public functions in a module. Return a dictionary of function names
    to objects."""
    return {
        o[0]: o[1] for o in getmembers(module, isfunction)
        if not o[0].startswith('_')
    }


def str_to_bool(s):
    if re.match(FALSE_STR_PATTREN, s):
        return False
    return True


def to_list(value, sep=','):
    if isinstance(value, list):
        return value

# Path: momo/utils.py
# MIN_PAGE_LINES = 50
# PY3 = sys.version_info[0] == 3
# def eval_path(path):
# def smart_print(*args, **kwargs):
# def utf8_decode(s):
# def utf8_encode(s):
# def run_cmd(cmd_str=None, cmd=None, cmd_args=None, stdout=sys.stdout,
#             stderr=sys.stderr, stdin=None):
# def open_default(path):
# def mkdir_p(path):
# def page_lines(lines):


# Path: momo/plugins/flask/utils.py
import re
from inspect import getmembers, isfunction
from momo.utils import txt_type, bin_type



FALSE_STR_PATTREN = '^(0|false|False)$'


def get_public_functions(module):
    """Get public functions in a module. Return a dictionary of function names
    to objects."""
    return {
        o[0]: o[1] for o in getmembers(module, isfunction)
        if not o[0].startswith('_')
    }


def str_to_bool(s):
    if re.match(FALSE_STR_PATTREN, s):
        return False
    return True


def to_list(value, sep=','):
    if isinstance(value, list):
        return value

    elif isinstance(value, (txt_type, bin_type)):