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