glob.glob output
Bruno Desthuilliers
bruno.42.desthuilliers at wtf.websiteburo.oops.com
Tue Mar 13 11:00:00 EDT 2007
Hitesh a écrit :
> On Mar 12, 4:33 pm, Bruno Desthuilliers
> <bdesth.quelquech... at free.quelquepart.fr> wrote:
>> Hitesh a écrit :
>>
(snip)
> Thank you for your reply.
> From the return value I am trying to figure out whether the file
> xtRec* exist or not.
Yes, I had understood this !-)
What I wanted to point out was the fact you were discarding this value.
> I am newbie so exuse my ignorance... still learning.
Been here, done that... Don't worry. We're all still learning.
> Somehow when I tried your solution, it takes 10mins to scan 200 plus
> servers but when I tried my code,
Which one ? The original one, or the one where you first store glob
results in a list ?
> it takes less then 2 mins.
> This is a puzzle for me, I gotta figure it out.
i/o are usually expansive, so the difference may comes from the repeated
print. Also, I'm doing a bit of formatting, which is not your case.
FWIW, my own snippet was just an example of the idiomatic way to read a
text file line by line. Doing TheRightThing(tm) for your actual problem
is your responsability !-)
More information about the Python-list
mailing list