>> In any case, it is certainly possible to use lisp as a library
>> element rather than using pexpect. I'm not sure why ECLS is special
>> in this context since I've never used it.
>
>I am not aware of any other lisp interpreter that you can easily embed
>in a C library. Can you point me to one?

GCL is just a C program. Use memory mapped I/O to map your input string
as a "file" and your output area as another file. See 
<http://www.ecst.csuchio.edu/~beej/guide/ipc/mmap.html>

Give GCL the memory map file handles for I/O. Call read. (See
<http://cvs.savannah.gnu.org/viewvc/gcl/o/read.d?root=gcl&view=markup>)

Fetch the output from the mmapped memory output "file" region. 

Zero parsing overhead using filelength to delimit the output.



The "problem" with this approach is that (a) it isn't generic like
pexpect and (b) it requires programming (although this is posix).
You could probably hack it up in Cython.

Tim

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to