def __init__(self, **kwargs): # make sure we aren't overriding any important functionality super(Widgets, self).__init__(**kwargs) Config.set('graphics', 'width', '1800') Config.set('graphics', 'height', '900') Config.write() root = Widget() print "root.width: %f" % root.width print "root.height: %f" % root.height self.add_widget( AsyncImage(source=str(Global.image_url), pos=(-root.width * 6, root.height * 3.25))) self.add_widget( Label(text='@' + str(Global.screen_name), pos=(-root.width * 6, root.height * 2))) self.add_widget( Label(text="location: " + str(Global.location), pos=(-root.width * 6, root.height * 1.3))) self.add_widget( Label(text="verified: " + str(Global.verified), pos=(-root.width * 6, root.height))) self.add_widget( Label(text="on Twitter since: " + str(Global.created_at), pos=(-root.width * 6, root.height * 0.7))) self.add_widget( Label(text="description:\n" + str(Global.description), pos=(-root.width * 6, root.height * 0.3))) self.add_widget( Label(text=str(Global.tweets) + "\ntweets", pos=(-root.width * 3, root.height * 3.5))) self.add_widget( Label(text=str(Global.followers) + "\nfollowers", pos=(-root.width, root.height * 3.5))) self.add_widget( Label(text=str(Global.following) + "\nfollowing", pos=(root.width, root.height * 3.5))) self.add_widget( Label(text=str(Global.average_tweet_time) + "\naverage tweet time", pos=(root.width * 5, root.height * 4))) self.add_widget( Label(text=str(Global.average_tweet_retweets) + "\naverage retweets in tweets", pos=(root.width * 5, root.height * 3))) self.add_widget( Label(text=str(Global.average_tweet_favorites) + "\naverage favorites in tweets", pos=(root.width * 5, root.height * 2))) self.add_widget( Label(text=str(Global.followback_percentage), pos=(-root.width * .4, root.height * 1.5))) self.add_widget( Image(source=str(Global.wordcloud_tweets_image), pos=(root.width * 0.35, root.height), size_hint_y=None, height=350)) if (Global.hashtags_found > 0): self.add_widget( Image(source=str(Global.wordcloud_hashtags_image), pos=(-root.width * 6, root.height), size_hint_y=None, height=350)) self.add_widget( Label(text="most tweets per day: " + str(Global.most_tweets_per_day) + " on " + str(Global.most_tweets_day), pos=(-root.width * .6, root.height * 0.6))) self.add_widget( Label(text="5 most recent tweets: ", pos=(-root.width * .6, -root.height * 3.5))) carousel = Carousel(direction='right') for i in range(5): tweet_layout = FloatLayout() tweet_layout.add_widget( Label(text="#" + str(i + 1) + ":\n" + Global.five_latest_tweets[i], pos=(-root.width * .6, -root.height * 3.8))) tweet_layout.add_widget( Image(source=str('img/date.png'), pos=(-root.width * 1.8, 0), size_hint_y=None, height=35)) tweet_layout.add_widget( Image(source=str('img/retweets.png'), pos=(-root.width * 0.5, 0), size_hint_y=None, height=35)) tweet_layout.add_widget( Image(source=str('img/likes.png'), pos=(root.width * 0.2, 0), size_hint_y=None, height=35)) tweet_layout.add_widget( Label(text=Global.five_latest_dates[i], pos=(-root.width * 1.2, -root.height * 4.32))) tweet_layout.add_widget( Label(text=Global.five_latest_retweets[i], pos=(-root.width * 0.2, -root.height * 4.32))) tweet_layout.add_widget( Label(text=Global.five_latest_likes[i], pos=(root.width * 0.5, -root.height * 4.32))) carousel.add_widget(tweet_layout) carousel.disabled = True carousel.opacity = 6 carousel.loop = True self.add_widget(carousel) timeline.create() self.add_widget( Image(source='png/' + str(Global.screen_name) + '_gantt.png', pos=(root.width * 6.35, root.height * 1.5), size_hint_y=None, height=380)) if (Global.fishy_followers != 0): self.add_widget( Image(source='img/warning.png', pos=(-root.width * 2, root.height * 6.5), size_hint_y=None, height=35)) self.add_widget( Label(text=str(Global.fishy_followers) + " suspicious followers found", pos=(-root.width * 0.8, root.height * 2.15))) def printit(): if (self.run_carousel): threading.Timer(5.0, printit).start() # print "RUNNING THREAD!" carousel.load_next(mode='next') printit()