(path)
return False
Guess whether a path refers to a package directory.
Guess whether a path refers to a package directory.
Guess whether a path refers to a package directory .
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False
def ispackage ( path ) : if os . path . isdir ( path ) : for ext in ( '.py' , '.pyc' ) : if os . path . isfile ( os . path . join ( path , '__init__' + ext ) ) : return True return False