How to get subprocess stdout while running git command?
问题 I have a program written in python and used git command in it.. For some reason I don't want to use git-python or others instead of subprocess. But I'm currently stuck in getting git clone output. I've tried some code snippet. Some works fine with commands like ping 8.8.8.8 , but not the git clone . for example using thread def log_worker(stdout): while True: last = non_block_read(stdout).strip() if last != "": print(last) def non_block_read(output): fd = output.fileno() fl = fcntl.fcntl(fd,