#while True: def do_every_sleeptime(SLEEPTIME): print "Polling . . .", # Get stories from Google's Top Stories RSS news feed stories = process("http://news.google.com/?output=rss") # Get stories from Yahoo's Top Stories RSS news feed stories.extend(process("http://rss.news.yahoo.com/rss/topstories")) # Process the stories stories = filterStories(stories, triggerlist) map(get_cont, stories) scrollbar.config(command=cont.yview) print "Sleeping..." #time.sleep(SLEEPTIME) master.after(SLEEPTIME*1000, do_every_sleeptime, SLEEPTIME) do_every_sleeptime(SLEEPTIME) except Exception as e: print e if __name__ == '__main__': root = Tk() root.title("Some RSS parser") #thread.start_new_thread(main_thread, (root,)) main_thread(root) root.mainloop()
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question