Re: [Tutor] Introduction - log exercise

2009-11-18 Thread Antonio de la Fuente
* Antonio de la Fuente [2009-11-17 16:58:08 +]: > Date: Tue, 17 Nov 2009 16:58:08 + > From: Antonio de la Fuente > To: Python Tutor mailing list > Subject: [Tutor] Introduction - log exercise > Organization: (muybien.org) > User-Agent: Mutt/1.5.20 (2009-0

Re: [Tutor] Introduction - log exercise

2009-11-18 Thread Antonio de la Fuente
* Christian Witts [2009-11-18 09:53:15 +0200]: > Date: Wed, 18 Nov 2009 09:53:15 +0200 > From: Christian Witts > To: Antonio de la Fuente > CC: Python Tutor mailing list > Subject: Re: [Tutor] Introduction - log exercise > User-Agent: Thunderbird 2.0.0.23 (X11/20090817) >

Re: [Tutor] Introduction - log exercise

2009-11-18 Thread Alan Gauld
"bob gailer" wrote "Antonio de la Fuente" wrote > if not line.isspace() and not line == 'foo': > fileOut.write(line) But then, the new log file will have all the blocks, even the ones that had 'foo' on it, even if the foo lines weren't there anymore. No? or is there anything that I don'

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Dave Angel
Antonio de la Fuente wrote: * Dave Angel [2009-11-17 16:30:43 -0500]: for line in fileIn: if line.isspace():

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread bob gailer
Antonio de la Fuente wrote: * bob gailer [2009-11-17 15:26:20 -0500]: Date: Tue, 17 Nov 2009 15:26:20 -0500 From: bob gailer To: Antonio de la Fuente CC: Python Tutor mailing list Subject: Re: [Tutor] Introduction - log exercise User-Agent: Thunderbird 2.0.0.23 (Windows/20090812

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread bob gailer
Alan Gauld wrote: "Antonio de la Fuente" wrote > if not line.isspace() and not line == 'foo': > fileOut.write(line) But then, the new log file will have all the blocks, even the ones that had 'foo' on it, even if the foo lines weren't there anymore. No? or is there anything that I don't g

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Antonio de la Fuente
* Dave Angel [2009-11-17 16:30:43 -0500]: > Date: Tue, 17 Nov 2009 16:30:43 -0500 > From: Dave Angel > To: Antonio de la Fuente > CC: Python Tutor mailing list > Subject: Re: [Tutor] Introduction - log exercise > User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) > Messa

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Antonio de la Fuente
* bob gailer [2009-11-17 15:26:20 -0500]: > Date: Tue, 17 Nov 2009 15:26:20 -0500 > From: bob gailer > To: Antonio de la Fuente > CC: Python Tutor mailing list > Subject: Re: [Tutor] Introduction - log exercise > User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) > Messa

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Alan Gauld
"Antonio de la Fuente" wrote > if not line.isspace() and not line == 'foo': > fileOut.write(line) But then, the new log file will have all the blocks, even the ones that had 'foo' on it, even if the foo lines weren't there anymore. No? or is there anything that I don't get? I think the

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Dave Angel
Antonio de la Fuente wrote: Hi everybody, This is my first post here. I have started learning python and I am new to programing, just some bash scripting, no much. Thank you for the kind support and help that you provide in this list. This is my problem: I've got a log file that is filling up

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Antonio de la Fuente
* Nick Stinemates [2009-11-17 13:30:51 -0500]: > Date: Tue, 17 Nov 2009 13:30:51 -0500 > From: Nick Stinemates > To: Antonio de la Fuente > Cc: Python Tutor mailing list > Subject: Re: [Tutor] Introduction - log exercise > Mail-Followup-To: Antonio de la Fuente , >

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Wayne Werner
On Tue, Nov 17, 2009 at 2:23 PM, Antonio de la Fuente wrote: > But then, the new log file will have all the blocks, even the ones that > had 'foo' on it, even if the foo lines weren't there anymore. No? or > is there anything that I don't get? > Ah yes, I forgot about that part. So you should pr

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread bob gailer
Antonio de la Fuente wrote: Hi everybody, This is my first post here. I have started learning python and I am new to programing, just some bash scripting, no much. Thank you for the kind support and help that you provide in this list. This is my problem: I've got a log file that is filling up

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Antonio de la Fuente
* Wayne Werner [2009-11-17 11:41:25 -0600]: > Date: Tue, 17 Nov 2009 11:41:25 -0600 > From: Wayne Werner > To: Antonio de la Fuente > Cc: Python Tutor mailing list > Subject: Re: [Tutor] Introduction - log exercise > Message-ID: <333efb450911170941g709e7ea3l4b4316044b

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Nick Stinemates
> I will read lines from file, with the 'for loop', and then I will check them > for > 'foo' matches with a 'while loop', if matches I (somehow) re-initialise the > list, and if there is no matches for foo, I will append line to the list. > When I > get to a blank line (end of block), write myLis

Re: [Tutor] Introduction - log exercise

2009-11-17 Thread Wayne Werner
On Tue, Nov 17, 2009 at 10:58 AM, Antonio de la Fuente wrote: > Hi everybody, > > This is my first post here. I have started learning python and I am new to > programing, just some bash scripting, no much. > Thank you for the kind support and help that you provide in this list. > You're welcome!

[Tutor] Introduction - log exercise

2009-11-17 Thread Antonio de la Fuente
Hi everybody, This is my first post here. I have started learning python and I am new to programing, just some bash scripting, no much. Thank you for the kind support and help that you provide in this list. This is my problem: I've got a log file that is filling up very quickly, this log file is