Re: [Tutor] How to have unique identifiers for multiple object instances of a given class?

2018-08-27 Thread boB Stepp
On Mon, Aug 27, 2018 at 3:44 AM Alan Gauld via Tutor wrote: > > On 27/08/18 04:58, boB Stepp wrote: > >> Maybe JSON for that? Or even a shelve database? > > > > I plan to keep this simple. I will use a ".cfg" file to store game > > configuration information and a ".csv" file to store the actual

Re: [Tutor] need help generating table of contents

2018-08-27 Thread Peter Otten
Albert-Jan Roskam wrote: > > From: Tutor on behalf > of Peter Otten <__pete...@web.de> Sent: Friday, August 24, 2018 3:55 PM > To: tutor@python.org > >> The following reshuffle of your code seems to work: >> >> print('\r\n** Table of contents\r\n') >> pattern = '/Title \((.+?)\).+?/Page ([0-9]

Re: [Tutor] Problem compiling code from GitHub

2018-08-27 Thread Mats Wichmann
On 08/27/2018 05:14 AM, Dave Hill wrote: > I get the following error > >    Traceback (most recent call last): >       File "C:\Code\Python\ODS_Writer\Test_ODS#1.py", line 5, in >         from OdsWriter import odswriter as ods >       File "C:\Code\Python\ODS_Writer\OdsWriter.py", line 7, in >

Re: [Tutor] Problem compiling code from GitHub

2018-08-27 Thread Steven D'Aprano
Hi Dave, and welcome! On Mon, Aug 27, 2018 at 12:14:33PM +0100, Dave Hill wrote: > I have found 'odswriter' on GitHub > https://github.com/mmulqueen/odswriter which appears to provide what I > want. However, I have come to a halt, due to the limitation of my knowledge. [...] > I get the fol

[Tutor] Problem compiling code from GitHub

2018-08-27 Thread Dave Hill
Hi, As a volunteer on a Welsh Heritage Railway I undertake their Electrical Equipment testing, for which I use a Megger PAT420. This device stores data in 'sqlite', which using Python I can read and generate a number of reports in 'csv' format. I now wish to collate asset data for various loc

Re: [Tutor] need help generating table of contents

2018-08-27 Thread Albert-Jan Roskam
From: Tutor on behalf of Peter Otten <__pete...@web.de> Sent: Friday, August 24, 2018 3:55 PM To: tutor@python.org > The following reshuffle of your code seems to work: > > print('\r\n** Table of contents\r\n') > pattern = '/Title \((.+?)\).+?/Page ([0-9]+)(?:\s+/Count ([0-9]+))?' > > def pr

Re: [Tutor] How to have unique identifiers for multiple object instances of a given class?

2018-08-27 Thread Alan Gauld via Tutor
On 27/08/18 04:58, boB Stepp wrote: > So you are saying do something like: > > class SolitaireGame(): > def __init__(self, name): > self.name = name > > def describe_self(self): > print("This game of solitaire is called", self.name, ".") > > game_objects = {} > def make_