Splitting SAX results
Jerry Hill
malaclypse2 at gmail.com
Fri Jun 8 18:33:30 EDT 2007
On 6/8/07, IamIan <iansan at gmail.com> wrote:
> Well SAX isn't the problem... maybe I should repost this with a
> different title. The SAX part works just as I want, but the results I
> get back need to be manipulated. No matter what I try I can't split a
> result like 'Title 1:Description' on the colon without getting an
> IndexError. Ideas anyone?
I don't think you've showed us any examples of the code you're having
trouble with. I don't see anything in your original post that tries
to split strings. If you just want to know how split works, here's an
example:
>>> t = 'Title1:Description'
>>> key, value = t.split(':')
>>> print key
Title1
>>> print value
Description
>>>
If that doesn't help, show us a sample of some of the data you're
working with, what you've
tried so far, and what the end result is supposed to look like.
--
Jerry
More information about the Python-list
mailing list