input variable into python call subprocess -


i have small python snippet calls larger program (i did not write larger one).

call(['function1', file1,  file2,  'data.labels=abc, xyz']) 

the above works.

input ='abc, xyz' 

now want input "abc, xyz" variable holding value

call(['function1', file1,  file2,  'data.labels=input']) 

but not work.

how can pass variable value variable data.labels within call subprocess.

call(['function1', file1,  file2,  'data.labels=%s' % input]) 

Comments

Popular posts from this blog

rdbms - what exactly the undo information lives in oracle? -

bash - How do you programmatically add a bats test? -

java - Getting exception in JDBC thin driver -