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-"):
pass
g_exportedScripts = fonc,
More simple :
Apache OpenOffice 3.4 hangs when a python module containing 'import clr' is executed from the menu Tools - Macros - execute Python.
"Openoffice", really, perhaps "Apache OpenOffice (Incubating)" or, more commonly "libreoffice"?
Please provide version an platform info. Thnaks.
Yes. You've done that (wacky interface that doesn't show comments by default).
Have a look at
http://user.services.openoffice.org/en/forum/viewtopic.php?f=45&t=54285
Make sure that the interpreter running is 2.7 max and you have built or downloaded the matching version.
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).