Update of /cvsroot/freevo/freevo/src
In directory sc8-pr-cvs1:/tmp/cvs-serv29513

Modified Files:
        util.py 
Log Message:
added pickle wrapper

Index: util.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/util.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** util.py     1 Jul 2003 19:44:59 -0000       1.34
--- util.py     1 Jul 2003 20:44:52 -0000       1.35
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.35  2003/07/01 20:44:52  dischi
+ # added pickle wrapper
+ #
  # Revision 1.34  2003/07/01 19:44:59  outlyer
  # A simple function to add tags to MP3s.
***************
*** 120,123 ****
--- 123,127 ----
  import Image # PIL
  import copy
+ import cPickle, pickle # pickle because sometimes cPickle doesn't work
  
  # Configuration file. Determines where to look for AVI/MP3 files, etc
***************
*** 522,525 ****
--- 526,545 ----
          text = text[:-1]
      return text
+ 
+ 
+ def read_pickle(file):
+     f = open(file, 'r')
+     try:
+         data = cPickle.load(f)
+     except:
+         data = pickle.load(f)
+     f.close()
+     return data
+ 
+ 
+ def save_pickle(data, file):
+     f = open(file, 'w')
+     cPickle.dump(data, f, 1)
+     f.close()
  
  




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to