As i commented is this what you are looking for ?
>>> base = getDataContaining(currentProgram.imageBase)
>>> base
IMAGE_DOS_HEADER
>>> for i in range (0,base.length,1):
... print ( base.baseDataType.getComponentAt(i).toString() , base.getComponentAt(i))
...
(u' 0 0 char[2] 2 e_magic "Magic number"', char[2] "MZ")
(u' 0 0 char[2] 2 e_magic "Magic number"', char[2] "MZ")
(u' 1 2 word 2 e_cblp "Bytes of last page"', dw 90h)
(u' 1 2 word 2 e_cblp "Bytes of last page"', dw 90h)
(u' 2 4 word 2 e_cp "Pages in file"', dw 3h)
(u' 2 4 word 2 e_cp "Pages in file"', dw 3h)
(u' 3 6 word 2 e_crlc "Relocations"', dw 0h)
(u' 3 6 word 2 e_crlc "Relocations"', dw 0h)
(u' 4 8 word 2 e_cparhdr "Size of header in paragraphs"', dw 4h)
(u' 4 8 word 2 e_cparhdr "Size of header in paragraphs"', dw 4h)
(u' 5 10 word 2 e_minalloc "Minimum extra paragraphs needed"', dw 0h)
(u' 5 10 word 2 e_minalloc "Minimum extra paragraphs needed"', dw 0h)
(u' 6 12 word 2 e_maxalloc "Maximum extra paragraphs needed"', dw FFFFh)
(u' 6 12 word 2 e_maxalloc "Maximum extra paragraphs needed"', dw FFFFh)
(u' 7 14 word 2 e_ss "Initial (relative) SS value"', dw 0h)
(u' 7 14 word 2 e_ss "Initial (relative) SS value"', dw 0h)
(u' 8 16 word 2 e_sp "Initial SP value"', dw B8h)
(u' 8 16 word 2 e_sp "Initial SP value"', dw B8h)
(u' 9 18 word 2 e_csum "Checksum"', dw 0h)
(u' 9 18 word 2 e_csum "Checksum"', dw 0h)
(u' 10 20 word 2 e_ip "Initial IP value"', dw 0h)
(u' 10 20 word 2 e_ip "Initial IP value"', dw 0h)
(u' 11 22 word 2 e_cs "Initial (relative) CS value"', dw 0h)
(u' 11 22 word 2 e_cs "Initial (relative) CS value"', dw 0h)
(u' 12 24 word 2 e_lfarlc "File address of relocation table"', dw 40h)
(u' 12 24 word 2 e_lfarlc "File address of relocation table"', dw 40h)
(u' 13 26 word 2 e_ovno "Overlay number"', dw 0h)
(u' 13 26 word 2 e_ovno "Overlay number"', dw 0h)
(u' 14 28 word[4] 8 e_res[4] "Reserved words"', dw[4] )
(u' 14 28 word[4] 8 e_res[4] "Reserved words"', dw[4] )
(u' 14 28 word[4] 8 e_res[4] "Reserved words"', dw[4] )
(u' 14 28 word[4] 8 e_res[4] "Reserved words"', dw[4] )
(u' 14 28 word[4] 8 e_res[4] "Reserved words"', dw[4] )
(u' 14 28 word[4] 8 e_res[4] "Reserved words"', dw[4] )
(u' 14 28 word[4] 8 e_res[4] "Reserved words"', dw[4] )
(u' 14 28 word[4] 8 e_res[4] "Reserved words"', dw[4] )
(u' 15 36 word 2 e_oemid "OEM identifier (for e_oeminfo)"', dw 0h)
(u' 15 36 word 2 e_oemid "OEM identifier (for e_oeminfo)"', dw 0h)
(u' 16 38 word 2 e_oeminfo "OEM information; e_oemid specific"', dw 0h)
(u' 16 38 word 2 e_oeminfo "OEM information; e_oemid specific"', dw 0h)
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 17 40 word[10] 20 e_res2[10] "Reserved words"', dw[10] )
(u' 18 60 dword 4 e_lfanew "File address of new exe header"', ddw 108h)
(u' 18 60 dword 4 e_lfanew "File address of new exe header"', ddw 108h)
(u' 18 60 dword 4 e_lfanew "File address of new exe header"', ddw 108h)
(u' 18 60 dword 4 e_lfanew "File address of new exe header"', ddw 108h)
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
(u' 19 64 byte[64] 64 e_program "Actual DOS program"', db[64] )
.getComponentAt
. it took me a while to realize that the method for the datatype and the data object are different.dat.getAllStructures()
would have helped me though. It seems easier to get the datatype of the data by usinggetDataContaining(currentProgram.imageBase).dataType