Use os.read(f.fileno(), 50). instead. That does not wait until the specified amount of bytes has been read but returns when it has read ...
確定! 回上一頁