From eedb48ad8a056232d1cfd88721a70c17d41219ad Mon Sep 17 00:00:00 2001 From: Mithilesh Kumar Date: Sat, 7 Mar 2020 22:06:12 +0530 Subject: [PATCH] Adding missing parenthesis in print command Python 3 has issue without parenthesis --- resumeParser.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resumeParser.py b/resumeParser.py index 6c0c466..5825035 100644 --- a/resumeParser.py +++ b/resumeParser.py @@ -162,7 +162,7 @@ def readFile(self, fileName): return '' pass else: - print 'Unsupported format' + print ('Unsupported format') return '', '' def preprocess(self, document): @@ -198,14 +198,14 @@ def preprocess(self, document): # sentences - split on the basis of rules of grammar return tokens, lines, sentences except Exception as e: - print e + print(e) def tokenize(self, inputString): try: self.tokens, self.lines, self.sentences = self.preprocess(inputString) return self.tokens, self.lines, self.sentences except Exception as e: - print e + print (e) def getEmail(self, inputString, infoDict, debug=False): ''' @@ -220,7 +220,7 @@ def getEmail(self, inputString, infoDict, debug=False): matches = pattern.findall(inputString) # Gets all email addresses as a list email = matches except Exception as e: - print e + print (e) infoDict['email'] = email @@ -415,7 +415,7 @@ def getQualification(self,inputString,infoDict,D1,D2): line.append(wordstr) except Exception as e: - print traceback.format_exc() + print (traceback.format_exc()) if D1=='c\.?a': infoDict['%sinstitute'%D1] ="I.C.A.I" @@ -430,8 +430,8 @@ def getQualification(self,inputString,infoDict,D1,D2): infoDict['%syear'%D1] =0 infoDict['%sline'%D1]=list(set(line)) except Exception as e: - print traceback.format_exc() - print e + print (traceback.format_exc()) + print (e) def Qualification(self,inputString,infoDict,debug=False):