Re: myths about python 3

2010-01-29 Thread Benjamin Kaplan
On Fri, Jan 29, 2010 at 5:29 PM, Ben Finney wrote: > Duncan Booth writes: > >> Here's what I see in the Ubuntu packages. Python 3 seems only to be in the >> universe repositories so far. >> >> Dapper: Python 2.4.2 >> Hardy: Python 2.5.2 >> Intrepid: Python 2.5.2, 3.0~b3 (universe) >> Jaunty: Pyth

Re: Keyboard input

2010-01-29 Thread Steven D'Aprano
On Fri, 29 Jan 2010 18:38:47 -0300, Gabriel Genellina wrote: >> I'm using the raw_input method and it works fine, but I noted that I >> can't use backspace and when I accidentally press shift space (because >> I need to input uppercase letters separated by a space) it writes some >> strange charac

Re: Perl 6 [was Re: myths about python 3]

2010-01-29 Thread Carl Banks
On Jan 28, 9:34 pm, Steven D'Aprano wrote: > On Thu, 28 Jan 2010 21:21:05 -0800, Tim Roberts wrote: > > Perl 6, on the other hand, is still fantasyware a decade after its > > announcement.  It is, for the most part, THE canonical example of the > > wrong way to conduct a development effort. > > Ou

Re: For loop searching takes too long!

2010-01-29 Thread Steven D'Aprano
On Fri, 29 Jan 2010 14:49:06 -0800, Jonathan Gardner wrote: > On Jan 28, 3:52 pm, elsa wrote: >> >> I've got a problem with my program, in that the code just takes too >> long to run. Here's what I'm doing. If anyone has any tips, they'd be >> much appreciated! >> >> > First of all, don't play wi

Re: Threading issue with SQLite

2010-01-29 Thread Stephen Hansen
On Fri, Jan 29, 2010 at 8:37 AM, Alan Harris-Reid < aharrisr...@googlemail.com> wrote: > Hi, > > I am creating a web application (using Python 3.1 and CherryPy 3.2) where a > SQLite connection and cursor object are created using the following code > (simplified from the original): > > class MainSi

Re: myths about python 3

2010-01-29 Thread Blog
On 1/28/2010 2:56 AM, John Nagle wrote: Daniel Fetchinson wrote: 1. Python 3 is supported by major Linux distributions. FALSE - most distros are shipping with Python 2.4, or 2.5 at best. Where did you come up with that information? Almost all of the major distros ship with 2.6.x - CentOS, Ope

Re: myths about python 3

2010-01-29 Thread Blog
On 1/28/2010 8:44 AM, Paul Rubin wrote: Steve Holden writes: Kindly confine your debate to the facts and keep the snide remarks to yourself. Like it or not Python 3 is the future, and unladen swallow's recent announcement that they would target only Python 3 represented a ground-breaking advanc

Re: myths about python 3

2010-01-29 Thread Ben Finney
Blog writes: > (Debian does ship with 2.5, but the next major release "sid' is due > out in Q2) Sid is the perpetual development playground (“unstable”), never released as a suite, but a proving ground for packages to determine their fitness for going to the next level of testing. The next-to-b

Code snippet: dualmethod descriptor

2010-01-29 Thread Steven D'Aprano
I came up with this descriptor a few years ago, but never used it for anything. I've just found an actual use for it in my own code, so I thought I'd make it public for anyone else who might have a use for it. Use-case: if you have a class without an __init__ or __new__ method, then this may be

Re: C API: module cleanup function

2010-01-29 Thread Stefan Behnel
Mr.M, 29.01.2010 23:50: > I can't figure out if there is a way to run a specialized cleanup > function when a module needs to be "unloaded" (i.e. just before a > reload() or when i quit the interpreter). > > I'm thinking of something like tp_dealloc. > > If I call Py_InitModule3 and look at modul

Re: Some C-API functions clear the error indicator?

2010-01-29 Thread Austin Bingham
The original post was, in a nutshell, the "use case"; it's very scaled down the from the real example, and not intended to "make sense". The notion on which I was (apparently incorrectly) basing my exception translation was that I could 1) get and reset references to the error indicators, 2) call o

Re: Some C-API functions clear the error indicator?

2010-01-29 Thread Austin Bingham
That makes a lot of sense. And if I take the approach that any Py* function might do this, it actually looks like I can simplify my code (rather than managing some list of ill-behaved functions or something.) Thanks! On Fri, Jan 29, 2010 at 3:58 PM, Duncan Booth wrote: > Austin Bingham wrote: >

<    1   2