Re: MD6 in Python

2009-06-05 Thread mikle3
On Jun 5, 11:46 pm, Christian Heimes wrote: > mik...@gmail.com schrieb: > > > As every one related to security probably knows, Rivest (and his > > friends) have a new hashing algorithm which is supposed to have none > > of the weaknesses of MD5 (and as a side benefit - not too many rainbow > > tab

Re: multi-core software

2009-06-05 Thread Scott Burson
On Jun 4, 9:46 am, Xah Lee wrote: > Of interest: > > • Why Must Software Be Rewritten For Multi-Core Processors? >  http://xahlee.org/UnixResource_dir/writ/multi-core_software.html > > plain text version follows. > > -- > Why Must Software Be Rewritt

Re: Adding a Par construct to Python?

2009-06-05 Thread Terry Reedy
Lawrence D'Oliveiro wrote: In message <77as23f1fhj3...@mid.uni-berlin.de>, Diez B. Roggisch wrote: But reduce()? I can't see how you can parallelize reduce(). By its nature, it has to run sequentially: it can't operate on the nth item until it is operated on the (n-1)th item. That depends on t

Re: MD6 in Python

2009-06-05 Thread Robert Kern
On 2009-06-05 16:09, mik...@gmail.com wrote: On Jun 5, 11:46 pm, Christian Heimes wrote: mik...@gmail.com schrieb: As every one related to security probably knows, Rivest (and his friends) have a new hashing algorithm which is supposed to have none of the weaknesses of MD5 (and as a side bene

Re: numpy 00 character bug?

2009-06-05 Thread Carl Banks
On Jun 5, 9:14 am, Nathaniel Rook wrote: > Hello, all! > > I've recently encountered a bug in NumPy's string arrays, where the 00 > ASCII character ('\x00') is not stored properly when put at the end of a > string. > > For example: > > Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) > [GCC 4.2.3

Re: Odd closure issue for generators

2009-06-05 Thread Terry Reedy
Brian Quinlan wrote: Sorry, I wasn't as precise as I should have been. If you consider this example: ( for x in y) I thought that every time that was evaluated, it would be done in a new closure with x bound to the value of x at the time that the closure was created. Instead, a new closur

Re: DUDA !!!!!!!!!!

2009-06-05 Thread pruebauno
On Jun 4, 2:51 pm, "Ariel Vazquez Riveron" wrote: > Hola: >   Hoy en día me encuentro iniciandome dentro del python, en estos   > momentos quiero saber de que forma puedo eliminar un archivo de un   > compactado, ya sea zip, rar o cualquier otro. Estudie las librerías   > zipfile pero no tiene nin

Re: import sqlite3

2009-06-05 Thread willgun
Mark Tolonen 写道: "willgun" wrote in message news:h08c5e$au...@news.cn99.com... By the way ,what does 'best regards' means at the end of a mail? I think 恭祝 may be a good translation. -Mark O(∩_∩)O谢谢 Glad to meet a foreigner know Chinese, :-) . But in my opinion,恭祝 means congratulation,wh

Re: import sqlite3

2009-06-05 Thread willgun
Gabriel Genellina 写道: En Thu, 04 Jun 2009 03:14:18 -0300, willgun escribió: I'm a student from China.It's painful for us to read python documentation entirely due to poor english.So I often make these mistakes. Try "chinese python group" at Google - I see some promising results at least...

Re: fastest way to test file for string?

2009-06-05 Thread Aaron Brady
On Jun 5, 5:50 am, kj wrote: > Hi.  I need to implement, within a Python script, the same > functionality as that of Unix's > >    grep -rl some_string some_directory > > I.e. find all the files under some_directory that contain the string > "some_string". snip The 'mmap.mmap' class has a 'find'

Re: MD6 in Python

2009-06-05 Thread Terry Reedy
Christian Heimes wrote: mik...@gmail.com schrieb: As every one related to security probably knows, Rivest (and his friends) have a new hashing algorithm which is supposed to have none of the weaknesses of MD5 (and as a side benefit - not too many rainbow tables yet). His code if publicly availab

Re: MD6 in Python

2009-06-05 Thread Terry Reedy
Robert Kern wrote: On 2009-06-05 16:09, mik...@gmail.com wrote: It's not that I need it, I can sure use it. I can also write a wrapper myself. My secret agenda is too see if other people want it and write it as an addition to the standard lib, thus wetting my feet in Python Core Development wi

Re: Feedparser Problem

2009-06-05 Thread Jonathan Nelson
Thanks for the responses. I've tried the same script on a Server 2003 install, and Python 2.5 and it ran without a hitch. So, it's either a problem with Python 2.6 or with Windows 7. Thanks for all the responses. You've been great. Best, Jonathan On Jun 5, 7:39 am, Jonathan Nelson wrote: > I

Re: MD6 in Python

2009-06-05 Thread Christian Heimes
Terry Reedy schrieb: > Christian Heimes wrote: >> mik...@gmail.com schrieb: >>> As every one related to security probably knows, Rivest (and his >>> friends) have a new hashing algorithm which is supposed to have none >>> of the weaknesses of MD5 (and as a side benefit - not too many rainbow >>> ta

Re: MD6 in Python

2009-06-05 Thread Christian Heimes
Terry Reedy wrote: > A wrapper could go on PyPI now so it can be tested in use *before* going > in the stdlib. No commit or pre-review needed either. Here you go http://pypi.python.org/pypi/md6 It's still a bit rough, totally untested but it should work. Christian -- http://mail.python.org/ma

Re: MD6 in Python

2009-06-05 Thread Aahz
In article , Christian Heimes wrote: >Terry Reedy schrieb: >> Christian Heimes wrote: >>> >>> Somebody has to write and add a md6 wrapper to the standard library. >>> It's going to take some time, at least 18 months until Python 2.8 and >> >> 2.7 is next > >2.7rc1 is already out. There is no wa

Re: MD6 in Python

2009-06-05 Thread Scott David Daniels
Christian Heimes wrote: ... 2.7rc1 is already out. There is no way a new piece of code will land in the 2.7 release. Christian 3.1rc1 is out, but 2.7 is not even in alpha. See pep 373 for the 2.7 schedule; 3.1's schedule is on pep 375. --Scott David Daniels scott.dani...@acm.org -- http://ma

Re: MD6 in Python

2009-06-05 Thread Christian Heimes
Aahz wrote: > Um, what? You mean 3.1rc1, right? Nevertheless, my understanding is > that 2.7 is mostly restricted to code landed in 3.1, so your second > statement is roughly correct. Oh, d...! Of course you are right, Aahz. As far as I can remember 2.7 will only contain backports of 3.1 feature

Re: MD6 in Python

2009-06-05 Thread Terry Reedy
Aahz wrote: Um, what? You mean 3.1rc1, right? Nevertheless, my understanding is that 2.7 is mostly restricted to code landed in 3.1, so your second statement is roughly correct. My understanding is that 2.7 will come out about the same time as 3.2 and will contain 3.2 backports also. New f

Re: multi-core software

2009-06-05 Thread Vend
On Jun 6, 1:26 am, Roedy Green wrote: > On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku > wrote, quoted or indirectly quoted someone who > said : > > >Even for problems where it appears trivial, there can be hidden > >issues, like false cache coherency communication where no actual > >sharin

Re: urlretrieve() failing on me

2009-06-05 Thread Robert Dailey
On Jun 5, 10:31 am, Peter Otten <__pete...@web.de> wrote: > Robert Dailey wrote: > > On Jun 5, 3:47 am, "Gabriel Genellina" wrote: > >> En Thu, 04 Jun 2009 23:42:29 -0300, Robert Dailey > >> escribió: > > >> > Hey guys, try using urlretrieve() in Python 3.0.1 on the following > >> > URL: > > >> >

Re: Odd closure issue for generators

2009-06-05 Thread Michele Simionato
On Jun 6, 12:06 am, Terry Reedy wrote: > Brian Quinlan wrote: > > > Sorry, I wasn't as precise as I should have been. > > > If you consider this example: > > ( for x in y) > > > I thought that every time that was evaluated, it would be done in > > a new closure with x bound to the value of x at t

Re: Programming language comparison examples?

2009-06-05 Thread skip
>> http://www.rosettacode.org/wiki/Main_Page >> http://en.literateprograms.org/LiteratePrograms:Welcome >> http://www.codecodex.com/wiki/index.php?title=Main_Page >> http://merd.sourceforge.net/pixel/language-study/scripting-language/ >> http://pleac.sourceforge.net/ >> htt

Re: urlretrieve() failing on me

2009-06-05 Thread Robert Dailey
On Jun 5, 7:53 pm, Robert Dailey wrote: > On Jun 5, 10:31 am, Peter Otten <__pete...@web.de> wrote: > > > > > > > Robert Dailey wrote: > > > On Jun 5, 3:47 am, "Gabriel Genellina" wrote: > > >> En Thu, 04 Jun 2009 23:42:29 -0300, Robert Dailey > > >> escribió: > > > >> > Hey guys, try using urlr

Re: Create multiple variables (with a loop?)

2009-06-05 Thread Gökhan SEVER
You could use locals() for dynamic variable names creation. Additionally, you can give to Mayavi a try for visualization of your data: http://code.enthought.com/projects/mayavi/ Gökhan On Fri, Jun 5, 2009 at 2:35 PM, Philip Gröger wrote: > Hi, > I need to create multiple variables (lets say

Re: Create multiple variables (with a loop?)

2009-06-05 Thread Chris Rebert
On Fri, Jun 5, 2009 at 6:44 PM, Gökhan SEVER wrote: > You could use locals() for dynamic variable names creation. Not really. Quoting http://docs.python.org/library/functions.html#locals (emphasis mine): locals() Update and return a dictionary representing the current local symbol table.

Scope objects

2009-06-05 Thread Robert Dailey
Is it possible to create an object in Python that will clean itself up at function exit? I realize destruction of objects may not occur immediately and can be garbage collected, but this functionality would still be great to have. Consider the following function: def do_stuff(): foo = scope_ob

Re: Scope objects

2009-06-05 Thread Stephen Hansen
On Fri, Jun 5, 2009 at 6:56 PM, Robert Dailey wrote: > Is it possible to create an object in Python that will clean itself up > at function exit? I realize destruction of objects may not occur > immediately and can be garbage collected, but this functionality would > still be great to have. Consi

Re: Scope objects

2009-06-05 Thread Chris Rebert
On Fri, Jun 5, 2009 at 6:56 PM, Robert Dailey wrote: > Is it possible to create an object in Python that will clean itself up > at function exit? I realize destruction of objects may not occur > immediately and can be garbage collected, but this functionality would > still be great to have. Conside

Re: urlretrieve() failing on me

2009-06-05 Thread greg
Robert Dailey wrote: This URL isn't even valid, can't believe I didn't get an exception! My guess is that if you look at the data it downloaded, you'll find it's a 404 response page or something similar. -- Greg -- http://mail.python.org/mailman/listinfo/python-list

Re: MD6 in Python

2009-06-05 Thread Steven D'Aprano
On Sat, 06 Jun 2009 01:47:21 +0200, Christian Heimes wrote: > Terry Reedy wrote: >> A wrapper could go on PyPI now so it can be tested in use *before* >> going in the stdlib. No commit or pre-review needed either. > > Here you go http://pypi.python.org/pypi/md6 > > It's still a bit rough, total

Re: Programming language comparison examples?

2009-06-05 Thread John Machin
On Jun 6, 5:45 am, Chris Rebert wrote: > PLEAC (Programming Language Examples Alike Cookbook) is one > option:http://pleac.sourceforge.net/ """The latest version of Python is 2.4""" Appears to be a translation of parts of the Perl Cookbook: """Examples which translate the original Perl closely

Re: how to create a big list of list

2009-06-05 Thread greg
command@alexbbs.twbbs.org wrote: i have try [ [] for x in xrange(2**25) ] Are you really going to be adding data to all of those sublists? If you're only using them sparsely, it may be better to use a dictionary in place of the top level list, and only add sublists as and when necessary.

Re: how to iterate over several lists?

2009-06-05 Thread Steven D'Aprano
On Fri, 05 Jun 2009 11:37:49 -0700, Minesh Patel wrote: >> def chain(*args): >>  return (item for seq in args for item in seq) >> >> for x in chain(list_a, list_b): >>    foo(x) >> -- >> http://mail.python.org/mailman/listinfo/python-list >> >> > If they are the same length, you can try the zip bu

Re: fastest way to test file for string?

2009-06-05 Thread Steven D'Aprano
On Fri, 05 Jun 2009 17:37:25 +0200, Hendrik van Rooyen wrote: > "kj" wrote: >> >> Hi. I need to implement, within a Python script, the same >> functionality as that of Unix's >> >>grep -rl some_string some_directory >> >> I.e. find all the files under some_directory that contain the strin

Re: Making the case for repeat

2009-06-05 Thread Gabriel Genellina
En Fri, 05 Jun 2009 08:04:37 -0300, pataphor escribió: But what is simple? I am currently working on a universal feature creeper that could replace itertools.cycle, itertools.repeat, itertools.chain and reverse and also helps to severely cut down on itertools.islice usage. All within virtually

Re: Making the case for repeat

2009-06-05 Thread Steven D'Aprano
On Fri, 05 Jun 2009 23:21:40 -0300, Gabriel Genellina wrote: > En Fri, 05 Jun 2009 08:04:37 -0300, pataphor > escribió: > >> But what is simple? I am currently working on a universal feature >> creeper that could replace itertools.cycle, itertools.repeat, >> itertools.chain and reverse and also

Re: python way to automate IE8's File Download dialog

2009-06-05 Thread Gabriel Genellina
En Fri, 05 Jun 2009 09:46:25 -0300, <""Michel Claveau - MVP"> escribió: Suppose that the (web) site give the file only after several seconds, and after the user click a confirm (example: RapidFile). Suppose that the (web) site give the file only after the user input a code, controled by a

Re: Making the case for repeat

2009-06-05 Thread Carl Banks
On Jun 4, 6:44 pm, "Gabriel Genellina" wrote: > En Thu, 04 Jun 2009 10:37:45 -0300, pataphor escribió: > > > So here is my proposed suggestion for a once and for all reconciliation > > of various functions in itertools that can not stand on their own and > > keep a straight face. Because of backw

Re: Scope objects

2009-06-05 Thread Robert Dailey
On Jun 5, 9:07 pm, Chris Rebert wrote: > On Fri, Jun 5, 2009 at 6:56 PM, Robert Dailey wrote: > > Is it possible to create an object in Python that will clean itself up > > at function exit? I realize destruction of objects may not occur > > immediately and can be garbage collected, but this funct

Re: MD6 in Python

2009-06-05 Thread mikle3
On Jun 6, 5:16 am, Steven D'Aprano wrote: > On Sat, 06 Jun 2009 01:47:21 +0200, Christian Heimes wrote: > > Terry Reedy wrote: > >> A wrapper could go on PyPI now so it can be tested in use *before* > >> going in the stdlib.  No commit or pre-review needed either. > > > Here you gohttp://pypi.pyth

Re: Winter Madness - Passing Python objects as Strings

2009-06-05 Thread Gabriel Genellina
En Fri, 05 Jun 2009 12:33:04 -0300, Hendrik van Rooyen escribió: "Gabriel Genellina" wrote: But if you already have a queue, you may put other objects there (instead of "canning" them). Testing the object type with isinstance(msg, str) is pretty fast, and if you bind locally those names I

Error in linalg.inv ??

2009-06-05 Thread Ajith Kumar
Hello, I ran the following code (Using Debian 5.0) from numpy import * a = arange(1.,10.) b = reshape(a, [3,3]) c = linalg.inv(b) print b print c print dot(b,c) print dot(c,b) And the result is [[ 1. 2. 3.] [ 4. 5. 6.] [ 7. 8. 9.]] [[ 3.15221191e+15 -6.30442381e+15 3.15221191e+15] [

Re: Scope objects

2009-06-05 Thread s0suk3
On Jun 5, 8:56 pm, Robert Dailey wrote: > Is it possible to create an object in Python that will clean itself up > at function exit? I realize destruction of objects may not occur > immediately and can be garbage collected, but this functionality would > still be great to have. Consider the follow

Re: python 3.1 - io.BufferedReader.peek() incomplete or change of behaviour.

2009-06-05 Thread Gabriel Genellina
En Fri, 05 Jun 2009 17:04:45 -0300, Frederick Reeve escribió: I have sent this message to the authors as well as to this list. If this is the wrong list please let me know where I should be sending it... dev perhaps? I think the best place is the bug tracker: http://bugs.python.org/ -- Gabr

Re: spammers on pypi

2009-06-05 Thread Lawrence D'Oliveiro
In message , joep wrote: > Is there a way to ban spammers from pypi? Yes, but it doesn't work. -- http://mail.python.org/mailman/listinfo/python-list

<    1   2