From 7670ba9e6b805122faad69f19c5662d1c41fe540 Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 14 Apr 2010 17:58:52 -0400 Subject: [PATCH] Began adding handling for command-line options --- mytwitter.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mytwitter.py b/mytwitter.py index e2fa6d3..dab2159 100755 --- a/mytwitter.py +++ b/mytwitter.py @@ -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()