You'll need to import csv
to get it to save to a file if you want to do this (as your question says write to csv.
First you'll have to:
import csv
Then you'll have to open a file to write to and create a writer:
handle=csv.writer(open('file.csv','wb'))
I'd change
def on_status(self, status):
print status.author.screen_name, status.created_at, status.text
to something like this:
def on_status(self, status):
print status.author.screen_name, status.created_at, status.text
handle.writerow(status.author.screen_name, status.created_at, status.text)
Of course you'd have to send the handle to the class or have some method to get the handle from the main to that method.
I'd also check this stack question as well.
You should be careful with the data that is coming in from Twitter, it can have commas in it as well. Looking at this question they explain how to escape any comma that may exist in a string. Or course you'd then have to escape every variable or at least status.text.