USPP (Universal Serial Port Python) Library version 0.1

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Sat Sep 15 02:08:34 EDT 2001


----- Original Message ----- 
From: "Isaac Barona" <ibarona at tid.es>

You list a problem with inWaiting under Linux.  The problem with the
ioctl is that you are using it wrong...  Here is a C example I picked
off the Internet:

    #include <unistd.h>
    #include <termios.h>

    int fd;
    int bytes;

    ioctl(fd, FIONREAD, &bytes);

So you need to call this:

    rc = fcntl.ioctl(self.__handle, TERMIOS.TIOCINQ, "\0\0\0\0")
    n = struct.unpack("i", rc)[0]

I tried it and it seems to work.

Also, your tarball should contain a parent directory; normal tarballs 
can be unpacked without "dumping" a mess in the current directory.

Sorry to be so negative... this is really a very useful looking project.
Good luck!







More information about the Python-list mailing list