from BeautifulSoup import BeautifulSoup
AllFile = open("/home/me/Documents/JavaRelated/vmspec/AllInstuctionsSet.doc.html" , 'w')
FirstFileName = "/home/me/Documents/JavaRelated/vmspec/Instructions2.doc.html"
class SubInstructions:
def __init__(self,index):
self.index = index
self.filename = "/home/me/Documents/JavaRelated/vmspec/Instructions2.doc%d.html" % index
self.filecontent = open(self.filename).read()
self.soup = BeautifulSoup(self.filecontent)
def getFileName(self):
return self.filename
def getContents(self):
return self.soup.body.contents;
AllSoup = BeautifulSoup(open(FirstFileName).read())
for i in range(1,16):
subInstr = SubInstructions(i)
print subInstr.getFileName()
for tag in subInstr.getContents():
AllSoup.body.append(tag)
AllFile.write(AllSoup.prettify())
AllFile.flush()
AllFile.close()
串联JVM的指令集文档
最新推荐文章于 2024-10-02 10:53:34 发布