[Ann] Celery 2.0 released

2010-07-02 Thread Ask Solem
Celery 2.0 has been released We're happy to announce the release of Celery 2.0. Big thanks to all contributors, testers and users! What is it? === Celery is an asynchronous task queue/job queue based on distributed message

Re: automate minesweeper with python

2010-07-02 Thread Ian Kelly
On Thu, Jul 1, 2010 at 7:17 PM, Terry Reedy tjre...@udel.edu wrote: Did you actually try it? Though skeptical, I did, briefly, until I decided that it probably should have been dated April 1. There is no way to enter text into minesweeper, nor to make it full screen, nor, as far as I know, for

Re: Python as a scripting language. Alternative to bash script?

2010-07-02 Thread Dave Pawson
I'm the OP btw. On 1 July 2010 18:10, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: I think that Python could be a alternative to bash and have some advantages, but it's a long way off from being fully implemented.        While a somewhat klutzier language in aspects (the , is both an

drag drop in a python GUI application

2010-07-02 Thread Alan
Hello there, I know drag drop is not possible with TK. Which widget could I use for my python application to be able to work with drag drop? Thanks, Alan -- Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate Department of Biochemistry, University of Cambridge. 80 Tennis Court Road,

Re: automate minesweeper with python

2010-07-02 Thread Mark Young
Just tested it in XP, it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread geremy condra
On Thu, Jul 1, 2010 at 11:48 AM, pyt...@bdurham.com wrote: Curious if any of you are using GPG or PGP encryption and/or signatures in your Python apps? Yes; disclaimer: I'm the author of evpy and am currently working on a openssl wrapper proposed for inclusion in the stdlib. In particular

Re: Bento 0.0.3 (ex-toydist), a pythonic packaging solution

2010-07-02 Thread Tim Golden
On 02/07/2010 03:38, David wrote: I am pleased to announce the release 0.0.3 for Bento, the pythonic packaging solution. Bento aims at being an alternative to distutils/setuptools/distribute, based on a static metadata file format. Existing packages can be converted from setup.py to bento

GAE + recursion limit

2010-07-02 Thread Maciej
Hi, I'm writing a small translator using pyparsing library v1.5.2 (http://pyparsing.wikispaces.com/) and I'm using it both from command line and on Google App Engine. Recently I checked one of my samples which runs perfect from CLI against GAE and it throws me RuntimeError 'maximum recursion depth

Re: Packaging question

2010-07-02 Thread Peter Otten
snorble wrote: My question is, why do the modules bar and foo show up in mypack's dir()? I intend for Foo (the class foo.Foo) and Bar (the class bar.Bar) to be there, but was not sure about the modules foo and bar. $ ls mypack/*.py bar.py foo.py __init__.py $ cat mypack/__init__.py

Re: Python dynamic attribute creation

2010-07-02 Thread Gregory Ewing
WANG Cong wrote: If you think setattr() is as ordinary as a trivial assignment, I will argue with you, this is personal taste. To my way of thinking, getattr() and setattr() are the fundamental way of accessing attributes in Python. The dot notation is just syntactic sugar for the

Pool Module: iterator does not yield consistently with different chunksizes

2010-07-02 Thread syockit
I've been playing around with custom iterators to map into Pool. When I run the code below: def arif(arr): return arr def permutate(n): k = 0 a = list(range(6)) while kn: for i in range(6): a.insert(0, a.pop(5)+6) #yield a[:] -- produces correct

Re: Python dynamic attribute creation

2010-07-02 Thread Gregory Ewing
WANG Cong wrote: Yeah, my point is why setattr() for dynamic attributes while assignments for static attributes? I think there may be a misunderstanding here. You seem to be thinking of dynamic attribute vs. static attribute as the distinction between creating a new attribute and modifying an

Re: Python dynamic attribute creation

2010-07-02 Thread Gregory Ewing
WANG Cong wrote: When I talked about OOP, it is general OOP, not related with any concrete programming languages. There isn't really any such thing, though. There is no universally agreed set of features that a language must have in order to be considered OOP. Arguments of the form Language

Re: Bento 0.0.3 (ex-toydist), a pythonic packaging solution

2010-07-02 Thread David Cournapeau
On Fri, Jul 2, 2010 at 4:46 PM, Tim Golden m...@timgolden.me.uk wrote: Looks very interesting. Just one thing (which might just be me): the front page looks very stylish and is quite a nice summary. But I actually *missed* the (grey on grey) [Take me to Bento documentation] button, which is

Re: GAE + recursion limit

2010-07-02 Thread David Cournapeau
On Fri, Jul 2, 2010 at 5:06 PM, Maciej one50123164e...@getonemail.com wrote: Does anyone have any clue what that might be? Why the problem is on GAE (even when run locally), when command line run works just fine (even with recursion limit decreased)? Thanks in advance for any help. Most

Re: Why defaultdict?

2010-07-02 Thread Thomas Jollans
On 07/02/2010 06:11 AM, Steven D'Aprano wrote: I would like to better understand some of the design choices made in collections.defaultdict. Firstly, to initialise a defaultdict, you do this: from collections import defaultdict d = defaultdict(callable, *args) which sets an attribute

Re: Why defaultdict?

2010-07-02 Thread Chris Rebert
On Fri, Jul 2, 2010 at 2:20 AM, Thomas Jollans tho...@jollans.com wrote: On 07/02/2010 06:11 AM, Steven D'Aprano wrote: I would like to better understand some of the design choices made in collections.defaultdict. snip Second, why is the factory function not called with key? There are three

Re: Why defaultdict?

2010-07-02 Thread Thomas Jollans
On 07/02/2010 11:26 AM, Chris Rebert wrote: On Fri, Jul 2, 2010 at 2:20 AM, Thomas Jollans tho...@jollans.com wrote: On 07/02/2010 06:11 AM, Steven D'Aprano wrote: I would like to better understand some of the design choices made in collections.defaultdict. snip Second, why is the factory

Re: Python dynamic attribute creation

2010-07-02 Thread Gregory Ewing
WANG Cong wrote: However, I think setattr() is a builtin function, using it exposes the *magic* of metaprogramming (or class-programming, if more correct) at a first glance. But, in Python, creating instance variables is *not* class-programming. It doesn't touch the class at all. In many OO

Re: Python dynamic attribute creation

2010-07-02 Thread Bruno Desthuilliers
WANG Cong a écrit : On 07/01/10 23:19, Stephen Hansen me+list/pyt...@ixokai.io wrote: As long as setattr() exists in Python, that will be not so ordinary. :) setattr is perfectly ordinary. If you think setattr() is as ordinary as a trivial assignment, setattr IS a trivial assignment.

