Browse Source

stdpy: return number of bytes from write() method

rdb 6 years ago
parent
commit
0b52241e95
1 changed files with 1 additions and 0 deletions
  1. 1 0
      direct/src/stdpy/file.py

+ 1 - 0
direct/src/stdpy/file.py

@@ -304,6 +304,7 @@ class StreamIOWrapper(io.IOBase):
         self.__stream.clear()  # clear eof flag
         self.__stream.clear()  # clear eof flag
         self.__write(b)
         self.__write(b)
         self.__lastWrite = True
         self.__lastWrite = True
+        return len(b)
 
 
     def writelines(self, lines):
     def writelines(self, lines):
         if not self.__writer:
         if not self.__writer: