record =db.mytable(id) originalfilename, stream = db.mytable.myfield.retrieve(record.myfield) data = stream.read()
where myfield must be of upload type On Saturday, 21 April 2012 12:48:14 UTC-5, Daniel Kaplan wrote: > > > I'm a new user of Python/web2py working on a scientific application. I've > created a model of a table with a field of type 'upload' that will accept a > csv file. Inside this csv file are comma separated floats, and there are > several rows of numbers. > > Example: > > 100, 200, 300 > 1.2, 1.5, 1.6 > > From the controller, I want to get access to this csv file, parse the data > such that the end result is a numeric matrix, and be able to manipulate the > numbers in numpy or use them in matploblib. How can I do this?