>>> import olefile
>>> dir(olefile)
['MAGIC', 'MINIMAL_OLEFILE_SIZE', 'OleFileIO', 'OleMetadata', 'STGTY_EMPTY', 'STGTY_LOCKBYTES', 'STGTY_PROPERTY', 'STGTY_ROOT', 'STGTY_STORAGE', 'STGTY_STREAM', '__all__', '__author__', '__builtins__', '__cached__', '__date__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', 'enable_logging', 'isOleFile', 'olefile']
>>> olefile.DEFECT_INCORRECT
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'DEFECT_INCORRECT'
>>> from olefile import olefile
>>> olefile.DEFECT_INCORRECT
30
I'm not sure whether the code or the documentation need to be fixed.
If you
import olefileas described in the documentation, theDEFECT_INCORRECTconstant is not defined:Instead if you import
olefile.olefile, it works as intended:I'm not sure whether the code or the documentation need to be fixed.