[prev in list] [next in list] [prev in thread] [next in thread]
List: python-patches
Subject: [Patches] [ python-Patches-1052399 ] plistlib: add plst resource
From: noreply () sourceforge ! net (SourceForge ! net)
Date: 2004-10-25 17:54:38
Message-ID: E1CM7B2-0008G0-KK () sc8-sf-web1 ! sourceforge ! net
[Download RAW message or body]
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: Closed
>Resolution: Accepted
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 17:54
Message:
Logged In: YES
user_id=92689
Ok, I give in. Jack also want this, so it goes in. Went actually: it's
in rev 1.7 of plistlib.py (with some cosmetic changes)
----------------------------------------------------------------------
Comment By: Bob Ippolito (etrepum)
Date: 2004-10-25 16:11
Message:
Logged In: YES
user_id=139309
The plst resource has a well defined place an application, why shouldn't
plistlib know about it? If you want to put it somewhere else in plat-mac,
that's fine with me, but it certainly should live in there somewhere.
The reason that it should go in the standard library is because the
resource API sucks, so most people don't understand how to use it.
Having a straightforward path to the plst resource not only gets some
users what they need, but it also serves as reasonable and modern
example code if they need to read or write some other kind of resource.
----------------------------------------------------------------------
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic