From 5aedc2fe64e3c04a761de81ff7438b1c76d16efd Mon Sep 17 00:00:00 2001 From: Frak Date: Sun, 12 Jun 2022 14:53:15 -0400 Subject: [PATCH] Place config files in home directory + debug --- README.md | 3 ++- lights.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ef1d1aa..654fd0e 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,11 @@ $pip3 install netifaces‑0.10.6‑cp36‑cp36m‑win_amd64.whl ``` ### 2022 Update -Newer versions of Python appear to break this. To use python 3.6.5 again, I had to use something like this using pyenv +Newer versions of Python appear to break this. To use python 3.6.5 again, I had to use `pyenv` like this: ```bash brew install pyenv +pyenv install 3.6.5 pyenv local 3.6.5 ~/.pyenv/shims/pip3 install --upgrade pip ~/.pyenv/shims/pip3 install appJar lifxlan colour configobj numpy mss scipy pillow diff --git a/lights.py b/lights.py index 77389d5..ec840ac 100755 --- a/lights.py +++ b/lights.py @@ -58,8 +58,8 @@ def abs_resource_path(relative_path): elif (myos == 'Darwin') or (myos == 'Linux') : """ Get absolute path to resource, works for dev and for PyInstaller """ - base_path = os.path.dirname(os.path.abspath(__file__)) - return os.path.join(base_path, relative_path) + #base_path = os.path.dirname(os.path.abspath(__file__)) + return os.path.join(os.getenv("HOME"), relative_path) def resource_path(relative_path): @@ -1558,7 +1558,7 @@ def function_name(): #print("type(config['bulbs']):",type(config['bulbs'])) if os.path.exists(PICKLE): bulbPickle = pkl.load(open(PICKLE, "rb")) #this reads the pickle - #print (bulbPickle) + print ("bulbPickle: ",bulbPickle) bulbList.clear() bulbList.append("-Select Bulb-") bulbList.append("Select All Bulbs In LAN")