def import_from_stdlib(name):
    """Copied from pdbpp https://bitbucket.org/antocuni/pdb"""
    import os
    import types
    import code
    stdlibdir, _ = os.path.split(code.__file__)
    pyfile = os.path.join(stdlibdir, name + '.py')
    result = types.ModuleType(name)
    exec(compile(open(pyfile).read(), pyfile, 'exec'), result.__dict__)
    return result
