user2219372
user2219372

Reputation: 2455

Is there any way to start a Python program using Clojure or Lein?

I had tried clojure.java.shell, but I think it's not exactly what I want. It's a future and the stdout is redirected.

I would like to run like lein run xxx to get xxx.py started, and then the info is printed on the console.

Upvotes: 2

Views: 115

Answers (1)

Adeel Ansari
Adeel Ansari

Reputation: 39907

Is this not working?

(:out (clojure.java.shell/sh "python" "prog.py" "arg1" "arg2" :dir "/dir/to/prog.py"))

This should print the output to the console.

Upvotes: 2

Related Questions