<div><font class="Apple-style-span" face="arial, sans-serif">Hello,</font></div><div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif">You could try something like this:</font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><div>#lang racket</div><div>(require racket/system)</div><div>(display (port->string (car (process <b>(format "racket -e '~a' " '(+ 2 3))</b>))))</div>
</font></div><div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif">That is, quote your "long code" (in the case above (+ 2 3)) and pass it through format.</font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><br></font></div><div><font class="Apple-style-span" face="arial, sans-serif">HTH!</font></div><div><font class="Apple-style-span" face="arial, sans-serif"><br>
</font></div><div><font class="Apple-style-span" face="arial, sans-serif">[]'s</font></div><div><font class="Apple-style-span" face="arial, sans-serif"><br clear="all"></font>Rodolfo Carvalho<br>
<br><br><div class="gmail_quote">On Thu, Sep 8, 2011 at 17:35, Niitsuma Hirotaka <span dir="ltr"><<a href="mailto:hirotaka.niitsuma@gmail.com">hirotaka.niitsuma@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I am trying to call racket with long code from racket<br>
-----------<br>
#lang racket<br>
(require racket/system)<br>
(display (port->string (car (process "racket -e ' [long-code] ' "))))<br>
-----------<br>
<br>
But long-code contain " and ' .<br>
Thus<br>
<br>
(process "racket -e ' [long-long-code] ' "))<br>
<br>
does not work.<br>
<br>
How to call racket with long code ( contain " and ' ) from racket<br>
<br>
Saving long-code into file can not use. Because this is part of web application.<br>
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
</blockquote></div><br></div>