Re: [Sndobj-devel] PySndObj, Python 2.4, Mac OS10.4
Status: Abandoned
Brought to you by:
veplaini
From: Craig L. <lew...@mi...> - 2007-01-25 06:07:21
|
I *finally* was able to get sndobj.py successfully generated and installed on OSX (10.4.8), with Python 2.4.4 my initial problem was that I was continually getting this error when I would try to 'import sndobj' from the python interpreter: Traceback (most recent call last): File "<stdin>", line 1, in ? File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/sndobj.py", line 4, in ? import _sndobj ImportError: Failure linking new module: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_sndobj.so: Library not loaded: lib/libsndobj.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/_sndobj.so Reason: image not found the default Python that comes with OSX, on my machine, was Python 2.3.5. however, i was running Python 2.4.4 from a different location. i needed this because of other modules i am using with my application. it turned out, that in the SConstruct file, the variable pythonpath needed to be changed from: pythonpath = '/System/Library/Frameworks/Python.framework' (the location of the original Python 2.3.5 install), to: pythonpath = '/Library/Frameworks/Python.framework' (the location of Python 2.4.4.) however, once i did this, i was still having problems when i'd run scons. the build would complete, but no sndobj.py file could be found. so, after reading a little bit, i ran scons again with the cache disabled: %scons --cache-disable (scons user guide here: http://www.scons.org/doc/HTML/scons-user.html) when i did that, it completely rebuilt SndObj, including generating the sndobj.py file, along with its libraries. still, the problem was that the PySndObj files (sndobj.py, _sndobj.so, libsndobj.dylib) were not being installed into my Python 2.4.4 framework automatically with the scons build. instead, they were just showing up in the install folder on my desktop, so i had to manually install them into my Python framework. from the SConstruct file, as far as i can tell, it doesn't look like it's built to install the PySndObj files. is this correct? either way, it's working now. another issue i notice: in the SConstruct file, in the general configuration section, the indenting seemed to be very complicated. is there a reason for this? i know that indenting is crucial to proper python execution, and the mixed spaces and tabs in that section really confused. one of the reason i bring this up is because even though i had set pythonpath in the code, when i ran: %scons -h i got a printout with an 'actual' value of pythonpath to be blank. so, i had to manually set python by running %scons pythonpath=/Library/Frameworks/Python.framework of course, i was running scons so many times that maybe this is some error on my part. either way, i wanted to see if anyone else had notice the indenting in that section, and could possibly explain it. all that said, i'm curious to know what other people on this list are using SndObj for in their Python applications. my current application is a Tkinter-based GUI that takes incoming signals from a USB prototype keyboard and turns those into sound. it's basically a MIDI controller, without the MIDI. ok. thanks for getting back to me. -craig On 1/23/07, akonsu <ak...@gm...> wrote: > Hello, > > you can build it from source for your version. it looks like you are > on osx, so it should work. it worked for me on openbsd, osx is even > easier. > > konstantin > > 2007/1/23, sonify <so...@av...>: > > Hi Craig, > > What architecture/ operating system? > > > > > > On 23/01/2007, at 10:39 AM, Craig Lewiston wrote: > > > > > I've been having trouble getting SndObj to work in Python, before I > > > finally realized that the current release is only built for Python > > > 2.3. I changed my PATH to point to the Apple's default Python install > > > (2.3.5), and SndObj worked great within Python. The problem is, my > > > current application that I'm trying to add sound to uses other > > > external modules that are only compatible with at least Python 2.4. > > > > > > Is there a way I can build SndObj for Python 2.4? Do you only have to > > > alter _sndobj.so to link to Python 2.4 on the system, or is there > > > something more fundamental that needs to be done? > > > > > > thanks, > > > craig > > > > > > ---------------------------------------------------------------------- > > > --- > > > Take Surveys. Earn Cash. Influence the Future of IT > > > Join SourceForge.net's Techsay panel and you'll get the chance to > > > share your > > > opinions on IT & business topics through brief surveys - and earn cash > > > http://www.techsay.com/default.php? > > > page=join.php&p=sourceforge&CID=DEVDEV > > > _______________________________________________ > > > Sndobj-devel mailing list > > > Snd...@li... > > > https://lists.sourceforge.net/lists/listinfo/sndobj-devel > > > > > > > _________________________________________________ > > experimental polymedia: www.avatar.com.au > > Sonic Communications Research Group, > > University of Canberra: www.canberra.edu.au/vc-forum/scrg > > vip=Verbal Interactivity Project > > > > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys - and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > Sndobj-devel mailing list > > Snd...@li... > > https://lists.sourceforge.net/lists/listinfo/sndobj-devel > > > |