[Tutor] Proxies/Interceptors for file-like objects
moron.oxy at gmail.com
Thu Feb 19 00:43:35 CET 2009
I'm trying to intercept one or more methods in file-like objects (in
this particular case just sys.stdin really), essentially I need a
What's the idiomatic way to do this? Since file objects do not have a
base class(?), would I need to implement all methods to delegate down
to my wrapped object, or can I use a special method to define default
I came across http://pypi.python.org/pypi/filelike/0.3.2 on googling.
It seems a little overkill for what I want to do however, but it does
define a base class.
More information about the Tutor