From fc27d30e268936baaac72ef2e58a7f1292333723 Mon Sep 17 00:00:00 2001 From: Rajeesh K Nambiar Date: Sun, 11 Jan 2009 00:10:17 +0530 Subject: Accept return values from Payyans and display error messages --- pychathans/chathans.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pychathans') diff --git a/pychathans/chathans.py b/pychathans/chathans.py index eab4c8d..4738fe7 100644 --- a/pychathans/chathans.py +++ b/pychathans/chathans.py @@ -147,9 +147,15 @@ class Chathans (gtk.Window): # ഓഹ്, പയ്യന്‍! നീ വ്യാഘ്രമാകുന്നു. payyan = Payyans(self.AsciiFile, self.UnicodeFile, self.MappingFile) - payyan.ascii2unicode() + status = payyan.ascii2unicode() + print status + if status == None: + msg = "Coversion Done - Unicode file :" + self.UnicodeFile + if status == 1: + msg = "Could not find the pdftotext utility. Exiting..." + if status == 2: + msg = "Syntax Error in Mapping file. Exiting..." # കത്തിച്ചു കഴിഞ്ഞു. - msg = "Coversion Done - Unicode file :" + self.UnicodeFile dlg = gtk.MessageDialog(self.get_toplevel(), gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, -- cgit