Update of /cvsroot/freevo/freevo/src/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv10401
Modified Files: headlines.py Log Message: o use util pickle function o show popup while getting the data Index: headlines.py =================================================================== RCS file: /cvsroot/freevo/freevo/src/plugins/headlines.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** headlines.py 30 Aug 2003 15:23:39 -0000 1.1 --- headlines.py 3 Sep 2003 21:40:38 -0000 1.2 *************** *** 16,19 **** --- 16,23 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.2 2003/09/03 21:40:38 dischi + # o use util pickle function + # o show popup while getting the data + # # Revision 1.1 2003/08/30 15:23:39 mikeruelle # RDF headlines plugin. does pretty much anysite listed in evolution's summary section *************** *** 48,56 **** from xml.dom.ext.reader import Sax2 import urllib ! import cPickle ! #freevo modules import config, menu, rc, plugin, skin from item import Item --- 52,61 ---- from xml.dom.ext.reader import Sax2 import urllib ! import util #freevo modules import config, menu, rc, plugin, skin + from gui.PopupBox import PopupBox + from item import Item *************** *** 87,95 **** else: #print 'Cache Headlines' ! try: ! headlines = cPickle.load(open(pfile,'rb')) ! except: ! print 'HEADLINES ERROR: could not read %s' % pfile ! return [] return headlines --- 92,96 ---- else: #print 'Cache Headlines' ! headlines = util.read_pickle(pfile) return headlines *************** *** 98,102 **** # create Reader object reader = Sax2.Reader() ! # parse the document try: --- 99,106 ---- # create Reader object reader = Sax2.Reader() ! ! popup = PopupBox(text='Fetching headlines...') ! popup.show() ! # parse the document try: *************** *** 118,126 **** if len(headlines) > 0: pfile = os.path.join(config.FREEVO_CACHEDIR, 'headlines-%i' % self.location_index) ! try: ! cPickle.dump(headlines, open(pfile,'wb')) ! except: ! print 'HEADLINES ERROR: could not write %s' % pfile ! pass return headlines --- 122,129 ---- if len(headlines) > 0: pfile = os.path.join(config.FREEVO_CACHEDIR, 'headlines-%i' % self.location_index) ! util.save_pickle(headlines, pfile) ! ! popup.destroy() ! return headlines ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog