Reading files with names dynamically changing

Satish Kumar Chimakurthi skchim0 at engr.uky.edu
Wed Feb 4 00:42:21 EST 2004


Hi all,

An external solver program is dynamically producing files with different
names 0000001.dat, 0000002.dat, 0000003.dat etc.....at regular intervals.
These files contain all numeric data. Is it possible to read each of these
dynamically in python ?? If so, how should my code look like ?? If it was
not dynamically required, then, I would change the name of the file in my
*open* statement every time and read the corresponding one. But then, I
need everything to be done automatically without my changing the code.

Can someone help me ??


Thanks,

Best Regards,
Satish






More information about the Python-list mailing list