[ANN] Python 2.4.6 and 2.5.3 (final)

2008-12-19 Thread Martin v. Löwis
On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.6 and 2.5.3 (final). 2.5.3 is the last bug fix release of Python 2.5. Future 2.5.x releases will only include security fixes. According to the release notes, about 80 bugs and patches

Re: weird dict problem, how can this even happen?

2008-12-19 Thread Scott David Daniels
Joel Hedlund wrote: Scott David Daniels wrote: Perhaps your hash function could be something like: I'm not sure I understand what you're suggesting. /Joel Sorry, a half-thought out idea based on the fact that you wanted a consistent hash for a varying dictionary. The given dictionary subcl

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Carl Banks
On Dec 19, 12:44 pm, r wrote: > ~Michael, > What’s next down this road of self destruction? Hey guys, forget about > about empty parenthesis on a function/method call,  we should not have > to waste are time typing them… Wait forget about them all together and > we will just write Ruby code… > > D

Re: IMAP: How to implement GMail-like threaded conversations view

2008-12-19 Thread Chris Rebert
On Fri, Dec 19, 2008 at 11:54 AM, Michael Torrie wrote: > Martin wrote: >> Currently I am trying to get used to Python's imaplib and email >> modules. >> I'like to create a webmail client simmilar to GMail. > > This is off-topic, but why on earth would you want to emulate Gmail's > conversation vi

Re: PIL on 3.x?

2008-12-19 Thread M�ta-MCI (MVP)
Hi! This info is interesting for many people. IMO, it's a good idea to write the question in this newsgroup. @-salutations -- Michel Claveau -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 10:44:25 -0800, r wrote: > ~Bearophile, > Thanks for your civil approach to this conversation but I must disagree > with you on the new string formatting syntax. You said the new syntax is > suppost to be easier on the n00b , I say it pollutes a students mind. > What is wrong w

Re: mod_python resources

2008-12-19 Thread tmallen
Here's my problem (it's a conceptual one). Coming from the world of mod_php, each file can represent a page with no intervention. I was not able to achieve the same with mod_python when I tried, and for that matter, couldn't put the pieces together in a usable way. Let me start simply: If I wanted

Big Tits Big Boobs

2008-12-19 Thread blady
http://yeba.pl/show/movies/6044/pucybutka -- http://mail.python.org/mailman/listinfo/python-list

Re: encoding problem

2008-12-19 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 08:20:07 -0700, Joe Strout wrote: > Marc 'BlackJack' Rintsch wrote: > >>> The question is why the Python interpreter use the default encoding >>> instead of "utf-8", which I explicitly declared in the source. >> >> Because the declaration is only for decoding unicode literals

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Ben Finney
Michael Torrie writes: > Personally the new string formatter is sorely needed in Python. And > they way it has been implemented is a thing of beauty. Basically the > burden of formatting strings has been moved from the print > statement/function to the objects themselves. This doesn't describe a

how to convert pymedia.audio.acodec ACString to ctypes.c_char_p

2008-12-19 Thread sanket
Hello All Experts, I am quite new to Ctypes. I am using one c library and writing python bindings for it. I need to pass a character pointer to one function. I am reading one mp3 file and decoding it to raw pcm using pymedia. Now I need to pass this raw data in to a C function. Here is my code.

Re: encoding problem

2008-12-19 Thread Joe Strout
Marc 'BlackJack' Rintsch wrote: And because strings in Python, unlike in (say) REALbasic, do not know their encoding -- they're just a string of bytes. If they were a string of bytes PLUS an encoding, then every string would know what it is, and things like conversion to another encoding, or co

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Mark Summerfield
On 19 Dec, 19:52, excord80 wrote: > On Dec 4, 2:42 pm, Alan G Isaac wrote: > > > Mark Summerfield wrote: > > > "Programming in Python 3: > > > A Complete Introduction to the Python Language" > > > ISBN 0137129297 > > >http://www.qtrac.eu/py3book.html > > > OMG, you really wrote it in Lout? > > I

Re: IMAP: How to implement GMail-like threaded conversations view

