def is_module_stdlib(file_name):
    """Returns True if the file_name is in the lib directory."""
    # TODO: Move these calls away from this function so it doesn't have to run
    # every time.
    lib_path = sysconfig.get_python_lib()
    path = os.path.split(lib_path)
    if path[1] == 'site-packages':
        lib_path = path[0]
    return file_name.lower().startswith(lib_path.lower())
def is_module_stdlib ( file_name ) : lib_path = sysconfig . get_python_lib ( ) path = os . path . split ( lib_path ) if path [ 1 ] == 'site-packages' : lib_path = path [ 0 ] return file_name . lower ( ) . startswith ( lib_path . lower ( ) )
Returns True if the file_name is in the lib directory.