* apply and open-pipe*
@ 2008-03-02 18:10 Sebastian Tennant
2008-03-02 18:16 ` Sebastian Tennant
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Tennant @ 2008-03-02 18:10 UTC (permalink / raw)
To: guile-user
Hi list,
I want to provide a list of strings the open-pipe* function using apply,
but guile doesn't seem ot like 'apply'ing lists to open-pipe*
guile> (use-modules (ice-9 popen) (ice-9 rdelim))
guile> (define temp-port #f)
guile> (set! temp-port (apply 'open-pipe* OPEN_READ "ls" '("-l")))
Backtrace:
In standard input:
3: 0* (set! temp-port (apply (quote {open-pipe*}) OPEN_READ "ls"
(quote ("-l"))))
3: 1* [apply {open-pipe*} "r" "ls" "-l"]
In unknown file:
?: 2 [{open-pipe*}]
?: 3* [{open-pipe*} "r" "ls" "-l"]
ERROR: In procedure apply:
ERROR: Wrong type argument in position 1: open-pipe*
ABORT: (wrong-type-arg)
I suspect this is because open-pipe* itself uses apply to call
open-process.
How can I work around this limitation, or am I just doing something
wrong?
Sebastian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-02 18:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-02 18:10 apply and open-pipe* Sebastian Tennant
2008-03-02 18:16 ` Sebastian Tennant
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).