Re: a problem with writing a generator

2010-01-15 Thread Paweł Banyś
I would like to thank you for help. With the advice you provided I managed to complete my program and now it is working as it should. Regards, Paweł -- http://mail.python.org/mailman/listinfo/python-list

Re: a problem with writing a generator

2010-01-14 Thread Lie Ryan
On 01/15/10 01:49, Steven D'Aprano wrote: > On Thu, 14 Jan 2010 15:11:29 +0100, Paweł Banyś wrote: > >> 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 f

Re: a problem with writing a generator

2010-01-14 Thread Dave Angel
PaweB Bany[ wrote: 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

Re: a problem with writing a generator

2010-01-14 Thread Wolodja Wentland
On Thu, Jan 14, 2010 at 15:11 +0100, Paweł Banyś wrote: > 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. I guess the following slid

Re: a problem with writing a generator

2010-01-14 Thread Tim Chase
Paweł Banyś wrote: Assuming that include directives are like #include "blahblah" Yes, I have already tried the methods related to source code processing using Python generators but unfortunately I am dealing with BIND and its named.conf files. (dealing with BIND named.conf files doesn't so

Re: a problem with writing a generator

2010-01-14 Thread Steven D'Aprano
On Thu, 14 Jan 2010 15:11:29 +0100, Paweł Banyś wrote: > 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

Re: a problem with writing a generator

2010-01-14 Thread Paweł Banyś
> Assuming that include directives are like > > #include "blahblah" Yes, I have already tried the methods related to source code processing using Python generators but unfortunately I am dealing with BIND and its named.conf files. Regards, Paweł -- http://mail.python.org/mailman/listinfo/pyt

Re: a problem with writing a generator

2010-01-14 Thread Alf P. Steinbach
* Paweł Banyś: 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 foun

a problem with writing a generator

2010-01-14 Thread Paweł Banyś
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 proc