summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mailman/Utils.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index 8188cf15b..1c111b63b 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -632,3 +632,23 @@ def unhexlify(s):
for i in range(0, len(s), 2):
append(chr(int16(s[i:i+2], 16)))
return string.join(acc, '')
+
+
+
+def write(*args, **kws):
+ file = sys.stdout
+ sep = ' '
+ end = '\n'
+ if kws.has_key('file'):
+ file = kws['file']
+ del kws['file']
+ if kws.has_key('nl'):
+ if not kws['nl']:
+ end = ' '
+ del kws['nl']
+ if kws.has_key('sep'):
+ sep = kws['sep']
+ del kws['sep']
+ if kws:
+ raise TypeError('unexpected keywords')
+ file.write(sep.join(map(str, args)) + end)