[scribus] Listing all Scripter documentation

José Antonio Rocha joseantoniorocha at gmail.com
Wed Feb 1 12:14:11 UTC 2012


2012/2/1 Stefan <stmstmstmster at googlemail.com>

>
> >    except: pass
> >
> >
> get a syntax error here


Yep. Try that:

d = dir(scribus)
for j in d:
    try:
        exec 'res = '+j+'.__doc__'
        if res[0:5] == 'float':
            print '\nCONSTANT:\n',j,'\nVALUE: float'
            exec 'print '+j+'\n'
        elif res[0:5] == 'int(x':
            print '\nCONSTANT:\n',j,'\nVALUE: integer'
            exec 'print '+j+'\n'
        elif res[0:5] == 'tuple':
            print '\nTUPLE:\n',j,'\nVALUE:'
            exec 'print repr('+j+')\n'
        elif res[0:4] == 'str(':
            print '\nSTRING:\n',j,'\nVALUE:'
            exec 'print repr('+j+')\n'
        else:
            print '\FUNCTION:\n'+j+'\n\nSINTAX:'
            print res
    except: pass


-- 
[image: Meira]
------------------------------
nome: "José Antonio Meira da Rocha"
googletalk: email: MSN: joseantoniorocha at gmail.com
veículo: [ http://meiradarocha.jor.br ]
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20120201/6e9d4c6f/attachment.html>


More information about the scribus mailing list