Re: [Tutor] Simple Python Address Book (Advice welcome!)

2012-06-18 Thread Prasad, Ramit
def LoadAddresses(): Loads all addresses from file and places them in tuple in form (bool, list), where the list is each row from the file (a person's name | email). success, lines = (False, []) try: f = open(addressBookPath, 'r') lines

Re: [Tutor] Simple Python Address Book (Advice welcome!)

2012-06-17 Thread Alan Gauld
On 17/06/12 02:45, mariocatch wrote: I'm essentially asking if someone wouldn't mind taking a look at what I have so far, and giving some advice on some of my weak areas, Welcome, I've inserted a few comments below. In general it's OK although personally I'd probably put the email validation

Re: [Tutor] Simple Python Address Book (Advice welcome!)

2012-06-17 Thread Wayne Werner
On Sun, 17 Jun 2012, Alan Gauld wrote: On 17/06/12 02:45, mariocatch wrote: after each row? #it's causing multiple line separations when writing back out to file (because each # time we finish reading, it ends with a trailing newline). f.write({0}{1}{2}\n.format(k,