Use print function everywhere

This commit is contained in:
Stuart D. Gathman
2016-07-26 09:52:40 -04:00
parent 99552b40e9
commit 76eb93223c
12 changed files with 46 additions and 35 deletions
+3 -3
View File
@@ -1,3 +1,4 @@
from __future__ import print_function
import unittest
import doctest
import os
@@ -32,9 +33,8 @@ class AddrCacheTestCase(unittest.TestCase):
self.failUnless(not cache['temp@bar.com'])
def testDomain(self):
fp = open(self.fname,'w')
print >>fp,'spammer.com'
fp.close()
with open(self.fname,'w') as fp:
print('spammer.com',file=fp)
cache = AddrCache(fname=self.fname)
cache.load(self.fname,30)
self.failUnless('spammer.com' in cache)