how to write text into file in ansi encoding ?

James Yu cyu021 at gmail.com
Wed Feb 20 23:46:11 EST 2008


I am using *fileHandle = open(srcFile, 'w')* + *fileHandle.write('whatever')
* to put text into a file, and Python uses utf-8 encoding by default.
How do I configure or do anything to make Python writing files in ansi
encoding ?

-- 
This is a UTF-8 formatted mail
-----------------------------------------------
James C.-C.Yu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080221/9b556b13/attachment.html>


More information about the Python-list mailing list