Re: How to modify this script?

2013-01-09 Thread chaouche yacine
what was wrong in the snippet. If this doesn't work for you, please let me know. From: Kurt Hansen kurt@ugyldig.invalid To: python-list@python.org Sent: Wednesday, January 9, 2013 10:07 AM Subject: Re: How to modify this script? Den 08/01/13 16.31, chaouche

Re: How to modify this script?

2013-01-09 Thread chaouche yacine
(items))     output  += addline(columns) output += /table\ return output From: Kurt Hansen kurt@ugyldig.invalid To: python-list@python.org Sent: Wednesday, January 9, 2013 12:04 PM Subject: Re: How to modify this script? Den 09/01/13 11.23, chaouche yacine

Re: How to modify this script?

2013-01-08 Thread chaouche yacine
Sent: Monday, January 7, 2013 5:42 PM Subject: Re: How to modify this script? Den 06/01/13 16.12, chaouche yacine skrev: I'm not confident this would run on gedit. It works on a python interpreter if you have a file named data.txt in the same directory containing your sample data. It surely

Re: Over 30 types of variables available in python ?

2013-01-07 Thread chaouche yacine
...@udel.edu To: python-list@python.org Sent: Monday, January 7, 2013 1:45 AM Subject: Re: Over 30 types of variables available in python ? On 1/6/2013 6:12 PM, chaouche yacine wrote: booleans ints, floats, longs, complexes strings, unicode strings lists, tuples, dictionaries, dictionary views, sets

Re: How to modify this script?

2013-01-06 Thread chaouche yacine
if len(columns) != 3:    colspan = 3 - len(columns) + 1    output += 'td colspan=%s' % (colspan) + item + '/td ' I did not test. Use with caution. From: Kurt Hansen kurt@ugyldig.invalid To: python-list@python.org Sent: Sunday, January 6, 2013 1:42 PM

Re: Proof that nobody reads the tests

2013-01-06 Thread chaouche yacine
, Jan 7, 2013 at 12:01 AM, chaouche yacine yacinechaou...@yahoo.com wrote: Has anybody read the source code of /usr/lib/python2.7/test/inspect_fodder.py ? I wonder how did they let this into the official python distribution. I thought Guido was serious :) people of the PSF seem to have a certain

Re: How to modify this script?

2013-01-06 Thread chaouche yacine
? Den 06/01/13 13.58, chaouche yacine skrev: if len(columns) != 3:      colspan = 3 - len(columns) + 1      output += 'td colspan=%s' % (colspan) + item + '/td ' I did not test. Use with caution. I've tried to put it in several different places in the script, but with no luck; remember that I'm

Re: How to modify this script?

2013-01-06 Thread chaouche yacine
: Re: How to modify this script? Den 06/01/13 15.01, chaouche yacine wrote: Well, I'm not answering your question since I am rewriting the script, because I prefer it this way :) def addline(line):       return tr%s/tr\n % line [cut] I surpose I shall put your code between $ and ? printed

Couting the number of lines of code of a python program

2013-01-05 Thread chaouche yacine
Hello. I'v written a small script that prints the number of lines of code of a python program to stdout (by module, function, class and method), the sources are available online here  https://www.assembla.com/code/tahar/subversion/nodes. The readme has an example usage as well as a trace

Re: Couting the number of lines of code of a python program

2013-01-05 Thread chaouche yacine
of lines of code of a python program On Sun, Jan 6, 2013 at 12:55 AM, chaouche yacine yacinechaou...@yahoo.com wrote: The   problem is that I'm using the inspect module, because it provides a nice function inspect.getsourcelines that takes a python object and return its number of lines of code

Re: Couting the number of lines of code of a python program

2013-01-05 Thread chaouche yacine
- Original Message - From: Chris Angelico ros...@gmail.com To: python-list@python.org Cc: Sent: Saturday, January 5, 2013 4:25 PM Subject: Re: Couting the number of lines of code of a python program On Sun, Jan 6, 2013 at 2:17 AM, chaouche yacine yacinechaou...@yahoo.com wrote

Re: reduce expression to test sublist

2013-01-05 Thread chaouche yacine
Because reduce doesn't do what you want. You'd want all. L1 = [1,2,3] L2 = [A1,B2,C3,1,2,3] print all((x in L2 for x in L1)) # prints True L3 = [A1,B2,C3] print all((x in L2 for x in L3)) # prints True - Original Message - From: Asim asim@gmail.com To: python-list@python.org Cc:

Re: Python programming philosophy

2013-01-05 Thread chaouche yacine
The compiler reads your source code and parses it into parse trees. This is first step. It then takes the parse trees and transform them into abstract syntax trees, which are like a DOM tree in an HTML file, and then transform that AST into a control flow graph, and finally a bytecode is