From 9058f1c2aaed3e4a1c39b25253d9a55d5b61184d Mon Sep 17 00:00:00 2001 From: Scott Kitterman Date: Mon, 25 Jul 2016 17:29:29 -0400 Subject: [PATCH] sample.py: print is a function in python3 --- sample.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sample.py b/sample.py index c3fee0d..3118bab 100644 --- a/sample.py +++ b/sample.py @@ -21,9 +21,9 @@ class sampleMilter(Milter.Milter): "Milter to replace attachments poisonous to Windows with a WARNING message." def log(self,*msg): - print "%s [%d]" % (strftime('%Y%b%d %H:%M:%S'),self.id), - for i in msg: print i, - print + print("%s [%d]" % (strftime('%Y%b%d %H:%M:%S'),self.id), end=' ') + for i in msg: print(i, end=' ') + print() def __init__(self): self.tempname = None @@ -171,13 +171,13 @@ if __name__ == "__main__": socketname = os.getenv("HOME") + "/pythonsock" Milter.factory = sampleMilter Milter.set_flags(Milter.CHGBODY + Milter.CHGHDRS + Milter.ADDHDRS) - print """To use this with sendmail, add the following to sendmail.cf: + print("""To use this with sendmail, add the following to sendmail.cf: O InputMailFilters=pythonfilter Xpythonfilter, S=local:%s See the sendmail README for libmilter. -sample milter startup""" % socketname +sample milter startup""" % socketname) sys.stdout.flush() Milter.runmilter("pythonfilter",socketname,240) - print "sample milter shutdown" + print("sample milter shutdown")