I have an external script (sh), I would like to do something like this:
arg1 = 'some string'
arg2 = 'some string2'
arg3 = ''
cmd = ['/usr/local/bin/myscript', 'arg1', 'arg2', 'arg3']
Popen(cmd, shell=False, stdin=PIPE, stdout=PIPE, stderr=PIPE)
It seems to me that if "arg3" is empty, my script I am called with only two arguments, how can I pass the event "arg3" if it is empty?
source
share