2008-12-19 Thread Grant Edwards
On 2008-12-19, Jean-Paul Calderone wrote: > On Fri, 19 Dec 2008 08:47:18 -0800 (PST), Martin wrote: >>Currently I am trying to get used to Python's imaplib and email >>modules. >>I'like to create a webmail client simmilar to GMail. > > I'd suggest using Twisted's IMAP4 client. It's somewhat easi

IDLE doesn't show stderr output from extension modules

2008-12-19 Thread Brian Cole
I'm importing an extension module created with SWIG. When working with the module interactively in IDLE there should be warning and error messages printed to stderr by the extension module. However, these are not being caught by the IDLE window, they are going directly to the terminal that was used

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steve Holden
r wrote: [...] > Like Python’s forcing of empty tuple in function calls, that is a good > idea. This allows you to clearly see arguments in source code. I like > in Python there is only one, or a very minimal number of ways to do > something(but usually only one is the best). Ruby is littered with

Re: Generator slower than iterator?

2008-12-19 Thread Arnaud Delobelle
MRAB writes: > Federico Moreira wrote: >> Great, 2min 34 secs with the open method =) >> >> but why? >> >> ip, sep, rest = line.partition(' ') >>match_counter[ip] += 1 >> >> instead of >> >> match_counter[line.strip()[0]] += 1 >> >> strip really takes more time than partition? >> >> I'm h

Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-19 Thread Øyvind
Based on examples and formulas from http://en.wikipedia.org/wiki/Jaro-Winkler. Useful for measuring similarity between two strings. For example if you want to detect that the user did a typo. def jarow(s1,s2): """ Returns a number between 1 and 0, where 1 is the most similar examp

Re: encoding problem

2008-12-19 Thread Marc 'BlackJack' Rintsch
On Fri, 19 Dec 2008 15:20:08 -0700, Joe Strout wrote: > Marc 'BlackJack' Rintsch wrote: > >>> And because strings in Python, unlike in (say) REALbasic, do not know >>> their encoding -- they're just a string of bytes. If they were a >>> string of bytes PLUS an encoding, then every string would k

Re: Very Slow PythonWin 2.6.1 Startup on Windows XP SP3

