[Pyobjc-dev] trying to integrate an objective C library into a Python prototype application
Brought to you by:
ronaldoussoren
|
From: John S. <joh...@gm...> - 2008-01-26 22:34:21
|
I am new to Mac/ObjC development, and intermediate in my Python skill.
I have downloaded the Darwiin wii-remote library, and I am trying to
integrate it with my existing application developed in Python. I'm working
on a MacBook running Leopard, and I've downloaded XCode 3.0, and fink, and
vpython, and a few other things. I can run parts of my app through IDLE
successfully.
In XCode, I get these messages during my build and run:
This GDB was configured as "i386-apple-darwin".warning: Unable to read
symbols for
"@executable_path/../Frameworks/WiiRemote.framework/Versions/A/WiiRemote"
(file not found).
Program loaded.
sharedlibrary apply-load-rules all
Attaching to program:
`/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants',
process 8515.
The Debugger has exited with status 0.
[Session started at 2008-01-22 22:28:09 -0600.]
objc[8633]: Class WiiRemote is implemented in both
/Library/Frameworks/WiiRemote.framework/Versions/A/WiiRemote and
/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
Using implementation from
/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
objc[8633]: Class WiiRemoteDiscovery is implemented in both
/Library/Frameworks/WiiRemote.framework/Versions/A/WiiRemote and
/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
Using implementation from
/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS/boogiepants.
Traceback (most recent call last):
File
"/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources/main.py",
line 17, in <module>
import boogiepantsAppDelegate
File
"/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources/boogiepantsAppDelegate.py",
line 14, in <module>
from WiiRemote import *
ImportError: No module named WiiRemote
In Idle, I try importing a bunch of libraries (I like IDLE better):
import sys
sys.path.extend
(['/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC',
'/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/MacOS',
'/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources',
'/Users/jstoner/Documents/projects/boogiepants/boogiepants/build/Release/boogiepants.app/Contents/Resources/PyObjC',
'/Library/Frameworks'],
'/Users/jstoner/Documents/projects/boogiepants/WiiRemoteFramework/build/Release/WiiRemote.framework/'])
But I still can't seem to find the right file:
import WiiRemote
...
ImportError: No module named WiiRemote
I've screwed around a lot trying to get Python to find this library to no
avail. Any ideas?
--
blog:
http://www.generosity.org/stoner/
'In knowledge is power, in wisdom, humility.'
|