Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Python スクリプトを使用して、Windows PC 上のすべてのシリアル デバイスを検出したいと考えています。どうすればこれを適切に達成できますか?
醜い方法は、COM1、COM2、...、COM9999 (制限は何ですか?) を開こうとすることです。例外が発生すると、そこにデバイスがないと結論付けます。