I'm trying to execute a Python command within my Scala application. I've seen multiple SO questions showing how to do this, and it works, but my second command doesnt seem to do anything.
In the code below, from src.main import run_beta; executes but run_beta() does not.
When I run it straight in the command line: python -c 'from src.main import run_beta; run_beta()', it works fine. Any ideas what I'm doing wrong?
val cli_command = Seq(
"python"
,"-c"
,"'from src.main import run_beta; run_beta()'"
)
println(s"CLI command is: $cli_command")
val cli_logger = ProcessLogger(
(o: String) => println("CLI_STDOUT: " + o),
(e: String) => println("CLI_STDERR " + e))
cli_command ! cli_logger
'. I don't think they serve any purpose when invoked without the shell.