Module Expr Str Import alias Import alias Import alias Import alias ClassDef bases NameLoad body Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Slice Num attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num body For NameStore AttributeLoad NameLoad attr body If Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad NameLoad body Return TupleLoad Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad NameLoad NameLoad orelse Return TupleLoad NameLoad NameLoad orelse Return TupleLoad NameLoad SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Raise NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad AttributeLoad NameLoad attr attr body Expr Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad For NameStore AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If UnaryOpNot NameLoad body For NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Return NameLoad Return NameLoad orelse Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num If NameLoad body TryExcept body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num TryExcept body Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad orelse If NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad orelse Return Call NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num TryExcept body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list NameLoad decorator_list
N/A N/A Contains the FileManager and FileInterface base classes. N/A logging N/A os N/A sys N/A mpf.file_interfaces FileInterface N/A object N/A N/A file_types N/A list __init__ N/A N/A self N/A N/A N/A N/A self log N/A N/A logging getLogger N/A N/A {} File Interface format N/A N/A N/A N/A N/A self file_types N/A 0 N/A 1 upper N/A find_file N/A N/A self filename N/A N/A N/A Tests whether the passed file is valid. If the file does not have an
        externsion, this method will test for files with that base name with
        all the extensions it can read.

        Args:
            filename: Full absolute path of a file to check, with or without
                an extension.

        Returns:
            False if a file is not found.
            Tuple of (full file with path, extension) if a file is found

         N/A N/A N/A N/A N/A N/A os path splitext filename N/A 1 N/A N/A extension N/A self file_types N/A N/A N/A N/A N/A os path isfile N/A filename extension N/A N/A N/A N/A N/A N/A os path abspath N/A filename extension extension N/A N/A N/A False None N/A N/A N/A filename N/A N/A N/A N/A os path splitext filename N/A 1 N/A get_config_file_version N/A N/A self filename N/A N/A N/A Gets the config version number from a file. Since this technique
        varies depending on the file type, it needs to be implemented in the
        chile class

        Args:
            filename: The file with path to check.

        Returns:
            An int of the config file version

         N/A NotImplementedError N/A staticmethod load N/A N/A self filename verify_version N/A True N/A N/A NotImplementedError N/A save N/A N/A self filename data N/A N/A N/A NotImplementedError N/A N/A FileManager N/A object N/A N/A log N/A N/A logging getLogger FileManager N/A file_interfaces N/A dict init N/A N/A cls N/A N/A N/A module N/A N/A mpf file_interfaces __all__ N/A N/A N/A __import__ N/A N/A mpf.file_interfaces.{} format module N/A interface_class N/A eval N/A N/A mpf.file_interfaces.{}.file_interface_class format module N/A this_instance N/A interface_class N/A file_type N/A interface_class file_types N/A N/A N/A N/A cls file_interfaces N/A file_type this_instance N/A classmethod locate_file N/A N/A filename N/A N/A N/A ext N/A N/A N/A N/A os path splitext filename N/A 1 N/A N/A N/A N/A N/A os path isfile filename N/A N/A N/A ext N/A N/A config_processor N/A set N/A N/A N/A FileManager file_interfaces values N/A N/A N/A questionable_file ext N/A N/A config_processor find_file filename N/A questionable_file N/A N/A questionable_file N/A False N/A N/A filename N/A staticmethod get_file_interface N/A N/A filename N/A N/A N/A file N/A N/A FileManager locate_file filename N/A ext N/A N/A N/A N/A os path splitext filename N/A 1 N/A file N/A N/A N/A N/A N/A N/A FileManager file_interfaces N/A ext N/A N/A N/A KeyError N/A N/A None N/A staticmethod load N/A N/A filename verify_version halt_on_error N/A False False N/A N/A file N/A N/A FileManager locate_file filename N/A file N/A N/A ext N/A N/A N/A N/A os path splitext file N/A 1 N/A N/A N/A config N/A N/A N/A N/A FileManager file_interfaces N/A ext load file verify_version halt_on_error N/A N/A N/A KeyError N/A N/A N/A N/A N/A FileManager log error N/A N/A No config file processor available for file type {} format ext N/A N/A N/A sys exit N/A config N/A N/A halt_on_error N/A N/A N/A IOError N/A N/A Could not find file {} format filename N/A N/A N/A dict N/A staticmethod save N/A N/A filename data N/A N/A N/A ext N/A N/A N/A N/A os path splitext filename N/A 1 N/A N/A N/A N/A N/A N/A N/A FileManager file_interfaces N/A ext save filename data N/A N/A N/A KeyError N/A N/A N/A N/A N/A FileManager log error N/A N/A No config file processor available for file type {} format ext N/A N/A N/A sys exit N/A staticmethod N/A