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'

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

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

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

2012-06-16 Thread mariocatch
Hello All, I'm currently in the midst of learning Python, and am absolutely loving the language thus far! I'm a .NET developer in my professional life, and have been recently influenced to learn Python - and I'm glad I was :) I am working on an address book application (input through raw_input(