[PyKDE] QSocket.readBlock/QSocket.getch() difference
Michael Ferraro
michael at possibleworlds.com
Tue Dec 4 17:54:52 GMT 2001
thanks for the fixes --
since I had gotten PyQt3.0 as a tar I pulled the cvs tree down into a
new directory an *copied* the qsocket.sip file into my original source
tree. Typed make. Make indicated that nothing need be done for 'all' in all
the subdirectories (including the PyQt-3.0/sip where I put qsocket.sip)
I checked the qsocket.sip date and file and the date is correct and the
file contains the fixes.
I then tried a make rebuild-src which reported that
sip: Unable to find file "sip/qt.sip"
I tried to run sip on the qsocket.sip manually with
sip -I sip -c qtnetwork -m qt/Makefile.am sip/qsocket.sip
and got:
sip: sip/qsocket.sip:59: Lower bound is not a primary version in the
module
then went back to the version I checked out from cvs and did a make build,
followed
by a make which complained about a lot of things being not found
copypyuic[23]: tmake: not found
sed: can't read PyQt/pyuic/Makefile.win32-msvc: No such file or directory
cp: PyQt/t1.html: No such file or directory
/usr/local/src/PyQt-cvs/PyQt
configtools[4]: aclocal: not found
configtools[5]: autoheader: not found
configtools[6]: automake not found
configtools[7]: libtoolize: not found
configtools[8]: autoconf: not found
How should I apply the fixes ??
Michael
Phil Thompson wrote:
> Michael Ferraro wrote:
> >
> > hello
> >
> > in response to a readyRead() signal i check if a socket.bytesAvailable()
> >
> > is non-zero at which point I do a socket.readBlock(maxbytes). The
> > buffer returned is zero bytes long and doesn't have any data in it.
> >
> > As a test I followed the readBlock with a loop that makes calls to
> > socket.getch() which returns valid data for the number of
> > bytesAvailable.
> >
> > I can use getch()s if I have to, but it seems that readBlock should work
> >
> > in here. What might I be doing wrong this time, I ask.
> >
> > def HandShake (self):
> > socket = self.sender()
> > n = socket.bytesAvailable()
> > if n > 0:
> > hail = socket.readBlock(32)
> > print "readBlock(): ", len(hail), hail # -- hail is empty
> >
> > for i in range (n):
> > print "getch(): ", socket.getch () # -- prints
> > valid data
>
> I think it's a bug in QSocket.readBlock() (and QSocket.readLine()).
>
> Should now be fixed in CVS.
>
> Phil
>
> _______________________________________________
> PyKDE mailing list PyKDE at mats.gmd.de
> http://mats.gmd.de/mailman/listinfo/pykde
More information about the PyQt
mailing list