def _check_if_pyc(fname):
    from imp import find_module
    from os.path import realpath, dirname, basename, splitext

    # Normalize the file-path for the find_module()
    filepath = realpath(fname)
    dirpath = dirname(filepath)
    module_name = splitext(basename(filepath))[0]

    # Validate and fetch
    try:
        fileobj, fullpath, (_, _, pytype) = find_module(module_name, [dirpath])
    except ImportError:
        raise IOError("Cannot find config file. "
                      "Path maybe incorrect! : {0}".format(filepath))
    return pytype, fileobj, fullpath
Write idle command to shared memory block, so subprocess controller can hibernate.
dataset/ETHPy150Open benoitc/gunicorn/gunicorn/_compat.py/_check_if_pyc--crossover with--dataset/ETHPy150Open wkentaro/conque.vim/autoload/conque_term/conque_sole_wrapper.py/ConqueSoleWrapper.idle