Permission denied, while trying to launch a python script from inside a python script using OS
Question: I'm using this python script to try to launch, another. The intention is to do
this multiple times so that I can launch 4 similar scripts with just one
command. " import os

    
    
    os.system("/path/to/file/.../script.py")
    

" However when I run the script I get : Permission denied

What am I doing wrong?


Answer: You should be importing scripts and py files instead of doing an OS
workaround. You could compile your scripts as modules into scripts.py and do

    
    
    import [something] from scripts
    

Or you could wrap it all up in a main() operation and run scripts in your
current file.

Hope this helps. I'd reserve using os.system() to run exe files or things
outside of Python's immediate scope.