Re: Python dynamic attribute creation

2010-07-02 Thread Bruno Desthuilliers
WANG Cong a écrit : On 06/30/10 01:25, Ethan Furman et...@stoneleaf.us wrote: But if so why setattr() still exists? What is it for if we can do the same thing via assignments? Also, in order to be perfect, Python should accept to add dynamic attributes dynamically, something like PEP 363. That

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread Stef Mientki
On 02-07-2010 09:39, geremy condra wrote: On Thu, Jul 1, 2010 at 11:48 AM, pyt...@bdurham.com wrote: Curious if any of you are using GPG or PGP encryption and/or signatures in your Python apps? Yes; disclaimer: I'm the author of evpy and am currently working on a openssl wrapper proposed

Re: Python as a scripting language. Alternative to bash script?

2010-07-02 Thread Jerry Rocteur
* Dave Pawson dave.paw...@gmail.com [2010-07-02 08:22]: I'm the OP btw. On 1 July 2010 18:10, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: I think that Python could be a alternative to bash and have some advantages, but it's a long way off from being fully implemented. Take a look

Re: Pool Module: iterator does not yield consistently with different chunksizes

2010-07-02 Thread Peter Otten
syockit wrote: I've been playing around with custom iterators to map into Pool. When I run the code below: def arif(arr): return arr def permutate(n): k = 0 a = list(range(6)) while kn: for i in range(6): a.insert(0, a.pop(5)+6) #yield

Re: Pool Module: iterator does not yield consistently with different chunksizes

