Bases: object
The HandlersManager has methods to register a FileHandler with a type of file (an extension with the dot, like ".pdf") and to get a FileHandler from a typename.
In all methods, typename should be in lowercase and start with a dot.
Registers the subclass of FileHandler handler for typename.
Gets the best FileHandler associated to typename. The best handler is the first registered handler for typename.
Bases: object
A FileHandler is an object which retrieves informations from a file and exposes this informations through its attributes.
Parameters: |
|
---|
Tips for developpers
A FileHandler has the following protected attributes:
- _path¶
equals to path
- _filename¶
equals to filename
- _is_valid¶
True if the file has been successfully parsed. Set by default to False. You can use the methods _set_valid() and _set_invalid() to modify this attribute.