I’m trying to run a Python script which is hosted on a different server. I have access to both servers. I’ve tried to use an Apache server with a php script which runs the python script and returns the output, using shell_exec()
. But it seems like its capping at 100 (while I can still run the file myself when logged in as root). My question about that is right here: https://serverfault.com/questions/1017357/centos-php-processes-limited-with-shell-exec.
Is there another way to run the Python script which is hosted on my server, from another python script on my pc?
Thanks for your time!
2
Answers
Either you can use
subprocess.call
module which will run it as a child process or you can use something like this.(This is to run python from a file. You may modify it accordingly to download it and run)
You can try using this