Example #1
0
 def load_show(self, path, checked_save=False):
     '''Load the requested show'''
     if not checked_save and not self.prompt_for_save():
         return
     try:
         utils.logger.info("Loading show %s..." % path)
         self.show = xml.load_show(path)
     except Exception as e: # @FIXME Too general...
         utils.logger.exception("Error while loading file %s:"
                                 % path)
         QtGui.QMessageBox.critical(self.parent,
                                    "ONOES",
                                    "Impossible de lire ce fichier"
                                    "\n\n%s" % str(e)
         )
     else:
         self.parent.fill_fields(self.show)
         self.parent.connect_show_events()
         self.parent.disable_save()
         utils.logger.info("%s loaded" % path)
Example #2
0
'''
Temporary script to test pdf export function
'''
from PyQt4 import QtGui
from lightapp.fileio import xml, html, pdf
#gnnn
import sys

s = xml.load_show('popo.xml')
html = html.serialize_show(s)

#gnnn
app = QtGui.QApplication(sys.argv)

pdf.print_show(html)