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.

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to