Beispiel #1
0
 def getDocument(self, fileName):
         try:
             reader = DocumentReader(fileName)
             return reader.read()
         except (IOError, XmlException), e:
             name = Path.GetFileName(fileName)
             MessageBox.Show(
                 'Could not read file "%s"\r\nThe error was:\r\n%s' %
                     (name, str(e)),
                 "Error Saving File",
                 MessageBoxButtons.OK,
                 MessageBoxIcon.Error
             )
             return None
def getDocument():
    reader = DocumentReader(Page.MapPath(self.filename))
    return reader.read()
Beispiel #3
0
def getDocument():
    reader = DocumentReader(Page.MapPath(DOCUMENT_FILE))
    return reader.read()