There's no way right now of getting that information directly but the
following might be helpful:
pe = pefile.PE('your_file.exe')
# The sizeof() method in the different structures/headers will return
the size of the structure
pe.OPTIONAL_HEADER.sizeof()
# The get_file_offset() method in the different structures/headers
will return the offset of the structure in the file
pe.OPTIONAL_HEADER.get_file_offset()
What you could do is to search for the value of interest in the range
between the offset and offset+size. Alternatively, the most elegant
solution would be to extend pefile's Structure class to process the
size of the different fields and provide their offsets.
--
ero