On Wed, May 31, 2006 at 02:13:07PM -0700, Toby wrote:
> >for table_name in my_list_of_tables:
> >   class Table(SQLObject):
> >      class sqlmeta:
> >         table=table_name
> >         fromDatabase=True
> >
> This is more what I was after, but wouldn't this
> just keep redefining the class Table?  How would

   Not redefining but creating a new class on an every loop.

> I point to the one that I wanted when it came
> time to use them?

   You have to store these classes somewhere.

tables = {}
for table_name in my_list_of_tables:
   class Table(SQLObject):
      class sqlmeta:
         table=table_name
         fromDatabase=True
   tables[table_name] = Table

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to