[PyQT] QSocketNotifier problem

Axel Mittendorf newsreply at transfertech.de
Thu Mar 11 10:50:06 EST 2004


Hi, I have a pyqt app which reads data from a fifo ( created with mkfifo)
and displays it
in a text field. I use PyQT 3.8.1 and QT 3.2.2 on SuSE Linux 7.0. I open the
fifo with os.open and create a QSocketNotifier (for reading). Other
processes write into
the fifo (I can do 'echo "hello" > /tmp/myfifo' for example), the activated
event of the QSocketNotifier comes and the data is written out. This
works without problems. BUT when the last process that writes into that
fifo exits, the activated event seems to come "always", about 10000 times
per second. What causes this behavior?

Is it a bad idea to use a SocketNotifier for a fifo?
BTW I used a QTimer before but I was ordered to use a SocketNotifier
instead (not my idea;-).

TIA, Axel





More information about the Python-list mailing list