示例#1
0
 def print_tree_to_fd(self, fd):
     lo = 10240
     hi = 102400
     pr = spin_py.SPIN_tree_print(fd, lo, hi)
     # need the DTD to write at the top of the file
     pr.write(self.dtd_line + "\n")
     pr.print_tree(self.tree)
示例#2
0
ret = EH.Run(files)  ## the MAIN part of the program ##
t3 = time()
print "ret val ", ret
print "--"

# SP has now disappeared, and the document is loaded as EH.tree

# dump/print the EH.tree to stdout
if 1:
    import sys
    # EG # fd = sys.stdout
    fd = open(ofile, "w")
    # DEAD # fd = spin_py.SPIN_write_buffer( fd, 10240, 102400 )
    lo = 10240
    hi = 102400
    pr = spin_py.SPIN_tree_print(fd, lo, hi)

    # need the DTD to write at the top of the file
    pr.write(EH.dtd_line + "\n")
    pr.print_tree(EH.tree)
    # no need to call flush2() manually
    # pr.flush2()
    # fd.flush2()
t4 = time()

EH.tree = None
EH.top = None
EH = None

# all done calculate the times