public
Last active

Learn something new every day with Pythonista

  • Download Gist
today_i_learned.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
from datetime import date
import webbrowser
import console
 
def main():
result = console.alert("Today I Learned", "Choose your path", "reddit", "today", "random")
today = date.today().strftime("%B_%d")
urls = ["http://www.reddit.com/r/todayilearned", ("http://en.wikipedia.org/wiki/%s" % today), "http://en.wikipedia.org/wiki/Special:Random"]
url = urls[result-1]
webbrowser.open(url)
if __name__ == '__main__':
main()

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.