Relative Content

Tag Archive for pythonstringlistsubprocess

How to pass multiple strings into subprocess.run?

I am trying to pass multiple string elements into the subprocess.run() function to generate a midi file with different chords. The chords are generated as a list of strings such as: chords = ['Dm9', 'G7', 'Cmaj7'], but I am struggling to figure out how to pass this into the subprocess.run() function. I have tried passing it as a list, as a tuple, and as a string without the [].