This is a tool that will perform a twitter search for you, and then run a sentiment analysis on the tweets returned.
The data it uses is very accurate, and already well trained. That said, nothing is perfect.
# ./twitter_sentiment.py -h
Usage: twitter_sentiment.py [options]
Options:
-h, --help show this help message and exit
-q QUERY what you want to search twitter for
-p MAX_PAGES the maximum number of twitter search result pages to fetch.