2010-07-02 Thread Dave Angel
syockit wrote: I've been playing around with custom iterators to map into Pool. When I run the code below: def arif(arr): return arr def permutate(n): k = 0 a = list(range(6)) while kn: for i in range(6): a.insert(0, a.pop(5)+6) #yield a[:] --

Re: escape character / csv module

2010-07-02 Thread John Machin
On Jul 2, 6:04 am, MRAB pyt...@mrabarnett.plus.com wrote: The csv module imports from _csv, which suggests to me that there's code written in C which thinks that the \x00 is a NUL terminator, so it's a bug, although it's very unusual to want to write characters like \x00 to a CSV file, and I

Re: Ignorance and Google Groups (again)

2010-07-02 Thread Dotan Cohen
On 2 July 2010 05:10, D'Arcy J.M. Cain da...@druid.net wrote: On Thu, 1 Jul 2010 21:34:15 +0300 Dotan Cohen dotanco...@gmail.com wrote: I'm one of them. Gmail is great for mailing lists, though I would never use it as a personal email client. But I'm more of a lurker than a poster on this

Re: Python v3.1.2 documentation question

2010-07-02 Thread Ethan Furman
Terry Reedy wrote: On 7/1/2010 6:42 PM, Ethan Furman wrote: Hmmm Well, as this is my first ever bug post (yay! ;) Great! I *think* this is what you want: http://bugs.python.org/issue9121 I believe Benjamin meant that it was already fixed in http://docs.python.org/dev/py3k/

Re: automate minesweeper with python

2010-07-02 Thread Ethan Furman
Terry Reedy wrote: On 7/1/2010 6:42 PM, Emile van Sebille wrote: On 7/1/2010 2:52 PM Jay said... pywinauto looks to be almost perfect. All I need now is to read the numbers uncovered when a minesweeper square is clicked on, or that I just hit a mine. ... or, you could always win...

Re: automate minesweeper with python

2010-07-02 Thread superpollo
Ethan Furman ha scritto: Terry Reedy wrote: On 7/1/2010 6:42 PM, Emile van Sebille wrote: On 7/1/2010 2:52 PM Jay said... pywinauto looks to be almost perfect. All I need now is to read the numbers uncovered when a minesweeper square is clicked on, or that I just hit a mine. ... or, you

delegation pattern via descriptor

2010-07-02 Thread kedra marbun
hello, friendliest prog lang community on earth ;) i'm feeling that (0) delegation pattern thru descriptor encourages dedicated delegate for each task, if feeling: print(benefits) (1) the delegate is designed to be blind about the class on which the delegate is attached to isn't that the two

Re: drag drop in a python GUI application

2010-07-02 Thread Michael Torrie
On 07/01/2010 08:57 AM, Alan wrote: I know drag drop is not possible with TK. Is this a Python Tk limitation or a Tk limitation in general? Google suggests that Tk itself supports some form of dnd. Which widget could I use for my python application to be able to work with drag drop? PyQt

Python 2.4.2 Installation error

2010-07-02 Thread Dhilip S
Hello Everyone.. I'm using Ubuntu 10.04, i try to install Python 2.4.2 Python 2.4.3 got error message while doing make command. anybody can tell tell, How to overcome this error Finally i got message like this ... 4036e000-403ad000 r--p 08:08 156978 /usr/lib/locale/en_IN/LC_CTYPE

Re: delegation pattern via descriptor

2010-07-02 Thread Steven D'Aprano
On Fri, 02 Jul 2010 06:28:59 -0700, kedra marbun wrote: hello, friendliest prog lang community on earth ;) i'm feeling that (0) delegation pattern thru descriptor encourages dedicated delegate for each task, if feeling: print(benefits) (1) the delegate is designed to be blind about the

Re: Python 2.4.2 Installation error

