Are there any modules or packages which help parsing csv content from a uploaded csv file in appengine. tried using the csv package in python. but it could parse only files in file system but could not data.. http://docs.python.org/library/csv.html
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
No, csv.reader accepts any object that supports line-by-line iteration. Assuming cgi.FieldStorage supports it, and assuming you've posted a file named "file", you should be able to do this:
There is a blobstore input format for the App Engine Mapper: http://code.google.com/p/appengine-mapreduce/
It will read each line from the CSV and send it to your mapper for reading/import. Be careful though because it breaks if there are escaped new lines in the CSV.
Here is an example with the Java implementation: http://ikaisays.com/2010/08/11/using-the-app-engine-mapper-for-bulk-data-import/