The Python script was swallowing the input and output and causing it to stall, so instead of learning more Python to make it work, I opted to hack together a shell script that accomplished the same task.