Hi everyone!
I’m facing an issue involving Python and Julia. Here’s my situation:
I have a file containing Julia code, and I need to run this code from Python on my Flask server while capturing the output and any errors (including all error details, if there are any). The catch is that I need to execute this Julia code multiple times.
Currently, I’m using Python’s subprocess module (specifically subprocess.run) to handle this, but it’s slow because it recompiles every time I execute the code. I need a faster solution that takes advantage of Julia’s speed.
I’ve already tried using subprocess with Popen to create an interactive Julia REPL session and also experimented with Julia’s DaemonMode.jl. However, in both cases, I couldn’t reliably capture stdout and stderr.
I haven’t yet explored libraries that simulate Julia within Python, but I’d prefer a solution involving subprocess if possible.
Does anyone have any ideas or suggestions?
Thanks in advance!
submitted by /u/nickashuuu
[link] [comments]
r/learnpython Hi everyone! I’m facing an issue involving Python and Julia. Here’s my situation: I have a file containing Julia code, and I need to run this code from Python on my Flask server while capturing the output and any errors (including all error details, if there are any). The catch is that I need to execute this Julia code multiple times. Currently, I’m using Python’s subprocess module (specifically subprocess.run) to handle this, but it’s slow because it recompiles every time I execute the code. I need a faster solution that takes advantage of Julia’s speed. I’ve already tried using subprocess with Popen to create an interactive Julia REPL session and also experimented with Julia’s DaemonMode.jl. However, in both cases, I couldn’t reliably capture stdout and stderr. I haven’t yet explored libraries that simulate Julia within Python, but I’d prefer a solution involving subprocess if possible. Does anyone have any ideas or suggestions? Thanks in advance! submitted by /u/nickashuuu [link] [comments]
Hi everyone!
I’m facing an issue involving Python and Julia. Here’s my situation:
I have a file containing Julia code, and I need to run this code from Python on my Flask server while capturing the output and any errors (including all error details, if there are any). The catch is that I need to execute this Julia code multiple times.
Currently, I’m using Python’s subprocess module (specifically subprocess.run) to handle this, but it’s slow because it recompiles every time I execute the code. I need a faster solution that takes advantage of Julia’s speed.
I’ve already tried using subprocess with Popen to create an interactive Julia REPL session and also experimented with Julia’s DaemonMode.jl. However, in both cases, I couldn’t reliably capture stdout and stderr.
I haven’t yet explored libraries that simulate Julia within Python, but I’d prefer a solution involving subprocess if possible.
Does anyone have any ideas or suggestions?
Thanks in advance!
submitted by /u/nickashuuu
[link] [comments]