RE: Unit tests and coverage

2013-12-28 Thread Joseph L. Casale
> So, back to my original question; what do you mean by "providing > coverage"? Hi Roy, I meant touch every line, such as what https://pypi.python.org/pypi/coverage measures. As the script is being invoked with Popen, I lose that luxury and only gain the assertions tests but that of course doesn'

Re: outsmarting context managers with coroutines

2013-12-28 Thread Ian Kelly
On Sat, Dec 28, 2013 at 5:35 PM, Burak Arslan wrote: > On 12/29/13 00:13, Burak Arslan wrote: >> Hi, >> >> Have a look at the following code snippets: >> https://gist.github.com/plq/8164035 >> >> Observations: >> >> output2: I can break out of outer context without closing the inner one >> in Pyth

Re: Unit tests and coverage

2013-12-28 Thread Roy Smith
In article , "Joseph L. Casale" wrote: > I have a script that accepts cmdline arguments and receives input via stdin. > I have a unit test for it that uses Popen to setup an environment, pass the > args and provide the stdin. > > Problem is obviously this does nothing for providing coverage. G

Unit tests and coverage

2013-12-28 Thread Joseph L. Casale
I have a script that accepts cmdline arguments and receives input via stdin. I have a unit test for it that uses Popen to setup an environment, pass the args and provide the stdin. Problem is obviously this does nothing for providing coverage. Given the above specifics, anyone know of a way to wor

Re: Python mange with liste

2013-12-28 Thread Rustom Mody
On Sun, Dec 29, 2013 at 8:38 AM, Rustom Mody wrote: > Give up on file-IO, ie dont use the EXTERNAL file > > nam1;F;Y > nam2;M;N > nam3;F;Y > nam4;M;N > halo;M;Y > rock;M;N > nam1;F;N > > But ASSUME you have the internal python data structure > names = [("nam1", "F", "Y"), ("nam2", "M", "N")] # comp

Re: Python mange with liste

2013-12-28 Thread Rustom Mody
On Sun, Dec 29, 2013 at 5:00 AM, Bala Ji wrote: > Hello guys, > i need some help with is program > > I have a txt file "test.txt" where there is Name;Sexe;Answer(Y or N) > example of txt file: > -- > nam1;F;Y > nam2;M;N > nam3;F;Y > nam4;M;N > halo;M;Y > rock;M;N

Re: outsmarting context managers with coroutines

2013-12-28 Thread Burak Arslan
On 12/29/13 00:13, Burak Arslan wrote: > Hi, > > Have a look at the following code snippets: > https://gist.github.com/plq/8164035 > > Observations: > > output2: I can break out of outer context without closing the inner one > in Python 2 > output3: Breaking out of outer context closes the inner on

Python mange with liste

2013-12-28 Thread Bala Ji
Hello guys, i need some help with is program I have a txt file "test.txt" where there is Name;Sexe;Answer(Y or N) example of txt file: -- nam1;F;Y nam2;M;N nam3;F;Y nam4;M;N halo;M;Y rock;M;N nam1;F;N _ so my program will ask the

outsmarting context managers with coroutines

2013-12-28 Thread Burak Arslan
Hi, Have a look at the following code snippets: https://gist.github.com/plq/8164035 Observations: output2: I can break out of outer context without closing the inner one in Python 2 output3: Breaking out of outer context closes the inner one, but the closing order is wrong. output3-yf: With yiel

NOW Watch Hot Sexy Star Aishwarya rai Bathing Videos In All Angles

2013-12-28 Thread vbfvf6
Sexys -- https://mail.python.org/mailman/listinfo/python-list

Re: String Template

2013-12-28 Thread Cristiano Araujo
On Friday, December 27, 2013 9:55:00 AM UTC-3, Giuseppe Tripoli wrote: > Hello > > > > I'm rewriting a program previously written in C #, and trying to keep the > same configuration file, I have a problem with untapped strings. > > > > The previous configuration files provide an input templa

Re: String Template

2013-12-28 Thread Chris Angelico
On Sat, Dec 28, 2013 at 11:33 PM, Giuseppe Tripoli wrote: > Certainly the quickest and easiest method is to use the regex, but I did not > really intend to change the configuration file. Then all you need is a way to convert your config file string into a regex, which shouldn't be too difficult.

Re: String Template

2013-12-28 Thread Giuseppe Tripoli
The problem is that I have a huge amount of log apache, log Akami, log cotendo, log iis ... messily all together. And the program does is that, according to the file name, use the configuration file to read. Certainly the quickest and easiest method is to use the regex, but I did not really int

Re: cascading python executions only if return code is 0

2013-12-28 Thread Gene Heskett
On Friday 27 December 2013 19:07:08 pec...@pascolo.net did opine: > Roy Smith writes: > > Or how to deal with languages where 26 letters isn't enough. > > English! that is, imvho > English is in sore need > of some more letters[*] > and of diacriticals too > g > [*] unable

Re: [OT]Royal pardon for codebreaker Turing

2013-12-28 Thread Mark Lawrence
On 28/12/2013 04:16, Steven D'Aprano wrote: On Sat, 28 Dec 2013 07:30:34 +1100, Tim Delaney wrote: On 28 December 2013 04:34, Mark Lawrence wrote: Personally, I think that people ought to throw a party celebrating Turing's rehabilitation, and do it right outside the Russian Embassy. Any