#!/usr/bin/env python ############################################################################### # PyBBCodePreview 1.0 - PyBBCodePreview.py # Copyright (c) 2006 Andrew J. Bennieston # Released under the terms of the BSD license # http://www.opensource.org/licenses/bsd-license.php ############################################################################### import re, string, sys # Replacements which can be made directly, without context or regexp groups simple_replacements = [ ('<', '<'), ('>', '>'), (r'\[b]', ""), (r'\[/b]', ""), (r'\[i]', ""), (r'\[/i]', ""), (r'\[u]', ""), (r'\[/u]', ""), (r'\[list]', "