#21 import clr crash on openoffice python


When using python for .net from Openoffice, a crash occurs on import clr.
The python module is called by "C:\Program Files\OpenOffice.org 3\program\soffice.exe" -nologo "vnd.sun.star.script:module.py$fonc?language=Python&location=user"

The module.py is in the user directory : C:\Documents and Settings\username\Application Data\OpenOffice.org\3\user\Scripts.
It contains :

import clr

def fonc(Arg1 = "-nothing-"):


g_exportedScripts = fonc,


  • lvl

    lvl - 2012-07-29

    More simple :
    Apache OpenOffice 3.4 hangs when a python module containing 'import clr' is executed from the menu Tools - Macros - execute Python.

  • Barton Cline

    Barton Cline - 2012-07-29

    "Openoffice", really, perhaps "Apache OpenOffice (Incubating)" or, more commonly "libreoffice"?
    Please provide version an platform info. Thnaks.

  • lvl

    lvl - 2012-07-30

    My configuration is Windows XP.
    The python used is 2.6.1 (which is the version embedded in OO3.4).
    I downloaded the source of pythonnet on sourceforge (the compiled version in pythonnet-2.0-alpha2-clr2.0_py26 did not work on my configuration), and compiled the Python.Runtime solution found in trunk\pythonnet\src\runtime with Visual C# 2010 Express (parameters : PYTHON26,UCS2).
    I copied the files clr.pyd and Python.Runtime.dll to the same python directory Lib.
    The 'import clr' works when python is invoked directly, but when it is run from inside OO it hangs OO with no error message.
    This problem occurs with the python2.6 embedded in OO and with the system python2.6 which can be used after modifying some environmental variables (your link deals with this topic).


Log in to post a comment.