Python-UNO bridge on OOo3.0.0

IMPORTANT: Workarounds for pyuno problems in OOo3.0.0

There are some problems with pyuno in OOo3.0.0 (in particular with the python executable). Here the known problems and the workarounds for the moment .
  1. (windows only) The python scripting framework (scripts within openoffice via Extras/Macro/) does not work, when you have a python 2.3 installed on your windows system (more precisly, when there exists a python23.dll in your windows/system32 directory). You can work around it for now by copying Basis\program\python23.dll to program\. beside the soffice.bin executable. This forces the soffice process to load the correct library beside the office process. (94993)
  2. (windows only) When you try to connect to a running office process, you get
     __main__.com.sun.star.connection.NoConnectException: Connector  couldn't connect to socket (WSANOTINITIALISED, WSAStartup() has not been called) 
  3. You can workaround this, by placing a
    import socket
    in the top of your script (95028)
  4. (windows only) The python program crashes or you get an attribute error
    AttributeError: getCurrentComponent  (or some other attribute)
    This is because the types could not be loaded due to changes in the uno bootstrapping mechanism. You can work around it for now by setting the URE_BOOTSTRAP variable (adapt to your installation path, replace every space with a %20, change \ to /).
    set URE_BOOTSTRAP=file:///C:/Program%20Files/OpenOffice.org%203/program/fundamental.ini
    and run python. Alternatively, you can set URE_BOOTSTRAP=fundamental.ini when your current working directory is beside the python executable. (95024)
  5. (windows only) Interactive mode in python does not work correctly When you start the python executable without parameters, the interactive session runs somewhat fuzzy (at least on my machine). When you get the prompt >>>> , everything you type will be interpreted as a shell command. When you then just press return, you are prompted with your current working directory, here you can place a python command, so in short, you have to press return 2 times after every python command (95037).
  6. ( unix only), you need to set LD_LIBRARY_PATH correctly before starting the python executable, eg.
      export set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../../openoffice.org/ure/lib:../../openoffice.org/basis3.0/program
    ./python

Nenhum comentário:

Postar um comentário