MetaKit for python (Mk4py) on Macintosh ... no way :(

Frank Sergeant frank.sergeant at redneck.net
Wed Mar 1 12:26:14 EST 2000


"Gordon McMillan" <gmcm at hypernet.com> writes:

> [Metakit]
 
> view1 = db.view('view1')
> view2 = db.view('view2')
> view2.rename(view2.e, 'd')
> v = view1.join(v2, view1.d)
> v = v.select(f=value)
> for row in v:
>   print row.a, row.c

Thanks for posting the snippet.  The more the merrier.

One thing I think the Tcl version of MetaKit can do is to return
the field values of a row as a list.  I have figured out how to
do that yet with Mk4py.  I'm doing in in a very clunky way by 
using getattr along with a list of column names.

Is there an easy way to do that with Mk4py?

     for row in v:
        list_of_values = row.valuesAsList()


  -- Frank
  frank at canyon-medical.com




More information about the Python-list mailing list