It depends.... what do you need to do with the file? Store it or
return it? Perhps I do not understand the question.

The open(....) before should be

open(os.path.join(request.folder,'private',table+'.csv'),'w').write(str
(db(db[table].id).select

because:
os.path.join is safer than str(os.sep).join
request.folder already points to your app folder
your data should go in private, let web2py handle the stuff in the
other folders.

Massimo


On Dec 10, 10:26 pm, somebody <[EMAIL PROTECTED]> wrote:
> if form.accepts(request.vars,session):
>         for table in db.tables:
>             rows=db(db[table].id).select()
>             print rows
>             open(str(os.sep).join([os.getcwd(), 'applications',
>                 request.application, 'databases',
>                 table+'.csv']),'w').write(str(db(db[table].id).select
> ()))
>
> wher should i put the zip code to zip the file created above?
> thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to