
Doctest (and recently manuel) provide hooks for using custom doctest parsers. zc.customdoctests helps to leverage this to support other languages, such as JavaScript (with python-spidermonkey):
js> function double (x) {
... return x*2;
... }
js> double(2)
4
And with python-manuel, it facilitates doctests that mix multiple languages, such as Python, JavaScript, and sh.