Emile beat me to it, but here goes anyway...
On 10/10/2010 3:35 PM, Josep M. Fontana wrote:
Hi,
First let me apologize for taking so long to acknowledge your answers
and to thank you (Eduardo, Peter, Greg, Emile, Joel and Alan, sorry if
I left anyone) for your help and your time.
One of th
On 10/10/2010 12:35 PM Josep M. Fontana said...
OK. Let's start with -b- . My first problem is that I don't really know how
to go about building a dictionary from the file with the comma separated
values. I've discovered that if I use a file method called 'readlines' I can
create a list whose el
Hi,
First let me apologize for taking so long to acknowledge your answers and to
thank you (Eduardo, Peter, Greg, Emile, Joel and Alan, sorry if I left
anyone) for your help and your time.
One of the reasons I took so long in responding (besides having gotten busy
with some urgent matters related
On 10/6/2010 11:58 AM Joel Goldstick said...
On Wed, Oct 6, 2010 at 2:50 PM, Emile van Sebille wrote:
On 10/6/2010 9:25 AM Eduardo Vieira said...
Of course this solution is simpler:
extracted = a[a.index("i")+1:]
But I didn't want to build a list in memory with "readlines()" in the
case
On Wed, Oct 6, 2010 at 2:50 PM, Emile van Sebille wrote:
> On 10/6/2010 9:25 AM Eduardo Vieira said...
>
>
>
> Of course this solution is simpler:
>> extracted = a[a.index("i")+1:]
>> But I didn't want to build a list in memory with "readlines()" in the
>> case of a file.
>>
>
> This is what I
On 10/6/2010 9:25 AM Eduardo Vieira said...
Of course this solution is simpler:
extracted = a[a.index("i")+1:]
But I didn't want to build a list in memory with "readlines()" in the
case of a file.
This is what I do unless the files are _really big_
For-me-really-big-is-over-200Mb-ish-ly y'rs
"Eduardo Vieira" wrote
The other day I was writing a script to extract data from a file
from
the line where a text is found to the end of the file.
The standard pattern here is to use a sentinel, in pseudo code:
def checkLine(line, start='',end=''):
if (start in line) or (end in line):
Am 06.10.2010 18:25, schrieb Eduardo Vieira:
The other day I was writing a script to extract data from a file from
the line where a text is found to the end of the file. The same
functionality is this sed script:
'1,/regexp/'d
I couldn't put my head to work around this and came up with a solution
Eduardo Vieira wrote:
> The other day I was writing a script to extract data from a file from
> the line where a text is found to the end of the file. The same
> functionality is this sed script:
> '1,/regexp/'d
> I couldn't put my head to work around this and came up with a solution
> using list
The other day I was writing a script to extract data from a file from
the line where a text is found to the end of the file. The same
functionality is this sed script:
'1,/regexp/'d
I couldn't put my head to work around this and came up with a solution
using list slicing. But how can I do that? I w
10 matches
Mail list logo