Python Forum

Full Version: Running serverless command in python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have been trying to run serverless sls command using python os.system and getting sls command not found everytime

here is my code

os.system("sls")

Getting sls not found
os.system calls an Operating System command.

This error condition originated from the OS, not from python
All python is doing is informing you of the OS error

if it doesn't work as sls from command line, it wont work if called by os.system.
Have you tried?