def OnSaveDocument(self, filename):
#       print 'OnSaveDocument() filename=',filename
        savefile = open(filename,"wb")
        txt = self.GetParams()+'\n'
#       print 'writing',txt