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


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.

-print "hello"
+print >> sys.stderr, "hello"
to ensure they get flushed immediately in case of some crash/exception
getting thrown.

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 ?

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 ?

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. 

C.


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.