If I understand you want something like this
import os
files=os.listdir(os.path.join(request.folder,'databases'))
# choose a file, for example
file=files[1]
db=SQLDB('sqlite://%s'+file)
db.define_table(....)
It should go in the model, but nothing prevents you from putting this
code somewhere else like in a controller action.
Massimo
On Jun 11, 12:48 pm, JohnMc <[email protected]> wrote:
> I have been approached to develop a program to manage .BIN files for
> network routers. The table would be simple. But the one requirement
> they want is the data set has to be portable.
>
> I am considering using SQLite for the storage. From a high level a
> master DB/table would be used for the system and to keep records on
> the various DBs. Each DB would store the .bin files for that
> particular router. But from a design perspective is it possible in
> web2py to manage the DB cursor so as to select the appropriate SQLite
> DB to interact with? If so, anybody have an example?
>
> Thanks.
>
> JohnMc
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---