OO
Egbert Bouwman
egbert at bork.demon.nl
Thu Jul 6 03:51:05 EDT 2000
Hi Paul,
Your explanation of OO in the context of Python was very usefull,
especially as Python is the only OO language that I more or less do
understand. I would like to read much more of this tutorial kind
of stuff, because reinventing the wheel is just beyond my capabilities.
For some time already I thought I had a problem: will I write my database
output to normal stdout, or to a GUI window. You gave this question a new
dimension, because it is not or/or anymore:
> Now I can say
>
> sys.stdout=myOutputClass1()
>
> and hundreds of pieces of code that were supposed to work on the stdout
> "stream" will magically work on myOutputClass. When they say:
> sys.stdout.write( "foo" ), it calls the appropriate write method.
>
> The fact that it has the right methods is enough to make it "stand in"
> for a stream.
My problem seems to boil down to an extra method. Thanks.
egbert
--
Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991
========================================================================
More information about the Python-list
mailing list