2008-12-19 Thread David Lees
Allan wrote: David Lees writes: PythonWin used to startup in a second or two on my Windows XP desktop. now it takes around 20 seconds. I tried turning off Google Desktop indexing and Norton AV, but it still takes a long time to start. Other random apps such as Firefox 3.0 (which I just updat

Re: IDLE doesn't show stderr output from extension modules

2008-12-19 Thread Robert Kern
Brian Cole wrote: I'm importing an extension module created with SWIG. When working with the module interactively in IDLE there should be warning and error messages printed to stderr by the extension module. However, these are not being caught by the IDLE window, they are going directly to the te

Re: encoding problem

2008-12-19 Thread John Machin
On Dec 20, 10:02 am, Marc 'BlackJack' Rintsch wrote: > On Fri, 19 Dec 2008 15:20:08 -0700, Joe Strout wrote: > > Marc 'BlackJack' Rintsch wrote: > > >>> And because strings in Python, unlike in (say) REALbasic, do not know > >>> their encoding -- they're just a string of bytes.  If they were a > >

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Scott David Daniels
excord80 wrote: On Dec 19, 11:01 am, walterbyrd wrote: To me, it seems that this: print "%s=%d" % ('this',99) Is much easier, ... This (if it's right) is much longer, ... print( "{0}={1}".format('this',99)) Yeah, I like the old way better too. It's got this nice elegant simplicity to it (usi

Re: setup.py installs modules to a wrong place

2008-12-19 Thread otrajman
Michal, I'm seeing this on fc8 with a custom built python2.6. Not happening with any other packages (e.g. boto). Workaround of course was just to copy the S3 dir to /usr/local/lib/python2.6/site-packages. I poked around a bit but nothing obvious jumped out. Happy to do any debugging if you hav

Re: IDLE doesn't show stderr output from extension modules

2008-12-19 Thread Scott David Daniels
Brian Cole wrote: I'm importing an extension module created with SWIG. When working with the module interactively in IDLE there should be warning and error messages printed to stderr by the extension module. However, these are not being caught by the IDLE window, they are going directly to the te

Re: mod_python resources

2008-12-19 Thread Daniel Fetchinson
> Here's my problem (it's a conceptual one). Coming from the world of > mod_php, each file can represent a page with no intervention. I was > not able to achieve the same with mod_python when I tried, and for > that matter, couldn't put the pieces together in a usable way. > > Let me start simply:

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Colin J. Williams
Thomas Heller wrote: Mark Summerfield schrieb: Just a follow-up to say that the book has now been published in the U.S. It is now in stock at InformIT, and should reach other stores, e.g., Amazon, in a week or so. Also, the introduction, the first few pages of the first chapter, the whole of ch

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Colin J. Williams
Stefan Behnel wrote: Thomas Heller wrote: Mark Summerfield schrieb: Just a follow-up to say that the book has now been published in the U.S. It is now in stock at InformIT, and should reach other stores, e.g., Amazon, in a week or so. Also, the introduction, the first few pages of the first ch

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Colin J. Williams
Steve Holden wrote: Thomas Heller wrote: Mark Summerfield schrieb: Just a follow-up to say that the book has now been published in the U.S. It is now in stock at InformIT, and should reach other stores, e.g., Amazon, in a week or so. Also, the introduction, the first few pages of the first cha

Re: Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-19 Thread John Machin
On Dec 20, 10:02 am, Øyvind wrote: > Based on examples and formulas fromhttp://en.wikipedia.org/wiki/Jaro-Winkler. For another Python implementation, google "febrl". > Useful for measuring similarity between two strings. For example if > you want to detect that the user did a typo. You mean lik

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Colin J. Williams
Thomas Heller wrote: Steve Holden schrieb: Thomas Heller wrote: Question from a non-native english speaker: is this now valid english? "One of Python’s great strengths" ^ "and also teaches Python’s functional programming features" ^ "The book

interracial wife galleries - Free

2008-12-19 Thread mirandasnailvv
interracial wife galleries . . . ***CLICK HERE http://club247.cn/interracial-wife-galleries * . . . . . . . . . . . . interracial wife galleries -- http://mail.python.org/mailman/listinfo/python-list

dancer exotic photography - Free

2008-12-19 Thread mirandasnailvv
dancer exotic photography . . . ***CLICK HERE http://club247.cn/dancer-exotic-photography * . . . . . . . . . . . . dancer exotic photography -- http://mail.python.org/mailman/listinfo/python-list

mixed wrestling pantyhose - Free

2008-12-19 Thread mirandasnailvv
mixed wrestling pantyhose . . . ***CLICK HERE http://club247.cn/mixed-wrestling-pantyhose * . . . . . . . . . . . . mixed wrestling pantyhose -- http://mail.python.org/mailman/listinfo/python-list

download nero express for free - Free

2008-12-19 Thread mirandasnailvv
download nero express for free . . . ***CLICK HERE http://club247.cn/download-nero-express-for-free * . . . . . . . . . . . . download nero express for free -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Aaron Brady
On Dec 19, 1:43 pm, excord80 wrote: snip cons of Python > But, Python is Python. It's always surprising to me to hear this, but especially so in writing. It speech, it has connotations. A millionaire can say (dismissively), "Two bucks is two bucks." A poor person can say (wondrously), "Two bu

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread r
Scott, Oh, so Python 3.0 is an Equal Opportunity Enigma, now i get it :D Steve, Obviously i was referring to the look, not the actuality of a tuple Marc, Why move away from a concise and widely accepted way of sting formatting, just to supposedly make it a little easier for n00bs? (which i disagr

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 09:55:01 -0800, bearophileHUGS wrote: > C string formatting is short and a flexible enough, but it's out of > place in a language as high level as Python3. The new syntax allows more > flexibility, and it's better for most people that don't know C already, > like newbies, etc.

Re: Jarow-Winkler algorithm: Measuring similarity between strings

2008-12-19 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Øyvind wrote: > Based on examples and formulas from http://en.wikipedia.org/wiki/Jaro-Winkler. > Useful for measuring similarity between two strings. For example if > you want to detect that the user did a typo. Jaro-Winkler is best when dealing with

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 10:25:30 -0700, Michael Torrie wrote: > So funny that now that Python 3.0 is actually released we have people > acting all surprised like they've never seen any of the new features in > Python 3.0 coming. However these features have been discussed for > years! And debated! D

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 10:44:25 -0800, r wrote: > And lets not forget Python forcing of indention, that is Pythons > greatest strength! Oh "r", haven't you heard? Python has braces too. Just start your code with from __future__ import braces and see what happens. -- Steven -- http://mail.pyt

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Steve Holden
Colin J. Williams wrote: > Steve Holden wrote: >> Thomas Heller wrote: [...] >>> Question from a non-native english speaker: is this now valid english? >>> >>> "One of Python’s great strengths" >>> ^ >>> "and also teaches Python’s functional programming features" >>>

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 18:53:22 +0100, Thomas Heller wrote: > Steve Holden schrieb: >> Thomas Heller wrote: >>> Question from a non-native english speaker: is this now valid english? >>> >>> "One of Python’s great strengths" >>> ^ >>> "and also teaches Python’s functional program

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 19:32:22 -0500, Colin J. Williams wrote: (Fixing broken unicode.) >> Question from a non-native english speaker: is this now valid english? >> >> "One of Python's great strengths" >> ^ >> "and also teaches Python's functional programming features" >>

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 19:10:59 +0100, Christian Heimes wrote about % formatting in Python 3: > It's not going to be removed for many years - if ever. The % string > formatting system is not deprecated in 3.0. For that very reason it must > stay until 3.2. We don't have plans to deprecate it in 3.1

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Carl Banks
On Dec 19, 7:12 pm, r wrote: > Marc, > Why move away from a concise and widely accepted way of sting > formatting, just to supposedly make it a little easier for n00bs? You were the one that brought it up, chief. I doubt anyone is arguing that this new formating was added just to make things eas

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread MRAB
Steven D'Aprano wrote: On Fri, 19 Dec 2008 18:53:22 +0100, Thomas Heller wrote: Steve Holden schrieb: Thomas Heller wrote: Question from a non-native english speaker: is this now valid english? "One of Python’s great strengths" ^ "and also teaches Python’s functional prog

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Carl Banks
On Dec 19, 12:10 pm, Christian Heimes wrote: > walterbyrd schrieb: > > > On Dec 19, 9:13 am, "Giampaolo Rodola'" wrote: > >> You can use the old 2.x syntax also in Python 3.x: > > > Yeah, but it's deprecated, and - as I understand it - may be removed > > completely in future versions. Also, in th

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 16:05:42 -0800, Scott David Daniels wrote: > Ah, but for internationalization, you can change the format string to > take args in a different order if, for example, French messages want > modifiers on one side and English on the other. The code can stay the > same, while only t

Namespaces, multiple assignments, and exec()

2008-12-19 Thread John O'Hagan
I have a lot of repetitive assignments to make, within a generator, that use a function outside the generator: var1 = func("var1", args) var2 = func("var2", args) var3 = func("var3", args) etc... In each case the args are identical, but the first argument is a string of the name being assigned.

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 19:35:20 -0500, Colin J. Williams wrote: > Steve Holden wrote: >> Thomas Heller wrote: (Fixing broken unicode again) >>> "One of Python's great strengths" >>> ^ >>> "and also teaches Python's functional programming features" >>> ^

Re: Namespaces, multiple assignments, and exec()

2008-12-19 Thread Terry Reedy
John O'Hagan wrote: I have a lot of repetitive assignments to make, within a generator, that use a function outside the generator: var1 = func("var1", args) var2 = func("var2", args) var3 = func("var3", args) etc... In each case the args are identical, but the first argument is a string of the

Re: ANN: New Book: Programming in Python 3

2008-12-19 Thread rdmurray
Quoth Steven D'Aprano : >The second exception is if the word ends with an S. In British English, >you put the apostrophe after the S: > >Thomas' approach is wholly practical. > >In American English, they often (but not always) add an extra S: > >Thomas's approach is wholly practical. > >which in my

Re: Namespaces, multiple assignments, and exec()

2008-12-19 Thread MRAB
Terry Reedy wrote: John O'Hagan wrote: I have a lot of repetitive assignments to make, within a generator, that use a function outside the generator: var1 = func("var1", args) var2 = func("var2", args) var3 = func("var3", args) etc... In each case the args are identical, but the first argumen

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Fri, 19 Dec 2008 17:12:00 -0800, r wrote: > Why move away from a concise and widely accepted way of sting > formatting, just to supposedly make it a little easier for n00bs? (which > i disagree this is easier) In turn, creating more syntactical clutter. > (%s %f %d) is all you need to remember.

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread r
Thanks Steven, We need a real Pepsi challenge here to show the insignificance of this change. I am not against change. But when we lose something as - compact- as %formating i'm going to want to see a damn good reason for it! Especially when this breaks code, and the "French Connection" is not good

Re: Namespaces, multiple assignments, and exec()

2008-12-19 Thread Steven D'Aprano
On Sat, 20 Dec 2008 02:53:16 +, MRAB wrote: > If you're sure you want to use the current namespace then: > > for name in namelist: > vars()[name] = func(name, args) Doesn't work inside a function: >>> def parrot(): ... for name in ['A', 'B', 'C']: ... vars()[na

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steven D'Aprano
On Sat, 20 Dec 2008 01:54:35 +, Steven D'Aprano wrote: > There clearly is a need for a more heavyweight formatting solution than > % and string.Template. There are things that can't be done easily with % > alone, and format() will make them much simpler. I have no objection to > the addition o

Re: mod_python resources

2008-12-19 Thread Anjanesh Lekshminarayanan
Same requirement here. But isnt there any mod_python for Python 3.0 ? Or do we need to build it from source ourselves ? I was hoping there would be mod_wsgi binaries for Python 3.0. -- http://mail.python.org/mailman/listinfo/python-list

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steve Holden
Steven D'Aprano wrote: > On Fri, 19 Dec 2008 10:25:30 -0700, Michael Torrie wrote: > >> So funny that now that Python 3.0 is actually released we have people >> acting all surprised like they've never seen any of the new features in >> Python 3.0 coming. However these features have been discussed

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread Steve Holden
r wrote: > Thanks Steven, > We need a real Pepsi challenge here to show the insignificance of this > change. I am not against change. But when we lose something as - > compact- as %formating i'm going to want to see a damn good reason for > it! Especially when this breaks code, and the "French Conn

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread rdmurray
Quoth Steven D'Aprano : > Whether using % or format(), I don't see the need to change the code, > only the strings. > > Using positional arguments is not really that different: > > "{0} {1}".format("dead", "parrot") > "{0} {1}".format("perroquet", "mort") This should be something like: _("{0}

Re: encoding problem

2008-12-19 Thread Joe Strout
Marc 'BlackJack' Rintsch wrote: I don't see the shortcoming in Python <3.0. If you want real strings with characters instead of just a bunch of bytes simply use `unicode` objects instead of `str`. Fair enough -- that certainly is the best policy. But working with any other encoding (sometimes

Re: New Python 3.0 string formatting - really necessary?

2008-12-19 Thread r
On Dec 19, 10:04 pm, Steve Holden wrote: > r wrote: > > Thanks Steven, > > We need a real Pepsi challenge here to show the insignificance of this > > change. I am not against change. But when we lose something as - > > compact- as %formating i'm going to want to see a damn good reason for > > it!

Today' TopicManagerial Values and ethos

2008-12-19 Thread matdata.d...@gmail.com
Delhi Institute of Management & Services Dear friends, We are extremely happy to welcome you to the world of Management... We are in the process of preparing some 5 minutes revision Q & A type lessons for management students. They are in no way, a replacement for the classroom lectures, textbooks

<    1   2