I have the following function, which opens a program and prints out the output one character at a time:
async def run_command(): st = os.stat(\'./myprogram\')