What is the most efficient way to test for False in a list?

2007-07-08 Thread lex
Of course there is the always the iteration method: list = [1, True, True, False, False, True] status = True for each in list: status = status and each but what is your best way to test for for False in a list? -- http://mail.python.org/mailman/listinfo/python-list

replace c-style comments with newlines (regexp)

2007-12-20 Thread lex __
I'm tryin to use regexp to replace multi-line c-style comments (like /* this /n */ ) with /n (newlines). I tried someting like re.sub('/\*(.*)/\*' , '/n' , file) but it doesn't work for multiple lines. besides that I want to keep all newlines as they were in the original file, so I can

Request for tips on my first python script.

2006-09-07 Thread Lex Hider
got a feeling the overall structure is up the creek. approx 220 LOC. file: GodCast.py Cheers, Lex. #!/usr/bin/python # GodCast: podcast aggregator! # depends on wget & lynx # * one of the main features of GodCast is it's use of bandwidth. #Many podcatchers # http://www.faqts.com/k

Re: Is there a best linux distro for a python hobbyist?

2009-01-05 Thread Lex Hider
Probably not a big difference in most cases between debian, ubuntu, fedora. The latter two may be more likely to have more recent versions. I'm pretty sure ubuntu is the only one which currently has python 3.0 in it's archives [no, it's not the default version]. On 06/01/2009, member thudfoo wro

Kohonen neural network

2010-05-26 Thread Lex Lebedeff
Hello! Has anyone tried to build an implementation of subject in Python? Any help is appreciated! --- news://freenews.netfront.net/ - complaints: n...@netfront.net --- -- http://mail.python.org/mailman/listinfo/python-list

Re: Kohonen neural network

2010-05-26 Thread Lex Lebedeff
On Wed, 26 May 2010 05:26:56 -0700, alex23 wrote: > On May 26, 7:21 pm, Lex Lebedeff wrote: >> Has anyone tried to build an implementation of subject in Python? Any >> help is appreciated! > > http://www.dia.fi.upm.es/~jamartin/download.htm > > Seriously, though,