Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Vincent Vande Vyvre Newsgroups: comp.lang.python Subject: Re: PyQt5: is the wrapper incomplete? Date: Thu, 16 Jun 2016 09:15:57 +0200 Lines: 25 Message-ID: References: <7a8f722a-f4e6-419e-ab0e-982754ad0df9@googlegroups.com> <5762522D.6060804@telenet.be> Reply-To: vincent.vandevyvre@oqapy.eu Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de q3Qvo97P8StNjz+xAkUa9QZVrxuBEWWu/GsuNHd3gKWw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'classes.': 0.07; 'raises': 0.07; 'implies': 0.09; 'statements': 0.09; 'assume': 0.11; 'from:name:vincent vande vyvre': 0.16; 'namespace.': 0.16; 'received:195.130': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'received:telenet-ops.be': 0.16; 'there?': 0.16; 'variations': 0.16; '\xe9crit': 0.16; 'library': 0.20; 'windows': 0.20; 'exists.': 0.22; 'users,': 0.22; "haven't": 0.24; 'tried': 0.24; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'install': 0.25; "i've": 0.25; 'header:User-Agent:1': 0.26; 'installed': 0.26; 'linux': 0.26; 'separate': 0.27; 'host': 0.28; 'developing': 0.28; 'device': 0.28; 'interface': 0.29; 'inspect': 0.29; "i'm": 0.30; 'that.': 0.30; 'received:be': 0.30; 'noticed': 0.32; 'compiled': 0.32; 'skip:. 10': 0.32; 'maybe': 0.33; 'instead,': 0.33; 'case,': 0.34; 'thanks!': 0.34; 'handle': 0.34; 'but': 0.36; 'guidance': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'skip:p 20': 0.38; 'data': 0.39; 'sure': 0.39; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'called': 0.40; 'charset:windows-1252': 0.62; 'header:Reply- To:1': 0.67; 'completed': 0.69; 'serial': 0.70; 'reply-to:no real name:2**0': 0.71; 'usb.': 0.84 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 In-Reply-To: <7a8f722a-f4e6-419e-ab0e-982754ad0df9@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <5762522D.6060804@telenet.be> X-Mailman-Original-References: <7a8f722a-f4e6-419e-ab0e-982754ad0df9@googlegroups.com> Xref: csiph.com comp.lang.python:110017 Le 16/06/2016 04:54, jladasky@itu.edu a écrit : > I am developing a data acquisition system for a custom device that communicates over USB. On the host computer side, I am using PyQt5.4. My Linux box has both Qt4 and Qt5 installed on it. I assume that PyQt5.4 compiled on top of Qt5 automatically. I'm not sure how to check that. > > In any case, I used PySerial to handle the USB communication. I just noticed that Qt also has serial features. I need to give the completed program to other users, on Windows no less. If I can forego PySerial and use Qt's serial interface instead, it would simplify the installation. > > Now, the PyQt5 documentation implies that a module called QtSerial exists. But while I can write... > > from PyQt5.QtWidgets import (...), or > from PyQt5.QtGui import (...), or > from PyQt5.QtCore import (...), > > ...attempting to import from PyQt5.QtSerial raises an ImportError. > > I've tried many variations on the spelling, and I've tried various import statements to inspect the (very large and complex) PyQt5 namespace. I haven't found the QtSerial classes. Are they even there? Maybe the wrapping of the library is incomplete? > > Any guidance is appreciated, thanks! On Debian, this is a separate package python3-pyqt5.qtserialport, I don't know for other Linux After install you can use: from PyQt5.QtSeriaPort import QSerialPort Vincent