2010-07-02 Thread Thomas Jollans
On 07/02/2010 05:38 PM, Dhilip S wrote: Hello Everyone.. I'm using Ubuntu 10.04, i try to install Python 2.4.2 Python 2.4.3 got error message while doing make command. anybody can tell tell, How to overcome this error Finally i got message like this ... 4036e000-403ad000 r--p

Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread geremy condra
On Fri, Jul 2, 2010 at 6:15 AM, Stef Mientki stef.mien...@gmail.com wrote:  On 02-07-2010 09:39, geremy condra wrote: On Thu, Jul 1, 2010 at 11:48 AM,  pyt...@bdurham.com wrote: Curious if any of you are using GPG or PGP encryption and/or signatures in your Python apps? Yes; disclaimer: I'm

Decorators, with optional arguments

2010-07-02 Thread Stephen Hansen
Okay, so! I actually never quite got around to learning to do deep and useful magic with decorators. I've only ever done the most basic things with them. Its all been a little fuzzy in my head: things like what order decorators end up being called in if there's more then one, etc. But in my

Numerics question

2010-07-02 Thread kj
I define ninv = 1.0/n ...where n is some integer, and I want to write some function f such that f(m * ninv) returns the smallest integer that is = m * ninv, where m is some other integer. And, in particular, if m is p*n for some integer p, then f((p*n) * ninv) should return the integer p.

Importing package with zip-archives

2010-07-02 Thread magnus.ly...@gmail.com
I'd like to have the following structure of my Python code: I have a directory called 'mysystem'. In this directory, I have files 'comp1.zip' and 'comp2.zip' etc which are zipped archives with python packages and modules. I'd like to be able to use them like this in my code: import

Re: Numerics question

2010-07-02 Thread kj
Please disregard my ineptly posed question. ~K In i0l9f3$7d...@reader1.panix.com kj no.em...@please.post writes: I define ninv = 1.0/n ...where n is some integer, and I want to write some function f such that f(m * ninv) returns the smallest integer that is = m * ninv, where m is some

CFP for Surge Scalability Conference 2010

2010-07-02 Thread Jason Dixon
A quick reminder that there's one week left to submit your abstract for this year's Surge Scalability Conference. The event is taking place on Sept 30 and Oct 1, 2010 in Baltimore, MD. Surge focuses on case studies that address production failures and the re-engineering efforts that led to

[ANN] Emacs For Python 0.1, collection of emacs extensions for python development

2010-07-02 Thread Gabriele Lanaro
Emacs For Python 0.1 Emacs for python (epy) is a collection of emacs extensions for python development, yet ready and configured for you. It includes also tweaks to commonly used extension to provide extra functionality and fast bug correction. There are also sane configuration that helps you

Re: Decorators, with optional arguments

2010-07-02 Thread Thomas Jollans
On 07/02/2010 07:41 PM, Stephen Hansen wrote: Okay, so! I actually never quite got around to learning to do deep and useful magic with decorators. I've only ever done the most basic things with them. Its all been a little fuzzy in my head: things like what order decorators end up being

Re: Decorators, with optional arguments

