I have 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)
I seems, that if "arg3" is empty, my script i called only with two arguments, how can I pass "arg3" event if it's empty?
arg3is not'""'?'""'does work (which is wrong BTW), but''does not, then your problem is probably in the script you call. If that is a shell script, you may have forgotten to quote the arguments. Besides that, I cannot reproduce your problem.