摘要: # -*- coding:gb2312 -*- #必须在第一行或者第二行 print u"吴".encode("gb18030") print "吴" print len(u"吴") print len("吴") 阅读全文
posted @ 2009-07-03 23:27 Fan Zhang 阅读(145) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python'makeTextFile.py -- create text file'import osls = os.linesep# get filenamewhile True: if os.path.exists(fname): print"*** ERROR: '%s' already exists" % fname else: break# get fil... 阅读全文
posted @ 2009-07-03 17:54 Fan Zhang 阅读(825) 评论(0) 推荐(0)