Classes in Python

Peter Otten __peter__ at web.de
Tue Aug 5 03:27:04 EDT 2003


Wiebke Pätzold wrote:

> Could somebody help me with a task?

As You seem to know not much about Python, instead of messing around
with classes I would recommend the simplest aproach I can think of (not
knowing the Mk4py package), which would be:

<not tested>
import Mk4py
db = Mk4py.storage("c:\\datafile.mk", 1)
vw = db.view("people")

for r in vw:
    nachname = vw[r.index].Nachname
    if nachname.startswith("Ge"):
        print nachname
</not tested>

If this works, take it for now, and if you can spare some time,
read the Python tutorial (It's very good). 
You can always refine your code, once it is running :-)

Peter




More information about the Python-list mailing list