Python parsing iTunes XML/COM
wtanksleyjr at gmail.com
Tue Jul 29 19:53:41 CEST 2008
To ask another way: how do I convert from a file:// URL to a local
path in a standard way, so that filepaths from two different sources
will work the same way in a dictionary?
Right now I'm using the following source:
track_id = url2pathname(urlparse(track_id).path)
url2pathname is from urllib; urlparse is from the urlparse module.
The problems occur when the filenames have non-ascii characters in
them -- I suspect that the URLs are having some encoding placed on
them that Python's decoder doesn't know about.
Thank you all in advance, and thank you for Python.
More information about the Python-list