From eb3dc4338f317ccd29771fa028558b9f0df88962 Mon Sep 17 00:00:00 2001 From: "minecraftchest1@outlook.com" Date: Mon, 31 Mar 2025 21:05:01 -0500 Subject: [PATCH] Initial Commit --- main.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..0ca4a09 --- /dev/null +++ b/main.py @@ -0,0 +1,18 @@ +import sys + +import bluetooth + +def bluetooth_scan(): + print('Discovering Bluetooth Devices...') + + nearby_devices = bluetooth.discover_devices(duration=10, lookup_names=True, flush_cache=True, lookup_class=False) + + print('Discovered {} devices:'.format(len(nearby_devices))) + for device in nearby_devices: + print(f'{device[0]}\t{device[1]}') + +def main(): + bluetooth_scan() + +if (__name__ == "__main__"): + sys.exit(main()) \ No newline at end of file