Can't you turn the csv into json on the server side?
On Jan 20, 2013 2:24 PM, "Don Dwiggins" <[email protected]> wrote:
> I'm just getting started on my first pyjs app, and am enjoying it so
> far. I've run into a problem, though:
>
> My app will be getting CSV data from an HTTP request. For now, I'm
> testing it with local CSV data that I've wrapped as a string in a .py
> module, so I can import it (I can't read it from a local file, natch, and I
> don't want to tackle AJAX until I have to).
>
> So, what I have on import is a CSV string that I want to parse into a list
> of lists with the csv.reader() method. That method, though, takes a
> "file-like object", which I can create using StringIO. The problem,
> though, is that, when I do "rdr = reader(StringIO(csvdata))", I get the
> following error:
>
> *JavaScript Error: * TypeError: self is undefined at line number 12087.
> Please inform webmaster.
> TrackerSucker.py, line 89:
> rdr = reader(sio)
>
>
> ("sio" is the StringIO object.)
>
> Is this something I can fix or easily work around, or am I going to need
> to find a different approach?
>
> Thanks,
> Don Dwiggins
>
>
> --
>
>
>
>
--