Re: Redirecting stdout/stderr to the listener in the IDE
I've looked through them, but they call a different process.
To make the things simpler, how to get "puts" to print on the lisp IDE
console, or at least somewhere?
(fli:define-foreign-function (puts "puts")
((text (:reference-pass :ef-mb-string))))
and then get
(puts "blah")
to print blah in the IDE. If I run LW as a console, it works.
On Win32 I've tried allocating a console:
(fli:define-foreign-function (alloc-console "AllocConsole")
())
(alloc-console)
and a text console popped-up, but I'm lost of how to connect
*terminal-io*, *debug-io* or any output to it.
Actually I was able to get it, and with combination of it and using
the FAR manager it's doable, but I wonder if something better could be
done.
Here is how:
lispworks-6-0-0-x86-win32 1>one.txt 2>two.txt
then keepeing far.exe browsing one.txt (it keeps scrolling). Weird but works.
Maybe on the Mac there would be a solution like this one.
On Thu, Jan 7, 2010 at 4:48 PM, John DeSoi <desoi@pgedit.com> wrote:
> Maybe system:open-pipe or system:call-system would allow you to capture that?
>
>
> On Jan 7, 2010, at 11:27 AM, malkia wrote:
>
>> I'm using FLI to connect to a "C" library, and some functions of that
>> library print directly to stdout/stderr.
>>
>> I can get the output, if I run the console version of Lispworks. But
>> from the IDE I can't do much.
>>
>> I've looked through the documentation, but couldn't find anything that
>> it possible.
>>
>> How would one do this?
>>
>> I'm running Lispworks 6.0 32.bit on both my Mac OS X, and Windows XP,
>> so I'm interrested in solution for both if there is any.
>
>
>
>
> John DeSoi, Ph.D.
>
>
>
>
>
--
Dimiter "malkia" Stanev,
ICQ: 21875894
malkia@mac.com
malkia@gmail.com