含有章节索引的 *PUG 文章通用模板 ::-- ZoomQuiet [DateTime(2008-03-03T15:18:17Z)] TableOfContents

Include(CPUGnav)

1. 文件编码问题~通解

   1 f = file(...)
   2 t = open(..,'w')
   3 t.write(f.read())

For simple pass-through read-write, why not use binary mode? --

   1 # Note: just for illustration, this naive approach breaks when
   2 # the input file is larger than your physical memory
   3 fp = open('input', 'rb')
   4 tp = open('output', 'wb')
   5 tp.write(fp.read())

Jerry

PageComment2 [:/PageCommentData:PageCommentData]