sage: from sagenb.interfaces.expect import
WorksheetProcess_ExpectImplementation
sage: wp = WorksheetProcess_ExpectImplementation()
sage: wp.execute("open('/tmp/foo.txt', 'w').write('foooOOO!'); print
'barRRR!'")
sage: wp.output_status()
Output Status:
output: 'barRRR!'
filenames: []
done: True
I see /tmp/foo.txt on disk only after the last command. Is this the
expected behavior? Or should the parent process call wp.output_status()
after each wp.execute(string), to start executing string?
My apologies for my ignorance.
No. It sounds like a bug. It won't be a problem for sagenb as is,
since the server does pole for output regularly.
> Or should the parent process call wp.output_status()
> after each wp.execute(string), to start executing string?
Maybe the *input* buffer has to be flushed explicitly?
William
>
> My apologies for my ignorance.
>
>
--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org