Began adding handling for command-line options
This commit is contained in:
parent
5f75520380
commit
7670ba9e6b
|
@ -13,9 +13,9 @@ class MyTwitter():
|
||||||
|
|
||||||
""" Display Tweets, post to twitter """
|
""" Display Tweets, post to twitter """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self, config_file):
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
config.read(os.path.expanduser("~/.mytwitter"))
|
config.read(os.path.expanduser(config_file))
|
||||||
self.username = config.get('global', 'username')
|
self.username = config.get('global', 'username')
|
||||||
self.password = config.get('global', 'password')
|
self.password = config.get('global', 'password')
|
||||||
|
|
||||||
|
@ -269,6 +269,8 @@ class MyTwitter():
|
||||||
|
|
||||||
|
|
||||||
# main
|
# main
|
||||||
|
config_file = "~/.mytwitter"
|
||||||
|
|
||||||
my_twitter = MyTwitter()
|
|
||||||
|
my_twitter = MyTwitter(config_file)
|
||||||
gtk.main()
|
gtk.main()
|
||||||
|
|
Reference in New Issue
Block a user