importfeedparserfeed='http://rss.slashdot.org/Slashdot/slashdot'f=feedparser.parse(feed)defshowinfo():printf.feed.titleprintf.feed.subtitleprintf.feed.linkdefshownews():printprint'Latest news:'printforiinxrange(len(f.entries)):print'%i)'%(i+1),f.entries[[i]].titledefshownew(n):printprintf.entries[[n]].title,'-',f.entries[[n]].date[[:10]]printprintf.entries[[n]].description.split('<p>')[[0]].strip()showinfo()shownews()while1:print## i = raw_input('Choose a new to read (q to quit): ')## if not i.isalpha():## shownew(int(i)-1)try:i=input('Choose a new to read: ')except:breakshownew(int(i)-1)prints=raw_input('Press any key to continue...')shownews()