Re: [Libreoffice] No Python scripts visible in UI - build 350m1 from master nightly 27/06/2011 for Mac OSX
On Wed, 2011-06-29 at 00:04 +0200, Christian Lohmaier wrote: Hi Alexander, *, On Mon, Jun 27, 2011 at 5:14 PM, Alexander Thurgood alex.thurg...@gmail.com wrote: MacOSX_10.6.7_Intel_no-moz/master/2011-06-27_08.26.21 There is no Python script menu entry in the Tools Macros Organise UI menu, only Basic, Javascript and Beanshell. This is caused by... So, is this all ok now ? Under master Linux it all appears to works well, and I see f10464a1060139c84f9c1671de088560bf2b4010 fixed up some whitespace in the meantime. C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] No Python scripts visible in UI - build 350m1 from master nightly 27/06/2011 for Mac OSX
Hi Caolán, *, On Wed, Aug 3, 2011 at 2:49 PM, Caolán McNamara caol...@redhat.com wrote: On Wed, 2011-06-29 at 00:04 +0200, Christian Lohmaier wrote: On Mon, Jun 27, 2011 at 5:14 PM, Alexander Thurgood alex.thurg...@gmail.com wrote: MacOSX_10.6.7_Intel_no-moz/master/2011-06-27_08.26.21 There is no Python script menu entry in the Tools Macros Organise UI menu, only Basic, Javascript and Beanshell. This is caused by... So, is this all ok now ? Yes, Internal python is now built on Mac. On both 3.4.2 as well as on master all the supplied samples work. ciao Christian ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] No Python scripts visible in UI - build 350m1 from master nightly 27/06/2011 for Mac OSX
Le 27/06/11 17:14, Alexander Thurgood a écrit : Update using : master~2011-06-28_03.42.18_LibO-Dev_OOO350m1_MacOS_x86_install_en-US Fresh install, and new user config folder. Now, only the Basic script entry appears in the UI. In the Extensions Manager, the script shell providers for Beanshell and Javascript are visible. The pythonscript provider is visible, but greyed out. This is a regression over the build from 27/06/2011. BTW, the default grey shade for deactivated functionality really sucks, it is practically undetectable for anybody with sight difficulties. Just my 2c. Alex ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] No Python scripts visible in UI - build 350m1 from master nightly 27/06/2011 for Mac OSX
Hi Alexander, *, On Mon, Jun 27, 2011 at 5:14 PM, Alexander Thurgood alex.thurg...@gmail.com wrote: MacOSX_10.6.7_Intel_no-moz/master/2011-06-27_08.26.21 There is no Python script menu entry in the Tools Macros Organise UI menu, only Basic, Javascript and Beanshell. This is caused by commit 5f1a059d37501f2b26cd387e2b1f096f6272c004 Author: Andreas Becker atayoo...@googlemail.com Date: Sat May 7 20:35:03 2011 +0100 Port PyUno to support Python 3 to the URE module. This patch is bad in a sense as it mixes whitespace changes with functional changes and introduces bugs at the same time :-( From git log -p -b (i.e. ignore whitespace only changes: --- a/pyuno/source/loader/pythonloader.py +++ b/pyuno/source/loader/pythonloader.py @@ -49,16 +49,16 @@ g_loadedComponents = {} def checkForPythonPathBesideComponent( url ): path = unohelper.fileUrlToSystemPath( url+/pythonpath.zip ); if DEBUG == 1: -print checking for existence of + encfile( path ) +print(checking for existence of + encfile( path )) if 1 == os.access( encfile( path ), os.F_OK) and not path in sys.path: if DEBUG == 1: - print adding + encfile( path ) + to sys.path +print(adding + encfile( path ) + to sys.path) sys.path.append( path ) path = unohelper.fileUrlToSystemPath( url+/pythonpath ); if 1 == os.access( encfile( path ), os.F_OK) and not path in sys.path: if DEBUG == 1: - print adding + encfile( path ) + to sys.path +print(adding + encfile( path ) + to sys.path) sys.path.append( path ) def encfile(uni): ### So already in the first hunk that is not whitespace-only, it changes the alignment of the print statement from the last if-clause to the wrong level.. This is noticable in various places. But what makes it incompatible with Mac are those: @@ -113,13 +113,13 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ): else: raise RuntimeException( PythonLoader: Unknown protocol + protocol + in url +url, self ) - except ImportError, e: -raise RuntimeException( Couldn't load +url+ for reason +str(e), None) +except ImportError as e: +raise RuntimeException( Couldn't load + url + for reason + str(e), None ) return None def activate( self, implementationName, dummy, locationUrl, regKey ): if DEBUG: -print pythonloader.Loader.activate +print(pythonloader.Loader.activate) mod = self.getModuleFromUrl( locationUrl ) implHelper = mod.__dict__.get( g_ImplementationHelper , None ) ### I.e. except ImportError as e is a syntax error in python 2.3, you need to keep it as except ImportError, e - same for various other places. So I ask Andreas Becker to either revert and apply a clean version of the Python 3 relevant changes /only/ (i.e. without the whitespache changes all over the place), or to go through the whole thing again and make sure that the indendation still matches the original versions. AFAICT the only think that is python 3 relevant is to put the argument to print in parentheses. Especially this change: @@ -104,7 +104,7 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ): # compile and execute the module codeobject = compile( src, encfile(filename), exec ) -exec codeobject in mod.__dict__ +exec(codeobject, mod.__dict__) mod.__file__ = encfile(filename) g_loadedComponents[url] = mod return mod just is not right, is it? ciao Christian ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice] No Python scripts visible in UI - build 350m1 from master nightly 27/06/2011 for Mac OSX
Hi *, Downloaded daily build from yesterday for Mac : MacOSX_10.6.7_Intel_no-moz/master/2011-06-27_08.26.21 Installed, started. There is no Python script menu entry in the Tools Macros Organise UI menu, only Basic, Javascript and Beanshell. They are present in the app bundle in : /Applications/LibO-dev.app/Contents/basis-link/share/Scripts Alex ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] No Python scripts visible in UI - build 350m1 from master nightly 27/06/2011 for Mac OSX
Hi Alexander, On Mon, Jun 27, 2011 at 5:14 PM, Alexander Thurgood alex.thurg...@gmail.com wrote: Downloaded daily build from yesterday for Mac : MacOSX_10.6.7_Intel_no-moz/master/2011-06-27_08.26.21 Does that build include the python-scripting-provider extension? If not, then it's a build-configuration problem (Tools|Extension Manager) ciao Christian ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] No Python scripts visible in UI - build 350m1 from master nightly 27/06/2011 for Mac OSX
Le 27/06/11 18:53, Alexander Thurgood a écrit : And here's the error message : Error while installing extension MRI - UNO Object Inspection Tool. The error message is: python-loader:exceptions.SyntaxError: ('invalid syntax', ('/Applications/LibO-dev.app/Contents/basis-link/program/pythonloader.py', 116, 29, 'except ImportError as e:\n')), traceback follows no traceback available The extension will not be installed. Alex ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice