Differences between revisions 3 and 4
Revision 3 as of 2009-11-28 14:45:56
Size: 829
Editor: Elias
Comment: 删除对PageComment2组件的引用
Revision 4 as of 2009-12-25 07:15:15
Size: 829
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
::-- ZoomQuiet [[[DateTime(2008-03-03T15:18:17Z)]]]
[[TableOfContents]]
::-- ZoomQuiet [<<DateTime(2008-03-03T15:18:17Z)>>]
<<TableOfContents>>
Line 10: Line 10:
[[Include(CPUGnav)]] <<Include(CPUGnav)>>

含有章节索引的 *PUG 文章通用模板 ::-- ZoomQuiet [2008-03-03 15:18:17]

CPUG联盟::

CPUG::门户plone

BPUG

SPUG

ZPUG

SpreadPython Python宣传

1. 文件编码问题~通解

   1 f = file(...)
   2 t = open(..,'w')
   3 t.write(f.read())
  • 有时候会报错或者写入t中时成乱码
  • 这些都是因为编码不统一造成
  • 有没有一般性的方法解决这种问题呢

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

MiscItems/2008-03-03 (last edited 2009-12-25 07:15:15 by localhost)