Replaced hard-coded username and password with code to read from a config file. And yes, I've already changed the password. Bah.
This commit is contained in:
parent
b74b992ad7
commit
50d23fee0f
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# Custom twitter client... mostly for learning Python
|
# Custom twitter client... mostly for learning Python
|
||||||
|
|
||||||
import sys, twitter, Tkinter, Pmw
|
import sys, twitter, Tkinter, Pmw, ConfigParser, os
|
||||||
|
|
||||||
|
|
||||||
class TwitWindow:
|
class TwitWindow:
|
||||||
|
@ -10,8 +10,10 @@ class TwitWindow:
|
||||||
""" Display Tweets, post to twitter """
|
""" Display Tweets, post to twitter """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.username = "gjalfr"
|
config = ConfigParser.ConfigParser()
|
||||||
self.password = "fun4cabbage"
|
config.read(os.path.expanduser("~/.mytwitter"))
|
||||||
|
self.username = config.get('global', 'username')
|
||||||
|
self.password = config.get('global', 'password')
|
||||||
self.num_entries = 10
|
self.num_entries = 10
|
||||||
|
|
||||||
self.labels = []
|
self.labels = []
|
||||||
|
|
Reference in New Issue
Block a user