¡@

Home 

python Programming Glossary: self._buf

Merge and sync stdout and stderr?

http://stackoverflow.com/questions/4984549/merge-and-sync-stdout-and-stderr

__init__ self name impl self._name name self._impl impl self._buf '' self._rows def fileno self Pass through for file descriptor... os.read fd 4096 if not buf return None if ' n' not in buf self._buf buf return # prepend any data previously read then split into.. data previously read then split into lines and format buf self._buf buf tmp rest buf.rsplit ' n' 1 self._buf rest now datetime.datetime.now..

Python: select() doesn't signal all input from pipe

http://stackoverflow.com/questions/5486717/python-select-doesnt-signal-all-input-from-pipe

class LineReader object def __init__ self fd self._fd fd self._buf '' def fileno self return self._fd def readlines self data os.read.. data os.read self._fd 4096 if not data # EOF return None self._buf data if ' n' not in data return tmp self._buf.split ' n' lines.. return None self._buf data if ' n' not in data return tmp self._buf.split ' n' lines self._buf tmp 1 tmp 1 return lines proc_stdout..

Python UTF-16 CSV reader

http://stackoverflow.com/questions/9177820/python-utf-16-csv-reader

else codecs.getincrementalencoder encoder self._buf '' self._eol eol self._reachedEof False def read self size None.. raise StopIteration while True line eol rest self._buf.partition self._eol if eol self._eol self._buf rest return.. eol rest self._buf.partition self._eol if eol self._eol self._buf rest return self._encoder.encode line eol raw self._stream.read..