Open atchoo78 opened 5 years ago
I also forgot to mention that I commented out https://github.com/ScR4tCh/timebox/blob/7c1695353da64a5f91cf02a1bb7d35a1392e7280/timebox/timebox.py#L57 It kind of works, but it's temporary, and I'll have to find a way around that later.
By trial and error (lots of both 🤯) I have now managed to assemble a complete guide for running the timebox CLI on macOS in a virtual enviroment with Python 2.7.
For this guide, I'll just assume that you clone this repository or extract its zip to ~/timebox (/Users/yourusername/timebox). Here we go:
First, check that pip is up to date:
Install virtualenv. As far as I know, all Macs ship with easy_install, so
From your home dir:
or extract the zip and copy/move its contents to ~/timebox
Create the virtual enviroment and activate it:
Install (some of) the dependencies
Now for the tedious part.
You'll need the "osx" folder from the PyBluez rep later on, so we'll start with cloning it and install the fundamentals.
(Important!) Use the force and pull off some jedi mind tricks on macOS:
Clean up (delete the temporary pybluez folder)
Do a quick test to check if Bluetooth is working. Save the following to a new .py file and name it bluetooth-test.py. Run the test with
python bluetooth-test.py
nearby_devices = bluetooth.discover_devices(lookup_names=True) print("found %d devices" % len(nearby_devices))
for addr, name in nearby_devices: print(" %s - %s" % (addr, name))
Hope this helps anyone. I'm off to see where I can take this further 🙂
Best regards,
Andreas