diff --git a/mytwitter.py b/mytwitter.py index dab2159..cb2c4a6 100755 --- a/mytwitter.py +++ b/mytwitter.py @@ -2,7 +2,7 @@ # # Custom twitter client... mostly for learning Python -import sys, ConfigParser, os, re +import sys, ConfigParser, os, re, optparse import twitter import gtk, gtk.glade, gobject from urllib2 import HTTPError @@ -269,8 +269,9 @@ class MyTwitter(): # main -config_file = "~/.mytwitter" +parser = optparse.OptionParser() +parser.add_option('-c' ,'--config', dest="filename", default="~/.mytwitter") +(options, args) = parser.parse_args() - -my_twitter = MyTwitter(config_file) +my_twitter = MyTwitter(options.filename) gtk.main()