[racket] using Python to pipe data through Racket

From: Matthew Butterick (mb.list.acct at gmail.com)
Date: Tue Apr 9 23:19:48 EDT 2013

New Racket user, first list question.

I'm using scribble/text as a preprocessor language for a system mostly
written in Python.

What's the best way to process an arbitrary chunk of scribble/text data,
using Racket, from within a Python script?

Right now I'm making a temp file that begins "#lang scribble/text" and
using os.popen to feed the temp file to racket. Works, but seems like the
wrong idiom.

However, I've not been able to figure out how to pipe the same scribble
input through racket. I know about racket -e, but that throws an error on
the "#lang scribble/text" line (specifically, "#f::0: read: #lang not
enabled in the current context")

Matthew Butterick
mb.list.acct at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130409/b4f63f86/attachment.html>

Posted on the users mailing list.