Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Caolán, *,

On Wed, Mar 2, 2011 at 10:13 PM, Caolán McNamara <caolanm@redhat.com> wrote:
On Sat, 2011-02-26 at 16:45 +0100, Christian Lohmaier wrote:
I don't see what's wrong - python people around?
this is basis-link/program/pythonscript.py at around line 360:

                for assignee in node.nodes:
                    if assignee.name == 'g_exportedScripts':
                        print "found g_exportedScripts %s" % (node.expr)
                        for item in node.expr:
                            print "won't reach this on Mac"
                            if item.__class__.__name__ == 'Name':
                                g_exportedScripts.append(item.name)
                        print "and not even this point"
                        return g_exportedScripts


So what is wrong with "for item in node.expr:"?

No idea, but maybe the error isn't there but slightly later on, to test
that theory...

change print to print >> sys.stderr, e.g.

That didn't help/didn't change anything, nothing is printed..

If you simply change...
--if item.__class__.__name__ == 'Name':
--    g_exportedScripts.append(item.name)
to just
+g_exportedScripts.append(item.name)
does that make a difference ?

No, still the same :-(

What's the version of python in use on Mac ?, configure.in suggest 2.3 ?

What's the output of that
print "found g_exportedScripts %s" % (node.expr)
line ?

$ /path/to/LibreOffice\ 3.3.1/LibreOffice.app/Contents/MacOS/soffice
found g_exportedScripts Tuple([Name('capitalisePython')])
found g_exportedScripts Tuple([Name('createTable')])

FWIW http://docs.python.org/library/compiler.html is the api being used here. All
the code wants to do is, if there is a g_exportedScripts in the .py,
get the list of names of methods assigned to that g_exportedScripts by
parsing the .py without actually executing the .py.

Yes, I wonder why it fails here :-(

ciao
Christian

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.