Even sys.stdout.write(str(usbdev)) would have been better. Signed-off-by: Mantas Mikulėnas <grawity@xxxxxxxxx> --- lsusb.py.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lsusb.py.in b/lsusb.py.in index 0d7ff95..93fe6b5 100644 --- a/lsusb.py.in +++ b/lsusb.py.in @@ -548,8 +548,7 @@ def read_usb(): root_hubs.append(usbdev) root_hubs.sort(key=lambda x: int(x.fname[3:])) for usbdev in root_hubs: - os.write(sys.stdout.fileno(), str.encode(usbdev.__str__())) - #print(usbdev.__str__()) + print(usbdev, end="") def main(argv): "main entry point" -- 2.21.0