def saveFile(self, fileName, document): try: writer = DocumentWriter(fileName) writer.write(document) return True except IOError, e: name = Path.GetFileName(fileName) MessageBox.Show( 'Could not write file "%s"\r\nThe error was:\r\n%s' % (name, str(e)), "Error Saving File", MessageBoxButtons.OK, MessageBoxIcon.Error ) return False
def saveDocument(document): writer = DocumentWriter(Page.MapPath(self.filename)) writer.write(document)
def saveDocument(document): writer = DocumentWriter(Page.MapPath(DOCUMENT_FILE)) writer.write(document)