Python and Snow Leopard?

Moderator: Telldus

Post Reply
boxed
Posts: 5
Joined: Thu Jan 18, 2018 11:08 am

Python and Snow Leopard?

Post by boxed » Thu Jan 18, 2018 11:08 am

I have been trying to get a python interface to tellstick on my mac running Snow Leopard. First I found some script that tries to open /dev/tellstick, but that does not exist on my system so that was out. Then I found the seemingly more complete library from you guys, but that's when you start to run into problems:
1. the TellStick class requires an argument in the construction which is the path to libTelldusCorePlugin.dylib, which is not easy to find. After a lot of digging I found it is at /Applications/TelldusCenter.app/Contents/Plugins/script/libTelldusCorePlugin.dylib
2. When trying to run this script you get the message "mach-o, but wrong architecture". This turns out to be because libTelldusCorePlugin.dylib is 32 bit and Snow Leopard ships with 64 bit python 2.6 by default. I tried to go around this by running python 2.5 which is 32 but but then I get the following stack trace: File "tellstick.py", line 188, in <module>
t.LoadLibrary()
File "tellstick.py", line 83, in LoadLibrary
self.library = cdll.LoadLibrary(self.GetLibraryPath())
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ctypes/__init__.py", line 416, in LoadLibrary
return self._dlltype(name)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ctypes/__init__.py", line 333, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Applications/TelldusCenter.app/Contents/Plugins/script/libTelldusCorePlugin.dylib, 6): Library not loaded: @executable_path/../Frameworks/QtScript.framework/Versions/4.0/QtScript
Referenced from: /Applications/TelldusCenter.app/Contents/Plugins/script/libTelldusCorePlugin.dylib
Reason: image not found


So that's where I am now. It seems to me that libTelldusCorePlugin.dylib should not be trying to load Qt libs, seeing as this is a GUI library right? Or am I missing something?


(I _really_ would like to do this all in python, I do enough C++ at work :P )

micke.prag
Site Admin
Posts: 2213
Joined: Thu Jan 18, 2018 11:08 am
Location: Lund
Contact:

Re: Python and Snow Leopard?

Post by micke.prag » Thu Jan 18, 2018 11:08 am

The name libTelldusCorePlugin.dylib might be a bit confusing but this is not telldus-core. This is just an internal plugin for TelldusCenter so access telldus-core.
The plugin you are looking for is:
/Library/Frameworks/TelldusCore.framework/TelldusCore

(check the path, I am not on a Mac right now)
Micke Prag
Software
Telldus Technologies

boxed
Posts: 5
Joined: Thu Jan 18, 2018 11:08 am

Re: Python and Snow Leopard?

Post by boxed » Thu Jan 18, 2018 11:08 am

Ah ok. Yea that works perfectly, thank you.

Post Reply