Skip to content

Instantly share code, notes, and snippets.

@jacobmischka
Created August 13, 2015 04:55
Show Gist options
  • Save jacobmischka/157ba0955745461e92c8 to your computer and use it in GitHub Desktop.
Save jacobmischka/157ba0955745461e92c8 to your computer and use it in GitHub Desktop.
python
#!/usr/bin/python
from gi.repository import Gtk
# from twitter import *
# import os.path
# import webbrowser
class MainWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="Hello World")
self.button = Gtk.Button(label="Button")
self.button.connect("clicked", self.onclick)
self.add(self.button)
def onclick(self, widget):
new_win = HelloWindow()
new_win.show_all()
class HelloWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self)
self.label = Gtk.Label(label="Tweet!")
self.add(self.label)
win = MainWindow()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
# def authenticate():
# twitter = Twitter(auth=OAuth('', '', CONSUMER_KEY, CONSUMER_SECRET), format='', api_version=None)
# oauth_token =
# CONSUMER_KEY = "3VXjHiLw4SmGQA1wubvOD8jyX"
# CONSUMER_SECRET = "YrcdjaAWpM9w6i0rcW84HrLoSjoCH6Rz2Zam9DNFQ9Le3JSIx5"
# TWITTER_CREDS = os.path.expanduser('~/twitter-creds')
# if not os.path.exists(TWITTER_CREDS):
# oauth_dance("Bird", CONSUMER_KEY, CONSUMER_SECRET, TWITTER_CREDS)
#
# oauth_token, oauth_secret = read_token_file(TWITTER_CREDS)
#
# t = Twitter(auth=OAuth(oauth_token, oauth_secret, CONSUMER_KEY, CONSUMER_SECRET))
#
# print(str(t.statuses.home_timeline()))
@hoseinpanahi98
Copy link

fuck you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment