I tried executing a server daemon with gnu screen from subprocess call but it didn’t even start
subprocess.call(["screen", "-dmS test ./server"])
I was told that running screen requires terminal, hence the reason why I can’t simply execute it with call. Can you show me some piece of codes to do this?
Try
You need to break the argument string into separate arguments, one per string.
Here’s the relevant quote from the
subprocessdocs:So by default, the arguments are used exactly as you give them; it doesn’t try to parse a string into multiple arguments. If you set
shelltotrue, you could try the following:and the string would be parsed exactly like a command line.