add get sub port

master
François Boulogne 3 months ago
parent 88da9c0ae1
commit 01234592fd

@ -0,0 +1,15 @@
#!/usr/bin/env python
import sys
import labhw
name = 'Arduino__www_arduino_cc__75833353035351903182'
name = sys.argv[1]
devices = labhw.list_USB_devices()
try:
print(devices[name])
except KeyError as e:
raise RuntimeError(f"unknown device {name}")

@ -1,4 +1,4 @@
__version__ = '0.1.3' __version__ = '0.1.4'
from .LTS import * from .LTS import *
from .USBdev import * from .USBdev import *

@ -32,6 +32,7 @@ setup(
long_description=long_description, long_description=long_description,
long_description_content_type='text/markdown', long_description_content_type='text/markdown',
scripts = ['bin/listUSBdevice.py', scripts = ['bin/listUSBdevice.py',
'bin/getUSBport.py',
], ],
# Automatically find packages in the current directory # Automatically find packages in the current directory

Loading…
Cancel
Save