Thanks jf, that worked:
(ns msms
(:gen-class)
(:use [clojure.contrib.shell-out :only (sh)]))
(defn get-msms-pts-OSX
[{pdb-file :pdb-file density :density radius :radius :as all :or
{density 1.0 radius 1.5}}]
(if (contains? all :pdb-file)
(sh bash :in (str
On Mon, 9 Aug 2010 09:37:14 -0700 (PDT)
Dave david.dreisigme...@gmail.com wrote:
Thanks jf, that worked:
(ns msms
(:gen-class)
(:use [clojure.contrib.shell-out :only (sh)]))
(defn get-msms-pts-OSX
[{pdb-file :pdb-file density :density radius :radius :as all :or
{density 1.0
On Aug 7, 7:27 am, Meikel Brandmeyer m...@kotka.de wrote:
(defn to-env
[env-vars-map]
(- env-vars-map
(map #(str (name (key %)) = (val %)))
into-array))
And an invocation:
user= (to-env {:PATH /bin:/usr/bin :HOME /Users/mb :foo bar})
#String[] [Ljava.lang.String;@58c16b18
Thanks everyone. I have already tried the full path:
(defn get-msms-pts-OSX
;; Finds the msms points for a density (optional DEFAULT = 1.0) and
radius (optional DEFAULT = 1.5)
[pdb-file density radius]
(execute (str /Users/daviddreisigmeyer/msms_MacOSX_2.6.1/
pdb_to_xyzr pdb-file
On Aug 7, 4:46 pm, Dave david.dreisigme...@gmail.com wrote:
(execute (str /../pdb_to_xyzr pdb-file /..)))
Here it seemed to run (the above error isn't shown) but nothing
happened and the REPL become unresponsive again.
I think the issue is that Runtime.exec doesn't start a shell, just
I having some trouble with system calls using clojure (actually a
whole lot more than that but this is the current day's difficulty).
Below, test-execute works, but get-msms-pts-OSX seems to hang, as in
nothing happens and the REPL is unresponsive afterwards. If I run the
output of the (str
Also, this only shows the 2nd call (with ls-arg2):
(defn test-execute [ls-arg1 ls-arg2]
(execute (str ls - ls-arg1))
(execute (str ls - ls-arg2)))
so maybe the difficulty above is some problem with how the multiple
system calls are performed. If I only use this:
(defn get-msms-pts-OSX
On Aug 7, 5:06 am, j-g-faustus johannes.fries...@gmail.com wrote:
I don't think there's a direct way to create a String array
in Clojure
Correction - there is: (into-array String [a b])
jf
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
Hi,
Am 07.08.2010 um 05:06 schrieb j-g-faustus:
I don't think there's a direct way to create a String array in Clojure
(defn to-env
[env-vars-map]
(- env-vars-map
(map #(str (name (key %)) = (val %)))
into-array))
And an invocation:
user= (to-env {:PATH /bin:/usr/bin :HOME
:)
(inc :))
On Sat, Aug 7, 2010 at 7:27 AM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
Am 07.08.2010 um 05:06 schrieb j-g-faustus:
I don't think there's a direct way to create a String array in Clojure
(defn to-env
[env-vars-map]
(- env-vars-map
(map #(str (name (key %)) = (val
10 matches
Mail list logo