[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyKDE] Working with QTextStream
From: Phil Thompson <phil () river-bank ! demon ! co ! uk>
Date: 2001-06-30 20:55:58
[Download RAW message or body]
Boudewijn Rempt wrote:
>
> I'm investigating PyQt's stream classes - since they are implemented,
> I need to say something about them. From what I've seen up to now
> I understand that it isn't possible to actually write to the streams,
> since there is no write method that corresponds to the read method.
> You're supposed to use C++'s << operator.
>
> Things don't work that way on Python. Would it be possible to make
> a synthetic write method that replaces <<? Or is that just to much
> work to make something work for which there are perfect Python
> alternatives?
PyQt makes very little use of operators, even though SIP supports
providing handwritten code to provide class specific implementations of
all Python operators (including <<). So it would be possible to
implement << for Qt streams.
Generally I didn't bother with things where there was clearly a Python
way of doing things - like i/o. I suspect though that fully implementing
the streams might be useful.
Phil
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic