Python Forum
Running serverless command in python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Running serverless command in python (/thread-9039.html)



Running serverless command in python - nacheeket - Mar-18-2018

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


RE: Running serverless command in python - Larz60+ - Mar-18-2018

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?