phrack/ShootOFF — pull request #58 by flynnguy (2013-12-16 18:58:26+00:00)
Title: made a few minor changes

So while waiting for my laser to come in the mail, I figured I'd try getting this up and running on my MacBook Pro. I encountered a few issues since I'm running OS 10.9 and I guess the original instructions were for a previous version. I'm still getting 'Segmentation fault: 11' but with the minor changes I made below I was able to execute the commands in the main python block in shootoff.py to get the window to launch. I'm not sure if the laser detection works yet or not but I'll try that soon.

I also made a few minor pep8 changes. There's more I can do to clean it up but I didn't want to come in and change everything around yet. I'm still getting some errors which I'll paste below in case you have any ideas because they don't look limited to OS X. If not I'll probably tinker around with it some more. Thanks.

Here is the remaining error I am getting:
In [3]: MainWindow(config)
2013-12-16 13:16:50,484 - shootoff - INFO - Couldn't get webcam FPS, defaulting to 30.
Out[3]:

In [4]: Exception in thread shot_detection_thread:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in __bootstrap_inner
self.run()
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 761, in run
self.__target(*self.__args, **self.__kwargs)
File "shootoff.py", line 109, in detect_shots
self.detect_shots)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 537, in after
name = self._register(callit)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1158, in _register
self.tk.createcommand(name, f)
RuntimeError: main thread is not in main loop

Exception in thread refresh_thread:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in __bootstrap_inner
self.run()
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 761, in run
self.__target(*self.__args, **self.__kwargs)
File "shootoff.py", line 52, in refresh_frame
self._window.after(FEED_FPS, self.refresh_frame)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 537, in after
name = self._register(callit)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1158, in _register
self.tk.createcommand(name, f)
RuntimeError: main thread is not in main loop