Configurated some variables

This commit is contained in:
Anna 2010-04-07 14:47:16 -04:00
parent 0b76168037
commit 1ab585954f

View File

@ -14,7 +14,8 @@ class TwitWindow:
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 = int(config.get('global', 'entries'))
self.refresh_time = int(config.get('global', 'refreshtime'))
self.labels = []
self.texts = []
@ -73,7 +74,7 @@ class TwitWindow:
def update_window(self) :
statuses = self.api.GetFriendsTimeline(self.username)
statuses = self.api.GetFriendsTimeline(self.username, count=self.num_entries)
for i in range(0, self.num_entries):
if i < len(statuses):
# Update the label with the user's name and screen name
@ -84,7 +85,7 @@ class TwitWindow:
# Display the text of the tweet
self.texts[i].config(text=statuses[i].text)
self.timer = self.tkroot.after(300000, self.update_window)
self.timer = self.tkroot.after(self.refresh_time * 1000, self.update_window)