Began adding handling for command-line options

This commit is contained in:
Anna 2010-04-14 17:58:52 -04:00
parent 5f75520380
commit 7670ba9e6b

View File

@ -13,9 +13,9 @@ class MyTwitter():
""" Display Tweets, post to twitter """
def __init__(self):
def __init__(self, config_file):
config = ConfigParser.ConfigParser()
config.read(os.path.expanduser("~/.mytwitter"))
config.read(os.path.expanduser(config_file))
self.username = config.get('global', 'username')
self.password = config.get('global', 'password')
@ -269,6 +269,8 @@ class MyTwitter():
# main
config_file = "~/.mytwitter"
my_twitter = MyTwitter()
my_twitter = MyTwitter(config_file)
gtk.main()