Open htgoebel opened 6 years ago
Please add __enter__ and __exit__, to be able to write e.g.
__enter__
__exit__
with pefile.PE(exenm, fast_load=True) as pe: overlay_before = pe.get_overlay()
This may also be used to simplify the internal code.
@htgoebel - One thing you could consider is:
from contextlib import closing with closing(pefile.PE(exenm, fast_load=True)) as pe: overlay_before = pe.get_overlay()
Please add
__enter__
and__exit__
, to be able to write e.g.This may also be used to simplify the internal code.