db.tables is a list of the names of the tables in db, and 
db.tablename.fields is a list of the names of the fields in db.tablename. Is 
that what you're looking for?
 
Anthony

On Wednesday, July 6, 2011 12:27:09 PM UTC-4, mart wrote:

> hi, 
>
> question: 
>
> how could I guess the field in something like an interactive shell? 
>
> i assume, I have to specify db.tableName.filedName? 
>
> is there something like db.myTable.myField.type? 
>
> thanks, 
> Mart :) 
>
> On Jul 4, 12:11 pm, mart <msene...@gmail.com> wrote: 
> > ah ha! thank you very much!!!!! :) 
> > 
> > On Jul 4, 11:46 am, Massimo Di Pierro <massimo....@gmail.com> 
> > wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > f = Field('myString') 
> > 
> > > print f.type 
> > > if isinstance(f.type,str) and f.type=='string': .. 
> > > if isinstance(f.type,str) and f.type=='text': .. 
> > > if isinstance(f.type,str) and f.type=='upload': .. 
> > > if isinstance(f.type,str) and f.type=='blob': .. 
> > > .. 
> > > if not isinstance(f.type,str): # custom field probably 
> > 
> > > On Jul 4, 10:17 am, mart <msene...@gmail.com> wrote: 
> > 
> > > > woops, sorry.... 
> > 
> > > > so something like: 
> > 
> > > > if isinstance(Field,list): blala 
> > > > elif isinstance(Field,str): blala 
> > > > else:blabla 
> > 
> > > > thanks, 
> > > > Mart :) 
> > 
> > > > On Jul 4, 11:15 am, mart <msene...@gmail.com> wrote: 
> > 
> > > > > Can dal guess field type even if not explicit? 
> > 
> > > > > I.e. if I have a Field like Field('myString') but a script ends up 
> > > > > inserting something that looks like a list, how can I have a 
> default 
> > > > > check? 
> > 
> > > > > something like:

Reply via email to