call system run

    Library: flask

    from subprocess import Popen, PIPE
    def exe_f(command='dir', shell=True):
      """Function to execute a command and return stuff"""
      process = Popen(command, shell=shell, stdout=PIPE, stderr=PIPE)
      stdout = process.stdout.read()
      stderr = process.stderr.read()
      return process, stderr, stdout
    def udsShellCommand(resp):
      #create a command string for uds shell use
      cmdStr = UDS_CLIENT_TOOL
      #get others info from resp
      cmdStr = cmdStr + " " + resp['vin']
      return cmdStr
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.