Re: Generate labels for a multi-level outline (THANK-YOU!)

2008-05-08 Thread python
Dennis, > I was a touch bored in the last hour at work today so... Thank you!! Malcolm -- http://mail.python.org/mailman/listinfo/python-list

Re: Generate labels for a multi-level outline

2008-05-08 Thread python
Castironpi, > Do you want send and throw in it too? If its not too much trouble, I would love to see how you add these. > formatter.NullFormatter.format_counter > formatter.NullFormatter.format_letter > formatter.NullFormatter.format_roman I'm not sure what you mean by the above lines ... ...

Re: Generate labels for a multi-level outline (THANK-YOU!)

2008-05-07 Thread python
Castironpi and Dennis, WOW! Thank you very much for your examples!!! I wasn't trolling for free development, just whether such a library existed and/or design ideas (basic object or generator). I had started to develop my own solution which was much more complicated (re: ugly) than your 2 very e

Re: Generate labels for a multi-level outline

2008-05-07 Thread castironpi
On May 7, 9:07 am, [EMAIL PROTECTED] wrote: > ''' > On May 6, 4:43 pm, [EMAIL PROTECTED] honoring: > > >>> a.next( ) > ( "I", ) > >>> a.throw( up ) > ( "I", "A" ) > >>> a.next( ) > ( "I", "B" ) > >>> a.next( ) > ( "I", "C" ) > >>> a.throw( down ) > > ( "II", ) > ''' > > #funny declaration > class u

Re: Generate labels for a multi-level outline

2008-05-07 Thread castironpi
''' On May 6, 4:43 pm, [EMAIL PROTECTED] honoring: >>> a.next( ) ( "I", ) >>> a.throw( up ) ( "I", "A" ) >>> a.next( ) ( "I", "B" ) >>> a.next( ) ( "I", "C" ) >>> a.throw( down ) ( "II", ) ''' #funny declaration class up( Exception ): pass class down( Exception ): pass def outline( ): stack=

Re: Generate labels for a multi-level outline

2008-05-06 Thread castironpi
On May 6, 4:43 pm, [EMAIL PROTECTED] wrote: > I need to generate multi-level incrementing labels for an > outline/hierarchy where the string for each level of a label is based on > an incrementing sequence like 1, 2, 3 or A, B, C, or even I, II, III. > For simplicity, assume that each level's label

Generate labels for a multi-level outline

2008-05-06 Thread python
I need to generate multi-level incrementing labels for an outline/hierarchy where the string for each level of a label is based on an incrementing sequence like 1, 2, 3 or A, B, C, or even I, II, III. For simplicity, assume that each level's label segment is separated by a period ("."). I will pas