On Apr 23, 1:17 pm, Terry Reedy wrote:
> On 4/23/2010 10:20 AM, Red wrote:
>
> > My apologies for what is probably a simple question to most on this
> > group. However, I am new to python and very new to json.
>
> > I am trying to read in a json file from a twitter download. There are,
> > general
Thanks to Cliff and Rolando who saw where my real problem was.
Terry,Jim: I had not seen the tutorial before, so I'll have to dig
into that as well. So little time.
Cheers
On Apr 23, 10:06 am, "J. Cliff Dyer" wrote:
> You need to know what your input data actually looks like, and the best
> th
On 4/23/2010 10:51 AM, Jim Byrnes wrote:
I can't help you directly with your problem but have you seen this:
http://arstechnica.com/open-source/guides/2010/04/tutorial-use-twitters-new-real-time-stream-api-in-python.ars
Yes. Ignore the part about push versus pull (you are already doing the
l
On 4/23/2010 10:20 AM, Red wrote:
My apologies for what is probably a simple question to most on this
group. However, I am new to python and very new to json.
I am trying to read in a json file from a twitter download. There are,
generally, two types of lines: those lines with "text" and the oth
You need to know what your input data actually looks like, and the best
thing for that is a little bit of formatting. I bet you can figure out
the problem yourself, once you see the structure of your data more
clearly. I've reformatted the JSON for you to help out.
On Fri, 2010-04-23 at 07:20
On Fri, Apr 23, 2010 at 10:20 AM, Red wrote:
[...]
> for line in f:
> j = json.loads(line)
> if 'text' in j:
> if 'lang' in j:
> lang = j['lang']
> print "language", lang
> text = j['text']
"lang" key is in
Red wrote:
My apologies for what is probably a simple question to most on this
group. However, I am new to python and very new to json.
I am trying to read in a json file from a twitter download. There are,
generally, two types of lines: those lines with "text" and the other
lines. I am only in