Python Forum
Running serverless command in python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running serverless command in python
#1
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
Reply
#2
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?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sound Approach for Running a Shell Command? matt_the_hall 8 3,344 Dec-14-2020, 02:52 PM
Last Post: matt_the_hall
  Running Python in Command Prompt Anwar 3 3,077 Nov-15-2020, 03:15 PM
Last Post: snippsat
  Error when running mktorrent subprocess command pythonnewbie138 4 3,837 Sep-16-2020, 01:55 AM
Last Post: pythonnewbie138
  Running linux command line apps... dbrdh 0 1,651 Jan-30-2020, 01:14 PM
Last Post: dbrdh
  Issues with running regedit command from python gohanzdad 10 9,904 May-16-2017, 04:28 PM
Last Post: gohanzdad
  subprocess return of stdout after running Linux command ivanachukapawn 7 10,193 Oct-13-2016, 05:37 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020