[Libreoffice] Mac - Python scripts not visible / executable in Macros manager
caolanm at redhat.com
Wed Mar 2 13:13:31 PST 2011
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':
> 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
change print to print >> sys.stderr, e.g.
+print >> sys.stderr, "hello"
to ensure they get flushed immediately in case of some crash/exception
If you simply change...
--if item.__class__.__name__ == '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)
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.
More information about the LibreOffice