# -*- coding: utf-8 -*- import codecs content = u'你好,脚本分享网 sharejs.com' f = codecs.open('c:/1.txt','w','utf-8') f.write(content)