* (no subject)
@ 2010-05-07 19:28 Sven Schäfer
2010-05-07 20:58 ` console info objc
0 siblings, 1 reply; 6+ messages in thread
From: Sven Schäfer @ 2010-05-07 19:28 UTC (permalink / raw)
To: guile-user
[-- Attachment #1: Type: text/plain, Size: 376 bytes --]
Hello,
Im new in this list and I use Guile for the first time.
I start Guile in a program written in C.
Is it possible to disable the output guile> at the standard output?
That means, when I start Guile there is no guile> in the command line but
I can give instructions to the interpreter.
I hope somebody can help me with this problem.
[-- Attachment #2: Type: text/html, Size: 2589 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* console info
2010-05-07 19:28 (no subject) Sven Schäfer
@ 2010-05-07 20:58 ` objc
2010-05-08 6:28 ` AW: " Sven Schäfer
0 siblings, 1 reply; 6+ messages in thread
From: objc @ 2010-05-07 20:58 UTC (permalink / raw)
To: Sven Schäfer, guile-user
[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]
Hi Sven,
I'm messing around with MS Windows right now...
One interesting way is
"How to spawn console processes with redirected standard handles"
sample code at :
http://support.microsoft.com/kb/190351
and it is quite a general solution for many applications (such as using guile with windows).
related :
Having a console with windows is easy to do, and VERY useful for writing debug info using a simple printf(). (compile with a -mconsole flag).
You could hack around your guile source of course ;O).
Hope this helps,
obj.
From: Sven Schäfer
Sent: Friday, May 07, 2010 8:28 PM
To: guile-user@gnu.org
Subject: (no subject)
Hello,
I'm new in this list and I use Guile for the first time.
I start Guile in a program written in C.
Is it possible to disable the output "guile>" at the standard output?
That means, when I start Guile there is no "guile>" in the command line but I can give instructions to the interpreter.
I hope somebody can help me with this problem.
[-- Attachment #2: Type: text/html, Size: 5006 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* AW: console info
2010-05-07 20:58 ` console info objc
@ 2010-05-08 6:28 ` Sven Schäfer
2010-05-08 10:03 ` Orm Finnendahl
2010-05-08 15:14 ` AW: " Thien-Thi Nguyen
0 siblings, 2 replies; 6+ messages in thread
From: Sven Schäfer @ 2010-05-08 6:28 UTC (permalink / raw)
To: 'objc', guile-user
[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]
Hi obj.
I forgot to write that I will use Guile on a linux system.
Only the output guile> should be disable. All other outputs from Guile
should go to the stdout.
A short overview:
I will write the output from Guile in variables. A second program
communicates with the Guile-program over netcat. This program sends
instructions to the Guile program. Then the Guile program returns some data
(for example an integer). When I now write the output in the second program
into a variable, I write also the guile> into it. Because of this I will
only disable the output of guile>.
I hope I write this a little bit understandable. :-)
Sven
_____
Von: objc [mailto:objcjohn@hotmail.com]
Gesendet: Freitag, 7. Mai 2010 22:58
An: Sven Schäfer; guile-user@gnu.org
Betreff: console info
Hi Sven,
I'm messing around with MS Windows right now...
One interesting way is
"How to spawn console processes with redirected standard handles"
sample code at :
http://support.microsoft.com/kb/190351
and it is quite a general solution for many applications (such as using
guile with windows).
related :
Having a console with windows is easy to do, and VERY useful for writing
debug info using a simple printf(). (compile with a -mconsole flag).
You could hack around your guile source of course ;O).
Hope this helps,
obj.
From: Sven <mailto:sven-schaefer-ww@web.de> Schäfer
Sent: Friday, May 07, 2010 8:28 PM
To: guile-user@gnu.org
Subject: (no subject)
Hello,
Im new in this list and I use Guile for the first time.
I start Guile in a program written in C.
Is it possible to disable the output guile> at the standard output?
That means, when I start Guile there is no guile> in the command line but
I can give instructions to the interpreter.
I hope somebody can help me with this problem.
[-- Attachment #2: Type: text/html, Size: 13099 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: console info
2010-05-08 6:28 ` AW: " Sven Schäfer
@ 2010-05-08 10:03 ` Orm Finnendahl
2010-05-08 15:14 ` AW: " Thien-Thi Nguyen
1 sibling, 0 replies; 6+ messages in thread
From: Orm Finnendahl @ 2010-05-08 10:03 UTC (permalink / raw)
To: Sven Schäfer; +Cc: guile-user
Hi Sven,
I don't know whether there is a way to change the prompt to disappear
completely without changing the sources (as this is generally not the
intended behaviour) but as a workaround you could pipe the guile
output through sed to remove the prompt. Try this command in a
terminal:
guile | sed -e 's/^guile>//g'
That should do what you want. You can do that programmatically as well
or invoke this as a script from within your program.
In general your approach seems strange to me. Without exactly knowing
how to do it I'd suggest you look for a way to approach guile's read
routine directly and handle the results internally rather than dealing
with netcat and stdout.
--
Orm
Am Saturday, den 08. May 2010 um 08:28:38 Uhr (+0200) schrieb Sven Schäfer:
>
>
> Hi obj.
>
>
>
> I forgot to write that I will use Guile on a linux system.
>
> Only the output “guile>” should be disable. All other outputs from Guile
> should go to the stdout.
>
>
>
> A short overview:
>
> I will write the output from Guile in variables. A second program
> communicates with the “Guile”-program over netcat. This program sends
> instructions to the Guile program. Then the Guile program returns some
> data (for example an integer). When I now write the output in the second
> program into a variable, I write also the “guile>” into it. Because of
> this I will only disable the output of “guile>”.
>
>
>
> I hope I write this a little bit understandable. J
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: AW: console info
2010-05-08 6:28 ` AW: " Sven Schäfer
2010-05-08 10:03 ` Orm Finnendahl
@ 2010-05-08 15:14 ` Thien-Thi Nguyen
2010-05-21 11:01 ` Andy Wingo
1 sibling, 1 reply; 6+ messages in thread
From: Thien-Thi Nguyen @ 2010-05-08 15:14 UTC (permalink / raw)
To: guile-user
() Sven Schäfer <sven-schaefer-ww@web.de>
() Sat, 8 May 2010 08:28:38 +0200
Because of this I will only disable the output of "guile>".
On guile init, you can set the repl prompt using
‘set-repl-prompt!’. For example, in an interactive
session:
$ guile
guile> 1
1
guile> (set-repl-prompt! "")
2
2
Here, the first 1 and the first 2 are the input, everything else
is output.
Caveat: The above is tested w/ Guile 1.4.x, perhaps the interface
has changed w/ other Guile versions.
thi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: AW: console info
2010-05-08 15:14 ` AW: " Thien-Thi Nguyen
@ 2010-05-21 11:01 ` Andy Wingo
0 siblings, 0 replies; 6+ messages in thread
From: Andy Wingo @ 2010-05-21 11:01 UTC (permalink / raw)
To: Thien-Thi Nguyen; +Cc: guile-user
Hello,
On Sat 08 May 2010 17:14, Thien-Thi Nguyen <ttn@gnuvola.org> writes:
> $ guile
> guile> 1
> 1
> guile> (set-repl-prompt! "")
> 2
> 2
This will work on 1.8 and before. In 2.0 the function is there but it
does nothing, which is a bug. I'll see about fixing that.
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-21 11:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-07 19:28 (no subject) Sven Schäfer
2010-05-07 20:58 ` console info objc
2010-05-08 6:28 ` AW: " Sven Schäfer
2010-05-08 10:03 ` Orm Finnendahl
2010-05-08 15:14 ` AW: " Thien-Thi Nguyen
2010-05-21 11:01 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).