Issue1052399
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2004-10-22 18:55 by bob.ippolito, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Files | ||||
---|---|---|---|---|
File name | Uploaded | Description | Edit | |
plistlib-1.patch | bob.ippolito, 2004-10-22 19:40 | updated plistlib patch |
Messages (8) | |||
---|---|---|---|
msg47114 - (view) | Author: Bob Ippolito (bob.ippolito) * | Date: 2004-10-22 18:55 | |
- 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 |
|||
msg47115 - (view) | Author: Bob Ippolito (bob.ippolito) * | Date: 2004-10-22 19:40 | |
Logged In: YES user_id=139309 Fixed patch, original patch didn't update __all__ list. svn trunk copy is up to date. |
|||
msg47116 - (view) | Author: Just van Rossum (jvr) * | Date: 2004-10-25 13:40 | |
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. |
|||
msg47117 - (view) | Author: Bob Ippolito (bob.ippolito) * | Date: 2004-10-25 13:44 | |
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. |
|||
msg47118 - (view) | Author: Bob Ippolito (bob.ippolito) * | Date: 2004-10-25 13:46 | |
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. |
|||
msg47119 - (view) | Author: Just van Rossum (jvr) * | Date: 2004-10-25 13:58 | |
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? |
|||
msg47120 - (view) | Author: Bob Ippolito (bob.ippolito) * | Date: 2004-10-25 14:11 | |
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. |
|||
msg47121 - (view) | Author: Just van Rossum (jvr) * | Date: 2004-10-25 15:54 | |
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) |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:07 | admin | set | github: 41064 |
2004-10-22 18:55:18 | bob.ippolito | create |