Ответ

#  сделал вот так
51t (lenina,1) → All   –  02:52:51 2014-04-01

====[python]====
def sp(s):
pre = 0; code = 0; txt = ''
for n in s.splitlines():
if n == '====' and pre == 0 and code == 0:
txt += u'====<pre>'
pre = 1
elif n == '====' and code == 1:
txt += '</code>====\n'
code = 0
elif n == '====' and pre == 1:
txt += u'\n</pre>====\n'
pre = 0
elif n.startswith('====[') and n.endswith(']===='):
txt += u'====\n<code class="prettyprint lang-%s">' % n[5:-5]

>> Читать далее