<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Here is a snippet that invokes a python program and captures the output.</div><div><br></div><div><a href="https://github.com/norton/asciiedoc/blob/master/src/asciiedoc_lib.erl#L96">https://github.com/norton/asciiedoc/blob/master/src/asciiedoc_lib.erl#L96</a></div><div><br></div><div>This example isn't interactive but might be of help to you.</div><div><br></div><div>regards,</div><div><br></div><div>Joe N.</div><br><div><div>On Jan 28, 2013, at 8:03 AM, pablo platt <<a href="mailto:pablo.platt@gmail.com">pablo.platt@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">erlport looks interesting but I don't need to manipulate the python shell response.<br>I want to start a python shell (or any other shell), send arbitrary commands to it and get the response.<br><br><div class="gmail_quote">
On Mon, Jan 28, 2013 at 12:53 AM, Steve Vinoski <span dir="ltr"><<a href="mailto:vinoski@ieee.org" target="_blank">vinoski@ieee.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div><div class="h5">On Sun, Jan 27, 2013 at 4:56 PM, pablo platt <span dir="ltr"><<a href="mailto:pablo.platt@gmail.com" target="_blank">pablo.platt@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">How can I get the output of a python shell?<br><br>This is what I'm trying to do:<br>> Port = open_port({spawn, "python"}, [binary, exit_status]).<br>#Port<0.586><br>> port_command(Port, "print 1\n").<br>


true<br>> flush().<br>ok<br><br>When calling flush(), I expect to get {Port,{data, <<"1\n">>}}<br>but I'm not getting any message.<br></div></blockquote><div><br></div></div></div><div>You might want to try ErlPort:</div>

<div><br></div><div><a href="http://erlport.org/" target="_blank">http://erlport.org</a></div><div><br></div><div>Otherwise, you're just going to have to re-code what ErlPort already gives you.</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>--steve</div></font></span></div>
</blockquote></div><br></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br></body></html>