I think Ialejandro wants to import:

All tables...
db.import_from_csv_file(open('somefile.csv', 'rb'))
One table...
db.person.import_from_csv_file(open('test.csv', 'r'))

See the book, DAL chapter for more information about that.

On Mar 29, 2:09 am, Massimo Di Pierro <[email protected]>
wrote:
> web2py -S appname -M -N -R script.py
>
> and script.py should just contain:
>
> db.export_to_csv_file(open('filename','wb'))
>
> On Mar 28, 8:05 pm, Ialejandro <[email protected]> wrote:
>
> > Hi!! How could I save data to DB from a script??
>
> > I have a script that runs with "web2py -R script.py"
>
> > How could I handle the DB from that script??
>
> > I just have this:
>
> > From gluon Import DAL
>
> > and then???
>
>

Reply via email to