On 05/19/10 18:55, Christian Lohmaier wrote:
There is a big "BUT" however: On never versions of Mac OSX, it is not possible to run standalone python with pyuno. I.e. you cannot run python from outside OOo and run your script. You'll get "incompatible version" style errors. (newer versions of Mac OSX ship with the 2.3 basic framework, but only have python2.5 and 2.6 launchers. I failed to get it to "import uno" on 10.6, no matter what tricks with environment variables I tried. Maybe there's some trick to get it running, but I gave up. I'm neither a python nor a Mac user, so there might still be a way though. (Again: running python macros from within OOo is not a problem, python loaded via OOo's library gets things right)
I just experienced the problem to get pyuno working on Mac OS X 10.6, too. At least for me (trying to run the tests in testtools/source/bridgetest/pyuno/), it clearly is a problem of system python being executed as 64 bit, while OOo's pyuno.so is 32 bit (see below).
Christian, did you already file an issue to use internal python on Mac (which apparently is the outcome of this thread)?
-Stephan
/ooo/testtools/source/bridgetest/pyuno> dmake runtest start test with dmake runtest cd ../../../unxmacxi.pro/lib && export FOO=file:///ooo/testtools/source/bridgetest/pyuno/../../../unxmacxi.pro/lib UNO_TYPES=pyuno_regcomp.rdb UNO_SERVICES=pyuno_regcomp.rdb && : && DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}/ooo/solver/300/unxmacxi.pro/lib python main.py Traceback (most recent call last): File "main.py", line 27, in <module> import uno File "/ooo/solver/300/unxmacxi.pro/lib/pyuno/uno.py", line 29, in <module> import pyuno ImportError: dlopen(/ooo/solver/300/unxmacxi.pro/lib/pyuno.so, 2): no suitable image found. Did find: /ooo/solver/300/unxmacxi.pro/lib/pyuno.so: mach-o, but wrong architecture /ooo/solver/300/unxmacxi.pro/lib/pyuno.so: mach-o, but wrong architecture dmake: Error code 1, while making 'runtest' /ooo/testtools/source/bridgetest/pyuno> which python /usr/bin/python /ooo/testtools/source/bridgetest/pyuno> file /usr/bin/python /usr/bin/python: Mach-O universal binary with 3 architectures /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/python (for architecture i386): Mach-O executable i386 /usr/bin/python (for architecture ppc7400): Mach-O executable ppc /ooo/testtools/source/bridgetest/pyuno> file /ooo/solver/300/unxmacxi.pro/lib/pyuno.so /ooo/solver/300/unxmacxi.pro/lib/pyuno.so: Mach-O bundle i386
--------------------------------------------------------------------- To unsubscribe, e-mail: mac-unsubscr...@porting.openoffice.org For additional commands, e-mail: mac-h...@porting.openoffice.org