import sys
import os


class DisassArchiveHEADERS:
	header = []
	table = []
	parent = None
	
	def __init__(self,filename,parent):
		self.parent = parent
		self.init(os.popen('objdump -a %s'%(filename)).readlines())
	
	def __str__(self):
		return "".join(self.table)
		
	def init(self,lines):
		self.header = lines[0:4]
		self.table = lines[4:]
		
	def printTXT(self,outfile=sys.stdout):
		print >>outfile,("\n\nARCHIVE HEADERS:")
		for line in self.table:
			print >>outfile,(line.strip())
