Is sys.stderr a block device or character device in Python3?

view story

http://stackoverflow.com – In C language, if I write codes like this: #include <stdio.h> #include <unistd.h> int main() { while(1) { fprintf(stdout,"hello-std-out"); fprintf(stderr,"hello-std-err"); sleep(1); } return 0; } The stdout will not be displayed because it's a block device. But stderr will be displayed because it's not. However, if I write similar codes in Python3: import sys import time if __name__ == '__main__': while True: sys.stdout.write("hello-std-out") sys.stderr.write("hello-stderr") time.sleep(1) Both stdout and st (HowTos)