Logo Search packages:      
Sourcecode: uicilibris version File versions  Download package

def uicilibris::w2book::wiki2book::parse_usepackage (   self,
  usepackage 
)
@param usepackage (str)
    the unparsed usepackage string in the form [options]{name}
@return (tuple)
    (name(str), options(str))

Definition at line 237 of file w2book.py.

                                          :
        """
        @param usepackage (str)
            the unparsed usepackage string in the form [options]{name}
        @return (tuple)
            (name(str), options(str))
        """

        p = re.compile(r'^\s*(\[.*\])?\s*\{(.*)\}\s*$')
        m = p.match(usepackage)
        g = m.groups()
        if len(g)<2 or len(g)>2:
            syntax_error('usepackage specifications have to be of the form [%s]{%s}', usepackage)
        elif g[1]==None and g[1].strip()!='':
            syntax_error('usepackage specifications have to be of the form [%s]{%s}', usepackage)
        else:
            options = g[0]
            name = g[1].strip()
            return (name, options)


Generated by  Doxygen 1.6.0   Back to index