From 82a27c6de81f5c879a2099d84724f5643c6e5159 Mon Sep 17 00:00:00 2001 From: bwarsaw Date: Wed, 10 Nov 1999 19:51:11 +0000 Subject: An import wrapper around cStringIO/StringIO --- Mailman/pythonlib/StringIO.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Mailman/pythonlib/StringIO.py (limited to 'Mailman/pythonlib/StringIO.py') diff --git a/Mailman/pythonlib/StringIO.py b/Mailman/pythonlib/StringIO.py new file mode 100644 index 000000000..009995006 --- /dev/null +++ b/Mailman/pythonlib/StringIO.py @@ -0,0 +1,22 @@ +# Copyright (C) 1998 by the Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +"""Convenience wrapper which tries to load cStringIO, followed by StringIO.""" + +try: + from cStringIO import * +except ImportError: + from StringIO import * -- cgit v1.2.3-70-g09d2