[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
apply and open-pipe*
From: |
Sebastian Tennant |
Subject: |
apply and open-pipe* |
Date: |
Sun, 02 Mar 2008 20:10:59 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) |
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
- apply and open-pipe*,
Sebastian Tennant <=