>>> logfile=open('/tmp/mylog.txt','a')>>> print >> logfile, 'fatail error: invalid arguments'>>> logfile.close()>>>user=raw_input("please input your name:")Numbers:int long bool (True,False)floatcomplex (6.23+1.5j)tuple1.元组, Read More
posted @ 2011-08-21 15:16 庚武 Views(235) Comments(0) Diggs(0)
在中文 windows平台下:#coding:utf-8str = "hello 我是中国人,我爱中国"print str #乱码print str.decode('utf-8').encode('gbk') 文件编码为 utf-8 Read More
posted @ 2011-08-21 12:00 庚武 Views(200) Comments(0) Diggs(0)
python eclipse开发插件:http://pydev.org//download.htmldownload from sf.net: http://sourceforge.net/projects/pydev/files/pydev manual:http://pydev.org//manual_101_root.htmlother editors:http://wiki.python.org/moin/PythonEditorsURLs for PyDev as Eclipse pluginUrls to use when updating with the Eclipse upd Read More
posted @ 2011-08-21 10:20 庚武 Views(264) Comments(0) Diggs(0)