Python subprocess getoutput

This has been tested in python flask debug environments and should work in situations where new line characters are not being properly interpretted by the standard python subprcess getoutput function.

def run(cmd): from subprocess import getoutput;x=getoutput(cmd);print(x,end='\n')

Last updated

Was this helpful?