I have a python script that grabs a bunch of recent tweets from the twitter API and dumps them to screen. It works well, but when I try to direct the output to a file something
You may need encode the unicode object with .encode('utf-8')
.encode('utf-8')
In your python file append this to first line
# -*- coding: utf-8 -*-
If your script file is working standalone, append it to second line
#!/usr/local/bin/python # -*- coding: utf-8 -*-
Here is the document: PEP 0263