From 7c98be8784b144c87aa3bc843e8fd3ece998d977 Mon Sep 17 00:00:00 2001 From: Simon Morgan Date: Sun, 8 Feb 2009 23:32:33 +0000 Subject: [PATCH] Generalise print functions. --- common.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common.py b/common.py index 2c83ceb..90bdc96 100644 --- a/common.py +++ b/common.py @@ -46,15 +46,16 @@ def print_headers(title): print '' print '' -def print_error(msg): - print '
' +def print_class(msg, class_): + print '
' % class_ print '

%s

' % msg print '
' +def print_error(msg): + print_class(msg, "error") + def print_msg(msg): - print '
' - print '

%s

' % msg - print '
' + print_class(msg, "message") def print_post(title, body, date=None): """Formats and prints a post""" -- 2.11.4.GIT