I have a third-party library (the interface to Xerox's Finite State tools) which come as universal binaries with two variants internally: a PPC and an i386 variant. I also have a Python interface to the library (which uses ctypes).
But when I try to run the example code provided with the Python interface I get an error complaining about the library being the wrong architecture:
ImportError: dlopen(/Users/arne/sw/lib/libxcfsm.dylib, 10): no suitable image found. Did find:
/Users/arne/sw/lib/libxcfsm.dylib: mach-o, but wrong architecture
From what I can gather, this is because the python executables have an x86_64 variant internally in addition to the two versions in my library, and prefer to run in that mode. Is there some way for me to force the python executable to start the i386 version rather than the x86_64 one, for just some scripts?