I discovered pexpect which solves the general problem of running interactive scripts.<div><br></div><div>Thanks,</div><div>Owen<br><br><div class="gmail_quote">On 26 September 2012 19:25, Adrian Georgescu <span dir="ltr"><<a href="mailto:ag@ag-projects.com" target="_blank">ag@ag-projects.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That script is designed to work interactive in the console to allow input of user commands to change the published info. It is not likely to work the way you expect without modifications.<br>

<br>
Regards,<br>
Adrian<br>
<div><div class="h5"><br>
On Sep 26, 2012, at 6:38 AM, Owen Lynch wrote:<br>
<br>
> Hi,<br>
><br>
> I would like to use sip-publish-presence (and other commands) as python sub processes and parse the output. However sip-publish-presence blocks after writing 4K when output is directed anywhere but the console. Is there a way to prevent this?<br>

><br>
> sip-publish-presence -s -a <account><br>
> This works OK, it displays all the initial PUBLISH messages  - output is >4K because of digest authentication challenges. Then it waits for user input.<br>
><br>
> sip-publish-presence -s -a <account> >logfile<br>
> This does not work OK, it writes only the first 4K of the initial PUBLISH messages. Then it waits for user input. The remainder of the initial PUBLISH messages is written after a user enters a command.<br>
><br>
> Could this be fixed by flushing stdout after writes, somewhere in the SIP core engine?<br>
><br>
> Thanks,<br>
> Owen Lynch<br>
</div></div>> _______________________________________________<br>
> SIPBeyondVoIP mailing list<br>
> <a href="mailto:SIPBeyondVoIP@lists.ag-projects.com">SIPBeyondVoIP@lists.ag-projects.com</a><br>
> <a href="http://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip" target="_blank">http://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip</a><br>
<br>
</blockquote></div><br></div>