You can make a wrapper script around bip32gen, in a single file using `os.spawnl` to create a bip32gen subprocess and wait for it to exit. The wrapper will just read the list of keys from a file and loop through them.
#!/usr/bin/python3
import os
keys = []
file = open('keys.txt' 'r')
for l in file:
keys.append(l.strip('\n'))
for k in keys:
os.spawnl(os.P_WAIT, '/path/to/bip32gen', ['cmd', 'options', 'as', 'list'])