2
# Expand-functions in this modude mostly for demonstration
3
# than for daily use...
7
import builtins as interpreter
9
import __builtin__ as interpreter
12
from io import StringIO
14
from cStringIO import StringIO
19
# get automatic conversion to unicode or (that failing)
20
# a string representation
21
return interpreter.eval(s)
24
# execute a block. sys.stdout is written to the document
32
return io.getvalue().strip() # should we always strip?
37
# kate: hl python; indent-width 4;