>Python's file.read() corresponds most closely to C's fread(3). >Python's os.read() corresponds most closely to POSIX's read(2). >Maybe you want > os.read(0, 256) >instead of > sys.stdin.read(256) Thanks for your help, Jeff, you are right. I erroneously thought that reading from stdin was the same than an os's read. Now it works. arnau