Re: more newbie list questions

2005-07-14 Thread Ali
sTemplate.replace() returns a string with that substitution. so you need to reassign it such as: sTemplate = sTemplate.replace('author1', author1) Anyway, Sion Arrowsmith above showed you a much better technique of filling all those values at once. Hope this helps, Ali -- http://mail.python.

Re: more newbie list questions

2005-07-14 Thread googleboy
Thanks for this. It ahs been very helpful. I realised that my problem using getattr were because I was trying to use it over the list of lists, instead of each book. I have written up a for loop now, and I think I am a lot closer: for book in all_books: author1 = getattr(book, 'auth

Re: more newbie list questions

2005-07-14 Thread googleboy
Ali wrote: > It's not really clear what you mean? Ah. sorry. Let me try again. I start with a csv that looks something like this: title, author1, author2, publisher, code, ISBN frogs of canada, andy humber, , springer press, foc2, 111-20345-556 newts of the UK, nigel snodgrass, sarah strauss,

Re: more newbie list questions

2005-07-14 Thread Sion Arrowsmith
Bernhard Holzmayer <[EMAIL PROTECTED]> wrote: >googleboy wrote: >> I have a cell.txt file that looks like this: >> >> ++ >> The title is %title%. >> The author is %author1% %author2% >> The Publisher is %publisher1% %publisher2% >> The ISBN is %ISBN% >> ++ > >This looks like a DOS-batch-file

Re: more newbie list questions

2005-07-14 Thread Bernhard Holzmayer
googleboy wrote: > Hi there. Hi googleboy! > > I am doing a bunch of processing over a list of lists, and am > interested in doing several things taht don't seem to be working for me > just at the moment. > > I have a list of books with several fields (Title, Author1, Author2, > Publisher, ISBN

Re: more newbie list questions

2005-07-14 Thread Ali
It's not really clear what you mean? -- http://mail.python.org/mailman/listinfo/python-list

more newbie list questions

2005-07-13 Thread googleboy
Hi there. I am doing a bunch of processing over a list of lists, and am interested in doing several things taht don't seem to be working for me just at the moment. I have a list of books with several fields (Title, Author1, Author2, Publisher, ISBN) in a csv. I have a cell.txt file that looks l