2010-07-02 Thread Nathan Rice
I like to think of decorators with arguments as decorator factory functions. I try and unroll them as much as possible... I have some decorators that work like so (and please note that the wraps and returns_as_output are separate so that I can mutate the behavior as needed, if you just wanted a

Re: Decorators, with optional arguments

2010-07-02 Thread Alf P. Steinbach /Usenet
* Stephen Hansen, on 02.07.2010 19:41: Okay, so! I actually never quite got around to learning to do deep and useful magic with decorators. I've only ever done the most basic things with them. Its all been a little fuzzy in my head: things like what order decorators end up being called in if

The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread John Nagle
David Cournapeau courn...@gmail.com wrote: I think one point which needs to be emphasized more is what does python 3 bring to people. The what's new in python 3 page gives the impression that python 3 is about removing cruft. That's a very poor argument to push people to switch. That's the

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread Thomas Jollans
On 07/02/2010 09:07 PM, John Nagle wrote: What I'm not seeing is a deployment plan along these lines: 1.Identify key modules which must be converted before Python 3 can be used in production environments. That depends VERY strongly on the environment in question. 2.

Re: Decorators, with optional arguments

2010-07-02 Thread Carl Banks
On Jul 2, 10:41 am, Stephen Hansen me+list/pyt...@ixokai.io wrote: Okay, so! I actually never quite got around to learning to do deep and useful magic with decorators. I've only ever done the most basic things with them. Its all been a little fuzzy in my head: things like what order

Re: Lockless algorithms in python (Nothing to do with GIL)

2010-07-02 Thread Antoine Pitrou
On Mon, 28 Jun 2010 16:46:41 -0700 Zac Burns zac...@gmail.com wrote: In my experience it is far more expensive to allocate a lock in python then it is the types that use them. Here are some examples: timeit.timeit('Lock()', 'from threading import Lock') 1.4449114807669048

Re: GAE + recursion limit

2010-07-02 Thread Paul McGuire
Does anyone have any clue what that might be? Why the problem is on GAE (even when run locally), when command line run works just fine (even with recursion limit decreased)? Can't explain why you see different behavior on GAE vs. local, but it is unusual for a small translator to flirt with

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread Carl Banks
On Jul 2, 12:07 pm, John Nagle na...@animats.com wrote:     This has all been said before. Yes, we know. And when no one did anything about it the first dozen times it's been said, it wasn't because we didn't hear it, it was because we didn't care. We still don't care now, and won't care no

Re: automate minesweeper with python

2010-07-02 Thread Terry Reedy
On 7/1/2010 10:18 PM, Emile van Sebille wrote: On 7/1/2010 6:17 PM Terry Reedy said... On 7/1/2010 6:42 PM, Emile van Sebille wrote: On 7/1/2010 2:52 PM Jay said... pywinauto looks to be almost perfect. All I need now is to read the numbers uncovered when a minesweeper square is clicked on,

Re: automate minesweeper with python

2010-07-02 Thread Carl Banks
On Jul 2, 6:17 am, superpollo ute...@esempio.net wrote: Ethan Furman ha scritto: Terry Reedy wrote: On 7/1/2010 6:42 PM, Emile van Sebille wrote: On 7/1/2010 2:52 PM Jay said... pywinauto looks to be almost perfect. All I need now is to read the numbers uncovered when a minesweeper

Re: automate minesweeper with python

2010-07-02 Thread Jay
On Jul 2, 2:13 pm, Terry Reedy tjre...@udel.edu wrote: On 7/1/2010 10:18 PM, Emile van Sebille wrote: On 7/1/2010 6:17 PM Terry Reedy said... On 7/1/2010 6:42 PM, Emile van Sebille wrote: On 7/1/2010 2:52 PM Jay said... pywinauto looks to be almost perfect. All I need now is to read

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread Aahz
In article 4c2e38f5.10...@animats.com, John Nagle na...@animats.com wrote: 5. Get at least two major hosting services to put up Python 3. webfaction.com has python3.1 -- Aahz (a...@pythoncraft.com) * http://www.pythoncraft.com/ If you don't know what your program is

Re: Namespace problem?

2010-07-02 Thread Josh English
On Jul 1, 3:30 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: If this is a version of your code that actually fails when you run it   (rather than being another artistic interpretation of a photograph of your   code :-), then I'd go with Matt's analysis.  This will give you a  

IMAP Problems

2010-07-02 Thread Paul
Hi, I'm trying to write a simple script which displays the basic details of a person's mailbox. My problem is that it causes all the messages to be marked as read on the server, which is not what I'm after, and I also can't get the imap.sort command to work properly (currently commented out as I

Re: automate minesweeper with python

2010-07-02 Thread Emile van Sebille
On 7/2/2010 2:38 PM Jay said... OK, so how does a program read the pixel? Well, you start with a screen capture utility. I'd check is pywinauto provides that access... Emile -- http://mail.python.org/mailman/listinfo/python-list

why python don't support extended slice direct assignment for lists?

2010-07-02 Thread Robert William Hanks
why pure python don't support extended slice direct assignment for lists? today we have to write like this, aList=[0,1,2,3,4,5,6,7,8,9] aList [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] aList[::2]= [None]*len(aList[::2]) #or do the math by hand, what's not always possible aList [None, 1, None, 3, None,

Re: The real problem with Python 3 - no business case for conversion

2010-07-02 Thread Ben Finney
John Nagle na...@animats.com writes: Where's the business case for moving to Python 3? It's not faster. It's faster to learn, because there's less to learn. How do you know that it's not faster? That's a matter of the speed of individual Python implementations. What data do you have? It

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread John Nagle
On 7/2/2010 3:00 PM, Aahz wrote: In article4c2e38f5.10...@animats.com, John Naglena...@animats.com wrote: 5. Get at least two major hosting services to put up Python 3. webfaction.com has python3.1 WebFaction's big thing is that they have a really good system for installing

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread Steven D'Aprano
On Fri, 02 Jul 2010 12:07:33 -0700, John Nagle wrote: Where's the business case for moving to Python 3? It's not faster. It doesn't do anything you can't do in Python 2.6. There's no killer app for it. End of life for Python 2.x is many years away; most server Linux distros aren't even

Re: Why defaultdict?

2010-07-02 Thread Steven D'Aprano
On Fri, 02 Jul 2010 04:11:49 +, Steven D'Aprano wrote: I would like to better understand some of the design choices made in collections.defaultdict. [...] Thanks to all who replied. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: why python don't support extended slice direct assignment for lists?

2010-07-02 Thread Shashwat Anand
On Sat, Jul 3, 2010 at 4:54 AM, Robert William Hanks astroultra...@gmail.com wrote: why pure python don't support extended slice direct assignment for lists? today we have to write like this, aList=[0,1,2,3,4,5,6,7,8,9] aList [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] aList[::2]=

Sorting dicts inside dicts

2010-07-02 Thread abhijeet thatte
Hi, I have a huge dict structure like below: * {'module':{'reg_dict_0':{'name':'abc','reg_addr':'2004'},'reg_dict_1':{'name':'xyz','reg_addr':'2002'},'reg_dict_2':{'name':'pqr','reg_addr':'2008'}} * Module dict and reg_dicts contain many elements than shown. I want to sort this 'module'

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread Shashwat Anand
On Sat, Jul 3, 2010 at 5:27 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Fri, 02 Jul 2010 12:07:33 -0700, John Nagle wrote: Where's the business case for moving to Python 3? It's not faster. It doesn't do anything you can't do in Python 2.6. There's no killer app

Crash in PyThread_acquire_lock

2010-07-02 Thread moerchendiser2k3
Hi all, I have a serious problem I want to solve. My app, where Python is embedded crashs on OSX (10.6 SL). I can reproduce the crash sometimes with a script that makes use of Python threads ( module: threading). 'thelock-locked' is for sure still locked, but I can't identify the problem. Its

Re: why python don't support extended slice direct assignment for lists?

2010-07-02 Thread MRAB
Robert William Hanks wrote: why pure python don't support extended slice direct assignment for lists? today we have to write like this, aList=[0,1,2,3,4,5,6,7,8,9] aList [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] aList[::2]= [None]*len(aList[::2]) #or do the math by hand, what's not always

Re: Sorting dicts inside dicts

2010-07-02 Thread MRAB
abhijeet thatte wrote: Hi, I have a huge dict structure like below: /*{'module':{'reg_dict_0':{'name':'abc','reg_addr':'2004'},'reg_dict_1':{'name':'xyz','reg_addr':'2002'},'reg_dict_2':{'name':'pqr','reg_addr':'2008'}}*/ Module dict and reg_dicts contain many elements than shown. I want to

Re: tp_richcompare vs tp_compare

2010-07-02 Thread Aahz
In article d52edb82-4de5-496d-8807-b5d15ee66...@i31g2000yqm.googlegroups.com, moerchendiser2k3 googler.1.webmas...@spamgourmet.com wrote: Do I need to implement both? Looks very redundant, isnt it? Or is it just an extension and tp_richcompare is the better choice here? Can anyone please make

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread Aahz
In article 4c2e79d3$0$1663$742ec...@news.sonic.net, John Nagle na...@animats.com wrote: On 7/2/2010 3:00 PM, Aahz wrote: In article4c2e38f5.10...@animats.com, John Naglena...@animats.com wrote: 5. Get at least two major hosting services to put up Python 3. webfaction.com has

Re: Anyone using GPG or PGP encryption/signatures in your Python apps?

2010-07-02 Thread Martin Manns
On Thu, 01 Jul 2010 14:48:47 -0400 pyt...@bdurham.com wrote: Curious if any of you are using GPG or PGP encryption and/or signatures in your Python apps? ... 4. generating signatures for files that you are exchanging/posting for download? I use pyme to create and check save file signatures.

Re: why python don't support extended slice direct assignment for lists?

2010-07-02 Thread Robert William Hanks
to say is wrong i think is a bit too much, its just a different type of usage, this type of sintax is extensively used in numpy arrays (extended slice came from numerical python), just asking why not extend the sintax to python list. (not sure if you can use None as in the code i posted in numpy

Re: [farther OT] Re: Why Is Escaping Data Considered So Magical?

2010-07-02 Thread Lawrence D'Oliveiro
In message mailman.136.1278040489.1673.python-l...@python.org, Rami Chowdhury wrote: On Thursday 01 July 2010 16:50:59 Lawrence D'Oliveiro wrote: Nevertheless, it it at least self-consistent. To return to my original macro: #define Descr(v) v, sizeof v As written, this works

Re: why python don't support extended slice direct assignment for lists?

2010-07-02 Thread Chris Rebert
On Fri, Jul 2, 2010 at 7:19 PM, Robert William Hanks astroultra...@gmail.com wrote: to say is wrong i think is a bit too much, its just a different type of usage, this type of sintax is extensively used in numpy arrays (extended slice came from numerical python), just asking why not extend the

Re: [farther OT] Re: Why Is Escaping Data Considered So Magical?

2010-07-02 Thread Rami Chowdhury
On Friday 02 July 2010 19:20:26 Lawrence D'Oliveiro wrote: In message mailman.136.1278040489.1673.python-l...@python.org, Rami Chowdhury wrote: On Thursday 01 July 2010 16:50:59 Lawrence D'Oliveiro wrote: Nevertheless, it it at least self-consistent. To return to my original macro:

Re: Why Is Escaping Data Considered So Magical?

2010-07-02 Thread David Cournapeau
On Mon, Jun 28, 2010 at 6:44 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Carl Banks wrote: Indeed, strncpy does not copy that final NUL if it's at or beyond the nth element.  Probably the most mind-bogglingly stupid thing about the standard C library, which has lots of mind-boggling

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread Terry Reedy
On 7/2/2010 3:07 PM, John Nagle wrote: That's the real issue, not parentheses on the print statement. Where's the business case for moving to Python 3? It's not faster. It doesn't do anything you can't do in Python 2.6. False. One cannot run code in 2.6 that depends on bugfixes in 3.1. Nor

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread D'Arcy J.M. Cain
On 2 Jul 2010 15:00:17 -0700 a...@pythoncraft.com (Aahz) wrote: 5. Get at least two major hosting services to put up Python 3. webfaction.com has python3.1 So does http://www.Vex.Net/ so there's your two. -- D'Arcy J.M. Cain da...@druid.net | Democracy is three wolves

Re: Decorators, with optional arguments

2010-07-02 Thread Stephen Hansen
On 7/2/10 11:55 AM, Thomas Jollans wrote: Looks good! You may still want to use functools.update_wrapper or functools.wraps on wrap. Are you sure? I've been doing a little bit of experimentation and I only did the 'wraps' on that inner function, because it seemed that it was all that was needed

Re: Decorators, with optional arguments

2010-07-02 Thread Stephen Hansen
On 7/2/10 11:58 AM, Alf P. Steinbach /Usenet wrote: code #Py3 I'm stuck on Python 2.x, as I mentioned (albeit only in a comment). That said this code does not seem to be including any Py3isms that aren't compatible. class Thing(object): @expose() def test1(self, arg1):

Re: The real problem with Python 3 - no business case for conversion (was I strongly dislike Python 3)

2010-07-02 Thread John Nagle
On 7/2/2010 9:10 PM, D'Arcy J.M. Cain wrote: On 2 Jul 2010 15:00:17 -0700 a...@pythoncraft.com (Aahz) wrote: 5. Get at least two major hosting services to put up Python 3. webfaction.com has python3.1 So does http://www.Vex.Net/ so there's your two. Not according to Vex's

[issue2986] difflib.SequenceMatcher not matching long sequences

2010-07-02 Thread Eli Bendersky
Eli Bendersky eli...@gmail.com added the comment: The new junk heuristic has been added to difflib.py in SVN revision 26661 in 2002 (which is, incidentally, the last revision to modify difflib.py). Its commit log says: - Mostly in

[issue9136] RuntimeError when profiling Decimal

2010-07-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: 2.5 compatibility is fine for the 2.x version of decimal.py. For the 3.x version of decimal.py, I don't see what it buys us. -- ___ Python tracker rep...@bugs.python.org

[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping

2010-07-02 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137 ___ ___ Python-bugs-list

[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping

2010-07-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Here's a fix. -- keywords: +patch nosy: +rhettinger Added file: http://bugs.python.org/file17834/issue9137.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137

[issue9136] RuntimeError when profiling Decimal

2010-07-02 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: Removed file: http://bugs.python.org/file17831/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9136 ___

[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping

2010-07-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: And what about this? x.update(self=5) -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137 ___

[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping

2010-07-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Ah. Good point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9137 ___ ___

[issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping

2010-07-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Updated patch, to deal with 'self' correctly too. -- stage: needs patch - patch review Added file: http://bugs.python.org/file17835/issue9137_v2.patch ___ Python tracker rep...@bugs.python.org

[issue9139] Add examples for str.format()

2010-07-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: The examples seem good to me after a quick reading. There’s not too much but still enough. I find the phrasing of the versionchanged not easily understandable: “The position of the arguments can now be omitted.” Clearer and probably too verbose:

[issue9136] RuntimeError when profiling Decimal

2010-07-02 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: In the new patches I reinstated the ternary construct. I think it would be nice to use dict comprehensions in py3k. People read the stdlib for guidance, and it would help if ultimately only the most concise idioms remained in py3k. If

[issue9136] RuntimeError when profiling Decimal

2010-07-02 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file17837/issue9136-trunk-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9136 ___

[issue1152248] Enhance file.readlines by making line separator selectable

2010-07-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Ralph, core developers have not rejected this idea. It needs a patch now (even rough) to get the discussion further. -- components: +Library (Lib) -Interpreter Core ___ Python tracker

[issue9141] Allow objects to decide if they can be collected by GC

2010-07-02 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson krist...@ccpgames.com: The GC module currently relies only on the presence of a __del__ method to decide if an object can be safely collected at all. Also, there is a special case for generator objects. This patch allows any object to call an api

[issue9141] Allow objects to decide if they can be collected by GC

2010-07-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: First, what's the use case? Just backporting an internal Stackless API isn't a reasonable request. Second, this tells that there *is* a finalization function, but not what the function is. How is the GC supposed to find it? Third, the

[issue5468] urlencode does not handle bytes, and could easily handle alternate encodings

2010-07-02 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: I see no problem in going ahead with the suggestion proposed and the patch. - I checked with RFC3986 Section 2.5 http://labs.apache.org/webarch/uri/rfc/rfc3986.html#identifying-data Relevant line: When a new URI scheme defines a component

[issue6507] Enhance dis.dis to autocompile codestrings

2010-07-02 Thread Scott Dial
Scott Dial sc...@scottdial.com added the comment: disassemble_str should be private with an underscore. disassemble_string should've been private as well, while we are editing this module. -- nosy: +scott.dial ___ Python tracker

[issue9142] while executing python

2010-07-02 Thread rajesh
New submission from rajesh rajcha...@gmail.com: while executing the python file: python sercon.py It Displays the below error.kindly provide me the solution. Updated the Configparser log Exception in Tkinter callback Traceback (most recent call last): File

[issue9142] while executing python

2010-07-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Sorry; this tracker is for reporting bugs in Python, not for getting help with your own Python code. There are other places you might be able to get help, for example the python-list mailing list[1], which is also available as a

  1   2   >