
On Sunday, March 3, 2013, Benjamin Peterson wrote:
Guido van Rossum <guido@...> writes:
When the io module was originally designed, this was actually one of the (implied) use cases -- one reason I wanted to stop using C stdio was that I didn't like that there is no standard way to get at the data in the buffer, in similar use cases as you're trying to present. (A use case I could think of would be an http server that forks a subprocess after reading e.g. the first line of the http request, or perhaps after the headers.)
What was the API that provided this in the Python version of the io module?
I think it may not have ben more than accessing private instance variables. :-) (Note it still mostly lives as Lib/_pyio.py)
That won't help a concrete use case though, will it? --Guido -- --Guido van Rossum (python.org/~guido)