def METHOD_NAME(self, *args):
    handle = tkFileDialog.asksaveasfile(mode='w',
            initialfile=os.path.basename(self.filename),
            initialdir=os.path.dirname(self.filename),
            parent=self.root)
    if handle:
        with handle:
            self._write(handle)
            self.filename = handle.name