a problem with writing a generator

Paweł Banyś moc.liamg at synabp.reverse_the_string
Thu Jan 14 15:11:29 CET 2010


Hello,

Please forgive me if I repeat the subject anyhow. I am trying to write a
simple program in Python which scans a config file in search for
"include" lines. If those lines are found, the files included there are
followed and scanned and if any further "include" lines are found, the
whole procedure repeats itself. The program ends when the whole tree
structure of those "includes" is generated.

I seem to have some blackout in my mind because I cannot understand how
to use a generator functionality to complete the task. If anybody has
already done such thing I would be very grateful for any guidance.

Regards,

Paweł



More information about the Python-list mailing list