bugfix: lib/streams.py: CaptureStream: end_idx must also be > start_idx
lib/streams.py: added file_get_contents()
moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).
streams.py: LineCountStream, LineCountInputStream: Fixed bug where line_num was 1 too high because it started at 1 and was incremented before each line is returned. It now properly starts at 1, but the initial line_num value is 0 to increment to 1 upon encountering the first line. This off-by-one behavior may have been needed for code that associates an error message with a line #, but such code should add 1 to the line_num to get the line # of the error if the error prevents the next line from being read by the LineCount*Stream.
streams.py: Line iteration: Added read_all()
streams.py: LineCountInputStream: Fixed bug where EOF was incorrectly considered a line, causing the final line count (used by ProgressInputStream) to be off by one
streams.py: StreamIter: Define readline() as a separate method so it can be overridden, and all calls to self.next() will use the overridden readline(). This fixes a bug in ProgressInputStream where incremental counts would not be displayed and it would end with "not all input read" if the StreamIter interface was used instead of readline().
streams.py: FilterStream: Inherit from StreamIter so that all descendants automatically have StreamIter functionality
Added ProgressInputStream
streams.py: Added LineCountInputStream, which is faster than LineCountStream for input streams. Added InputStreamsOnlyException and raise it in all *InputStream classes' write() methods.
streams.py: FilterStream: Forward all reads to readline()
streams.py: Added consume(). Added documentation labels to each section.
streams.py: Added FilterStream. Changed TracedStream to use FilterStream.
streams.py: CaptureStream: Ignore start_str when recording and end_str when not recording
streams.py: CaptureStream: Get each match as a separate array elem instead of concatenated together
streams.py: Added copy(). Added section comment for traced streams.
streams.py: Renamed LineCountOutputStream to LineCountStream since TracedStream now works on both input and output streams
streams.py: Added CaptureStream to wrap a stream, capturing matching text. Renamed TracedOutputStream to TracedStream and made it work on both input and output streams. Made TracedStream inherit from WrapStream so that close() would be forwarded properly.
Renamed timeout.py to timeouts.py. Renamed timeout_ vars to timeout.
streams.py: Added TimeoutInputStream and WrapStream. Changed StreamIter to use new WrapStream.
Added streams.py for I/O, which contains StreamIter, TracedOutputStream, and LineCountOutputStream