def METHOD_NAME(command):
    process = subprocess.Popen(command, 
                                shell=True,
                                stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE,
                                universal_newlines=True)
    while process.poll() is None:
        line = process.stdout.readline()
        print(line)