(pathOrFile)
return result
Raises NotBinaryPlistException, InvalidPlistException
Raises NotBinaryPlistException, InvalidPlistException
Raises NotBinaryPlistException InvalidPlistException
def readPlist(pathOrFile):
    """Raises NotBinaryPlistException, InvalidPlistException"""
    didOpen = False
    result = None
    if isinstance(pathOrFile, (str, unicode)):
        pathOrFile = open(pathOrFile)
        didOpen = True
    try:
        reader = PlistReader(pathOrFile)
        result = reader.parse()
    except NotBinaryPlistException, e:
        try:
            result = plistlib.readPlist(pathOrFile)
        except Exception, e:
            raise InvalidPlistException(e)
    if didOpen:
        pathOrFile.close()
    return result
def readPlist ( pathOrFile ) : didOpen = False result = None if isinstance ( pathOrFile , ( str , unicode ) ) : pathOrFile = open ( pathOrFile ) didOpen = True try : reader = PlistReader ( pathOrFile ) result = reader . parse ( ) except NotBinaryPlistException , e : try : result = plistlib . readPlist ( pathOrFile ) except Exception , e : raise InvalidPlistException ( e ) if didOpen : pathOrFile . close ( ) return result