[PyQt] Basic serial question
Kyle Altendorf
sda at fstab.net
Sun Sep 24 16:03:33 BST 2017
You mentioned pyqt4. Was that a typo?
Presumably, the Qt library would help with async serial usage by providing signals and slots that pyserial would not have. You could also use Twisted for a more linear approach to coding sequences of actions. qt5-reactor is used to combine the Qt and Twisted event loops.
https://twistedmatrix.com/documents/current/core/howto/defer-intro.html
Deferreds, inlineCallbacks, and integration with py3 async syntax provide various levels of 'integration'.
Cheers,
-kyle
On September 23, 2017 9:21:55 PM EDT, Phil <phil_lor at bigpond.com> wrote:
>Thank you for reading this.
>
>Using Eric, I'm trying to take text from an edit box and then transmit
>it via a serial port. The following console code proves that the serial
>
>data is being received correctly.
>
>import serial
>
>ser = serial.Serial('/dev/ttyACM0',9600)
>ser.write(b'Fred\n')
>
>To create an Eric GUI, the way I understand a QT C++ example, is that I
>
>have to import QSerialPort. The problem is that the Eric error message
>says that there isn't a QSerialPort or QtSerialPort module. I have
>installed python3-pyqt5.qtserialport.
>
>The GUI was created under Eric without too many problems but I'm
>wondering if I need to install any other pyqt4 files to move forward
>with serial transmission?
>
>--
>Regards,
>Phil
>_______________________________________________
>PyQt mailing list PyQt at riverbankcomputing.com
>https://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list