Re: [Tutor] need help generating table of contents

2018-08-24 Thread Peter Otten
Albert-Jan Roskam wrote: > Hello, > > I have Ghostscript files with a table of contents (toc) and I would like to use this info to generate a human-readable toc. The problem is: I can't get the (nested) hierarchy right. > > import re > > toc = """\ > [ /PageMode /UseOutlines > /Page 1 > /

Re: [Tutor] Accessing a tuple of a dictionary's value

2018-08-24 Thread Mats Wichmann
On 08/24/2018 03:02 AM, Alan Gauld via Tutor wrote: > CCing list, please always use Reply-All or Reply-List when responding > to the tutor list so that everyone gets a chance to reply. > > > On 24/08/18 00:35, Roger Lea Scherer wrote: >> >> Lots of code missing, but the line I'm interested in is

[Tutor] need help generating table of contents

2018-08-24 Thread Albert-Jan Roskam
Hello, I have Ghostscript files with a table of contents (toc) and I would like to use this info to generate a human-readable toc. The problem is: I can't get the (nested) hierarchy right. import re toc = """\ [ /PageMode /UseOutlines   /Page 1   /View [/XYZ null null 0]   /DOCVIEW pdfmark [ /

Re: [Tutor] Accessing a tuple of a dictionary's value

2018-08-24 Thread Alan Gauld via Tutor
On 24/08/18 10:02, Alan Gauld via Tutor wrote: > CCing list, please always use Reply-All or Reply-List when responding > to the tutor list so that everyone gets a chance to reply. > > > On 24/08/18 00:35, Roger Lea Scherer wrote: >> >> Lots of code missing, but the line I'm interested in is this:

Re: [Tutor] Accessing a tuple of a dictionary's value

2018-08-24 Thread Alan Gauld via Tutor
CCing list, please always use Reply-All or Reply-List when responding to the tutor list so that everyone gets a chance to reply. On 24/08/18 00:35, Roger Lea Scherer wrote: > > Lots of code missing, but the line I'm interested in is this: > print("Your number  " + str(numerator) + "/" + str(denom

Re: [Tutor] Times Tables Program that constantly tells you that you are wrong!

2018-08-24 Thread Matthew Polack
Thanks Alan and Peter for all your help with this. I got it all to work..thank you.. like learning a musical instrument...probably just need some time consolidating the current skill set...has been a lot to take in... but getting there steadily...and bit by bit it is starting to make sense.. I'