from wxPython.wx import * import Mk4py dlg = wxFileDialog(None, "Choose a file", ".", "", "*.*", wxOPEN) if dlg.ShowModal() == wxID_OK: startfile= dlg.GetPath() dlg.Destroy() starsavefile = open(startfile,'r+') starsavefile.seek(0) class starreport: def __init__(self): self.L = ([]) pass def starline (self,starstring): # Strips Quouts,(Spaces) and commas then sepparate from commas into list newword=('') tmpfile =('') linelist = ([]) for x in range (len(starstring)): tmpfile = starstring[x] if starstring[x] == '"':# or starstring[x] == ' ': tmpfile =('') if starstring[x] == ',': linelist.append(newword) newword=('') tmpfile =('') newword = (newword) + (tmpfile) self.L = linelist mk = Mk4py db = mk.Storage("c:\\Starport.mk",1) vw = db.getas("people[first:S,last:S,shoesize:I]") key = starreport() llist = '' firstline = starsavefile.readline() while firstline <> '': key.starline(firstline) for st in len(key.L): llist = llist + key.L[st] starsavefile.close()