Re: [Tutor] glob and file names

2014-06-05 Thread Gabriele Brambilla
No, I wanted to say that Peter method works! Thanks anyway and sorry for the html. Gabriele sent from Samsung Mobile Il giorno 05/giu/2014 23:14, "Dave Angel" ha scritto: > Gabriele Brambilla Wrote in message: > > > > > (missing because you posted in html. Please tell your email program to use

Re: [Tutor] glob and file names

2014-06-05 Thread Dave Angel
Gabriele Brambilla Wrote in message: > > (missing because you posted in html. Please tell your email program to use text) Simplify your program to where it's small and self contained. You currently have a string built up from several parts. Since you think the problem is in the glob call, yo

[Tutor] glob and file names

2014-06-05 Thread Gabriele Brambilla
Hi, I'm trying to use glob to read a file of which I don't know the complete name (but only some parts). fiLUMOname = 'Lsum_' + period + '_' + parts[2] + '_' + parts[3] + '_' + parts[4] + '_*.dat' aaa = glob.glob(fiLUMOname) print(aaa) fiLUMO = open(aaa[0], 'r') where period, and the elements