help with docutils

2008-04-17 Thread Jonathan Lukens
I am trying generate html from a reST document, both the body of the document and a table of contents, each contained in separate variables. I had initially assumed that there would be a 'toc' key in publish_parts, but apparently there is not. Is there a relatively easy way to achieve this? -- h

Re: returning regex matches as lists

2008-02-16 Thread Jonathan Lukens
John, > (1) raw string for improved legibility > ru'(?u)\b([á-ñ]{2,}\s+)([<<"][Á-Ñá-ñ]+)(\s*-?[Á-Ñá-ñ]+)*([>>"])' This actually escaped my notice after I had posted -- the letters with diacritics are incorrectly decoded Cyrillic letters -- I suppose I code use the Unicode escape sequences (the se

Re: returning regex matches as lists

2008-02-15 Thread Jonathan Lukens
On Feb 15, 8:31 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 15 Feb 2008 19:25:59 -0200, Jonathan Lukens > <[EMAIL PROTECTED]> escribió: > > > > >> What would you like to see instead? > > > I had mostly just expected that

Re: returning regex matches as lists

2008-02-15 Thread Jonathan Lukens
> What would you like to see instead? I had mostly just expected that there was some method that would return each entire match as an item on a list. I have this pattern: >>> import re >>> corporate_names = >>> re.compile(u'(?u)\\b([А-Я]{2,}\\s+)([<<"][а-яА-Я]+)(\\s*-?[а-яА-Я]+)*([>>"])') >>> t

returning regex matches as lists

2008-02-15 Thread Jonathan Lukens
I am in the last phase of building a Django app based on something I wrote in Java a while back. Right now I am stuck on how to return the matches of a regular expression as a list *at all*, and in particular given that the regex has a number of groupings. The only method I've seen that returns a