#!/usr/bin/env python3 print('hello') import subprocess p=subprocess.run(['/usr/bin/factor'],input='1000000000000000000\n',text=True,capture_output=True) print(repr(p.stdout),repr(p.stderr),p.returncode)