+ # Export to image/HTML
+ def on_export_image (self, solution=False):
+ try:
+ sys.stdout.write (self.BLUE + "Exporting puzzle to image/HTML\n")
+ filename = raw_input (self.BRICKRED + "Filename (PNG): " + self.ENDCOL)
+
+ self.puzzle.export_image (filename, solution)
+ sys.stdout.write (self.BLUE + "Successfully exported to file: " +
+ filename + "\n" + self.ENDCOL)
+
+ except crosswordpuzzle.FrozenGridException:
+ sys.stderr.write ("Cannot export as grid is not frozen/finalized")
+