[Patches] [ python-Patches-1052399 ] plistlib: add plst resource functionality, fix bugs

SourceForge.net noreply at sourceforge.net
Mon Oct 25 15:58:24 CEST 2004


Patches item #1052399, was opened at 2004-10-22 20:55
Message generated for change (Comment added) made by jvr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1052399&group_id=5470

Category: Macintosh
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Bob Ippolito (etrepum)
Assigned to: Just van Rossum (jvr)
Summary: plistlib: add plst resource functionality, fix bugs

Initial Comment:
- added plistlib.readPlistFromResource and 
plistlib.writePlistToResource
- changed aliasing of builtin (file -> fileobj)
- made float use the correct accuracy (str -> repr)
- fixed date parsing (current version requires PyXML, and it was 
wrong even then.. fixed to use stdlib and correct semantics)
- changed internal representation of dates to datetime.datetime 
instead of float timestamp

(full copy available from)
http://svn.red-bean.com/bob/plistlib/trunk/plistlib.py

----------------------------------------------------------------------

>Comment By: Just van Rossum (jvr)
Date: 2004-10-25 15:58

Message:
Logged In: YES 
user_id=92689

Other changes: abolutely, they're much appreciated and will go 
in for sure.

I'm aware of your other points, too. However, I'm not convinced 
plistlib.py is the right place to implement resource support. So to 
rephrase my question: what code out there needs (or will need) 
this functionality and is there any reason it can't incorporate the 
resource functions themselves?

----------------------------------------------------------------------

Comment By: Bob Ippolito (etrepum)
Date: 2004-10-25 15:46

Message:
Logged In: YES 
user_id=139309

Oh, and the rest of the changes need to go in regardless of whether you 
think resources are a good idea.. especially the date fixes.

----------------------------------------------------------------------

Comment By: Bob Ippolito (etrepum)
Date: 2004-10-25 15:44

Message:
Logged In: YES 
user_id=139309

The thread was about acquiring the version of an application.  It turns 
out that some applications are stupid and have an out of date plst 
resource and that 'vers' is sometimes more reliable, but that is besides 
the point..

(a) the resource code is written in such a way that the rest of the module 
remains cross-platform and can be imported just fine.

(b) plists are perfectly valid (and practically required) as a plst resource 
for OS X capable CFM Carbon apps, they're not gone yet.

----------------------------------------------------------------------

Comment By: Just van Rossum (jvr)
Date: 2004-10-25 15:40

Message:
Logged In: YES 
user_id=92689

Ironically, I only have doubts about the original incentive of this 
patch: the resource additions. Given the obsolescence of 
resources and the otherwise platform neutralness of plistlib.py 
(regardless of its place in the std lib...), wouldn't it be better to 
place the resource functions in app-specific code? I didn't follow 
the original thread, so I'm not sure what code needs this 
functionality.

----------------------------------------------------------------------

Comment By: Bob Ippolito (etrepum)
Date: 2004-10-22 21:40

Message:
Logged In: YES 
user_id=139309

Fixed patch, original patch didn't update __all__ list.  svn trunk copy is 
up to date.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1052399&group_id=5470


More information about the Patches mailing list