[Tutor] Subdividing config file by matching line from a file

2016-10-19 Thread Toni Fuente via Tutor
Hello everybody, I am trying to divide a configuration file (configs) in the form of: ServerAdmin webmas...@foo.com ServerName www.foo.com DocumentRoot /home/public/web/htdocs/foo.com ScriptAlias /cgi-bin/ /home/public/web/htdocs/foo.com/cgi-bin/ [...] ServerAdmin webmas...@bar.com Server

Re: [Tutor] Subdividing config file by matching line from a file

2016-10-19 Thread Toni Fuente via Tutor
-Agent: KNode/4.13.3 > Message-ID: > > Toni Fuente via Tutor wrote: > > > Hello everybody, > > > > I am trying to divide a configuration file (configs) in the form of: > > > > > > ServerAdmin webmas...@foo.com > > ServerName www.foo.com

[Tutor] While until the end of a list

2017-03-13 Thread Toni Fuente via Tutor
Hi, I've got this script that goes through an httpd conf file, and gets the related bits of it for a site, and writes a new config with values that I am interested. The problem is that it finds the first chunk and returns it, but I need to go to the end of all chunks list, because there are also s

Re: [Tutor] While until the end of a list

2017-03-13 Thread Toni Fuente via Tutor
* David Rock [2017-03-13 11:28:57 -0500]: > > On Mar 13, 2017, at 10:54, Toni Fuente via Tutor wrote: > > > > Hi, > > > > I've got this script that goes through an httpd conf file, and gets the > > related bits of it for a site, and writes a new co

Re: [Tutor] While until the end of a list

2017-03-14 Thread Toni Fuente via Tutor
* Peter Otten <__pete...@web.de> [2017-03-13 19:57:38 +0100]: > > Toni Fuente via Tutor wrote: > > > Hi, > > > > I've got this script that goes through an httpd conf file, and gets the > > related bits of it for a site, and writes a new config with

Re: [Tutor] While until the end of a list

2017-03-14 Thread Toni Fuente via Tutor
> > for item in itertools.chain.from_iterable(chunk): >... > > will work, too, without the consumption of time and memory needed to build > the list. > Thank you Peter, yes it works as I wanted like that. ___ Tutor maillist - Tutor@python.org T