ANN: Mock 0.5.0 Release

2009-04-20 Thread Fuzzyman
Mock 0.5.0 has just been released. * Mock Homepage http://www.voidspace.org.uk/python/mock/ * Download Mock 0.5.0 release (zip) http://www.voidspace.org.uk/downloads/mock-0.5.0.zip * Mock Documentation as a PDF http://www.voidspace.org.uk/downloads/mock.pdf * Mock entry on PyPI

ANN: pyparsing 1.5.2 released!

2009-04-20 Thread Paul McGuire
Well, it has been about 6 months since the release of pyparsing 1.5.1, and there have been no new functional enhancements to pyparsing. I take this as a further sign that pyparsing is reaching a development/ maturity plateau. With the help of the pyparsing community, there are some compatibility

Python Training in San Diego (USENIX Technical Conference)

2009-04-20 Thread David Beazley
Python Training Opportunities In San Diego at the 2009 USENIX Technical Conference June 14-15, 2009 http://www.usenix.org/events/usenix09/training/index.html I'm pleased to announce three Python tutorial sessions to be presented at

Elisa Media Center 0.5.36 Release

2009-04-20 Thread Olivier Tilloy
Dear Python users, The Elisa team is happy to announce the release of Elisa Media Center 0.5.36, code-named Surfin' Bird. Elisa is a cross-platform and open-source Media Center written in Python. It uses GStreamer [1] for media playback and pigment [2] to create an appealing and intuitive user

Re: The Python standard library and PEP8

2009-04-20 Thread Emmanuel Surleau
On Monday 20 April 2009 01:48:04 Steven D'Aprano wrote: The problem is, I believe, that people wrongly imagine that there is One True Way of a language being object-oriented, and worse, that the OTW is the way Java does it. (If it were Smalltalk, they'd at least be able to make the argument

Re: The Python standard library and PEP8

2009-04-20 Thread Emmanuel Surleau
Allowing for procedural-style programming does not mean that a language does not implement (even imperfectly) an OO paradigm. Allowing is the wrong term here. Python absolutely encourages a straightforward procedural style when appropriate; unlike Java, there is no attempt to force object

iterate to make multiple variables?

2009-04-20 Thread Tairic
Hi, I'm somewhat new to programming and especially to python. Today I was attempting to make a sudoku-solver, and I wanted to put numbers into sets call box1, box2, ... box9, so that I could check new values against the boxes I ended up declaring the boxes like this box1 = set([]) box2 = set([])

Re: iterate to make multiple variables?

2009-04-20 Thread Mark Tolonen
Tairic ala...@gmail.com wrote in message news:95ea7bdf-2ae8-4e5e-a613-37169bb36...@w35g2000prg.googlegroups.com... Hi, I'm somewhat new to programming and especially to python. Today I was attempting to make a sudoku-solver, and I wanted to put numbers into sets call box1, box2, ... box9, so

Re: The Python standard library and PEP8

2009-04-20 Thread Stephen Hansen
Also, my code sample was itself a trick question. Python has *dynamic* object orientation (just as the blurb says), and square() will work on any object with a __mul__() method (through the ``*`` syntax), just as len() works on any object with a __len__() method. So my code

Re: The Python standard library and PEP8

2009-04-20 Thread bearophileHUGS
Emmanuel Surleau: On an unrelated note, it would be *really* nice to have a length property on strings. Even Java has that! Once you have written a good amount of Python code you can understand that a len() function, that calls the __len__ method of objects, is better. It allows you to write:

[False,True] and [True,True] -- [True, True]?????

2009-04-20 Thread bdb112
Is there any obvious reason why [False,True] and [True,True] gives [True, True] Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-secure execution environment

2009-04-20 Thread rogeeff
If anyone is interested I end up using rexec kinda class with only difference that i am using native __builtin__ and resetting __import__ hook to and from local r_import implementation before and after I am executing code in my environment. Gennadiy --

Re: Non-secure execution environment

2009-04-20 Thread rogeeff
If anyone is interested I end up using rexec kinda class with only difference that i am using native __builtin__ and resetting __import__ hook to and from local r_import implementation before and after I am executing code in my environment. Gennadiy --

Re: [False,True] and [True,True] -- [True, True]?????

2009-04-20 Thread Andre Engels
On Mon, Apr 20, 2009 at 9:03 AM, bdb112 boyd.blackw...@gmail.com wrote: Is there any obvious reason why [False,True] and [True,True] gives [True, True] Well, whether the reason is obvious, I do not know, but the way and seems to be implemented is: X and Y = * X if the boolean value of X is

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread AggieDan04
On Apr 20, 2:03 am, bdb112 boyd.blackw...@gmail.com wrote: Is there any obvious reason why [False,True] and [True,True] gives [True, True] Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] X and Y == (Y if X else X) X or Y == (X if X else Y) [False, True] is

Re: [False,True] and [True,True] -- [True, True]?????

2009-04-20 Thread Gabriel Genellina
En Mon, 20 Apr 2009 04:03:28 -0300, bdb112 boyd.blackw...@gmail.com escribió: Is there any obvious reason why [False,True] and [True,True] gives [True, True] Yes: short-circuit evaluation. [False,True] and [True,True] is *not* an element-by-element operation, it's a simple expression

Re: The Python standard library and PEP8

2009-04-20 Thread Lawrence D'Oliveiro
In message mailman.4178.1240170419.11746.python-l...@python.org, Christian Heimes wrote: Neither Java nor Python are pure object oriented languages. That's like saying the Soviet Union was never a pure communist country, or that the US is not a pure capitalist country. Pure, it seems, can be

Re: The Python standard library and PEP8

2009-04-20 Thread Lawrence D'Oliveiro
In message gsg2iv$g5...@panix3.panix.com, Aahz wrote: What kind of OO language allows you to do this: def square(x): return x*x for i in range(10): print square(x) Take out the OO qualifier, and the answer is still none: Traceback (most recent call last): File stdin,

Hello everyone!

2009-04-20 Thread Yilong Deng
I'm a newby here, I love python very much. Is there any Chinese here?-- http://mail.python.org/mailman/listinfo/python-list

Re: Can some1 review my code?

2009-04-20 Thread David Lees
zaheer.ag...@gmail.com wrote: When done all this you might feel it is not necessary to review the code any more, which is then is a good moment to actually request a review :-) I'll be happy to have a look at it though you might consider posting it here, more chance of useful feedback ;-)

PEP 401

2009-04-20 Thread alessiogiovanni . baroni
Are 19 days that I read this PEP; it's all true? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to create an unclosed dialog in wxPython?

2009-04-20 Thread liangguanhui
On 4月18日, 下午9时40分, 书虫 liangguan...@163.com wrote: In wxPython, after I create a wx.Frame, I want to create a modeless and unclosed dialog. Here is my step: app = wx.PySimpleApp() f = wx.Frame(None, -1, Test) d = wx.Dialog(f, -1, Test Dialog, style = wx.CAPTION) f.Show() d.Show()

Re: The Python standard library and PEP8

2009-04-20 Thread Steven D'Aprano
On Mon, 20 Apr 2009 19:18:23 +1200, Lawrence D'Oliveiro wrote: In message gsg2iv$g5...@panix3.panix.com, Aahz wrote: What kind of OO language allows you to do this: def square(x): return x*x for i in range(10): print square(x) Take out the OO qualifier, and the answer is

Re: The Python standard library and PEP8

2009-04-20 Thread Terry Reedy
Steven D'Aprano wrote: On Mon, 20 Apr 2009 19:18:23 +1200, Lawrence D'Oliveiro wrote: In message gsg2iv$g5...@panix3.panix.com, Aahz wrote: What kind of OO language allows you to do this: def square(x): return x*x for i in range(10): print square(x) Take out the OO qualifier, and

Re: QT , Wxwidgets are not just UI framework ?

2009-04-20 Thread Phil Thompson
On Sun, 19 Apr 2009 20:32:23 -0700 (PDT), Old Listener bill.hunt.walnutcr...@gmail.com wrote: On Apr 17, 10:20 am, Phil Thompson p...@riverbankcomputing.com wrote: On Fri, 17 Apr 2009 07:04:40 -0700 (PDT), Deep_Feelings doctore...@gmail.com wrote: On Apr 17, 1:52 pm, Diez B. Roggisch

Re: Equivalent to C bitmasks and enumerations

2009-04-20 Thread Ulrich Eckhardt
Ulrich Eckhardt wrote: [how to handle bitfields and enumerations in Python] Thanks to all that answered. The important lessons I learned: * You can modify classes, other than in C++ where they are statically defined. This allows e.g. adding constants. * __repr__ should provide output suitable

RE: Keyerror addhandler

2009-04-20 Thread Steven Macintyre
Hi Diez, I am using 2.4, could that be the cuase of your issue below. Ideally, I would like to stay with the 2.4 version and based on two tutorials, this was what I came up with Steven Steven Macintyre schrieb: Hi all, I'm wondering if anyone can assist me with this as I am very confused

best void return of a member function

2009-04-20 Thread Andreas Otto
Hi, I'm writing a native language binding for a library. http://libmsgque.sourceforge.net/ Every native method called by PYTHON have to return a PyObject* even if the function itself does not return anything. I have 2 possibilities for return a PyObject* 1.

Re: Is there a programming language that is combination ofPythonandBasic?

2009-04-20 Thread Hendrik van Rooyen
Chris Jones cjns1...@gmail.com wrote: Intellectually, assembler programming is the less demanding since its level of abstraction does not go any further than mapping a few binary numbers to a small set of usually well-chosen mnemonics. This is the surface complexity - it is true that when you

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread bdb112
THanks Gabriel, Now I know about the zip function. Your explanation of Boolean ops on lists was clear. It leads to some intriguing results: bool([False]) -- True I wonder if python 3 changes any of this? A and B means: check the boolean value of A; if it's false, return A.   Else, return B.

Re: PEP 401

2009-04-20 Thread Steven D'Aprano
On Sun, 19 Apr 2009 11:02:35 -0700, alessiogiovanni.baroni wrote: Are 19 days that I read this PEP; it's all true? For the benefit of people who are not aware of the tradition of April Fools: http://en.wikipedia.org/wiki/April_fool Look at the date of the PEP and the status. -- Steven --

Re: PEP 401

2009-04-20 Thread Chris Rebert
On Mon, Apr 20, 2009 at 1:22 AM, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Sun, 19 Apr 2009 11:02:35 -0700, alessiogiovanni.baroni wrote: Are 19 days that I read this PEP; it's all true? For the benefit of people who are not aware of the tradition of April Fools:

Re: The Python standard library and PEP8

2009-04-20 Thread Steven D'Aprano
On Mon, 20 Apr 2009 03:44:59 -0400, Terry Reedy wrote: Steven D'Aprano wrote: On Mon, 20 Apr 2009 19:18:23 +1200, Lawrence D'Oliveiro wrote: In message gsg2iv$g5...@panix3.panix.com, Aahz wrote: What kind of OO language allows you to do this: def square(x): return x*x for i in

Re: The Python standard library and PEP8

2009-04-20 Thread Steven D'Aprano
On Mon, 20 Apr 2009 19:15:51 +1200, Lawrence D'Oliveiro wrote: In message mailman.4178.1240170419.11746.python-l...@python.org, Christian Heimes wrote: Neither Java nor Python are pure object oriented languages. That's like saying the Soviet Union was never a pure communist country, or

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread Peter Otten
bdb112 wrote: Your explanation of Boolean ops on lists was clear. It leads to some intriguing results: bool([False]) -- True I wonder if python 3 changes any of this? No. Tests like if items: ... to verify that items is a non-empty list are a widespread idiom in Python. They rely

RE: Keyerror addhandler

2009-04-20 Thread Peter Otten
Steven Macintyre wrote: Please don't top-post. [Diez B. Roggisch] For me, that fails with NameError: name 'RotatingFileHandler' is not defined [Steven Macintyre] I am using 2.4, could that be the cuase of your issue below. Ideally, I would like to stay with the 2.4 version and based on

Re: please include python26_d.lib in the installer

2009-04-20 Thread Compie
On 31 mrt, 22:53, Carl Banks pavlovevide...@gmail.com wrote: On Mar 31, 12:50 pm, Compie joh...@gmail.com wrote: On 27 mrt, 17:01, Carl Banks pavlovevide...@gmail.com wrote: OTOH, it's possible that SWIG and Python just happen to use the same macro to indicate debugging mode.  So I

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread Gerhard Häring
Peter Otten wrote: bdb112 wrote: Your explanation of Boolean ops on lists was clear. It leads to some intriguing results: bool([False]) -- True I wonder if python 3 changes any of this? No. Tests like if items: ... to verify that items is a non-empty list are a widespread

Re: The Python standard library and PEP8

2009-04-20 Thread Steven D'Aprano
On Mon, 20 Apr 2009 08:05:01 +0200, Emmanuel Surleau wrote: On Monday 20 April 2009 01:48:04 Steven D'Aprano wrote: It also depends on whether you see the length of a data structure as a property of the data, or the result of an operation (counting) on the data structure. We often fall into

Re: Is there a programming language that is combination of Python and Basic?

2009-04-20 Thread Marco Mariani
Michael Torrie wrote: http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html Somebody better tell the Linux kernel developers about that! They apparently haven't read that yet. Better tell CPU makers too. In assembly it's all gotos. I'm sure you are joking.

Re: best void return of a member function

2009-04-20 Thread Andreas Otto
Andreas Otto wrote: well propable found the answer by my own ... Py_RETURN_NONE should be the best -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 401

2009-04-20 Thread Steven D'Aprano
On Mon, 20 Apr 2009 01:30:44 -0700, Chris Rebert wrote: Look at the date of the PEP and the status. Heck, just look at its number and mentally insert one slash or dash. Fourth of January? What's special about 4th of Jan? -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 401

2009-04-20 Thread Chris Rebert
On Mon, Apr 20, 2009 at 2:28 AM, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 20 Apr 2009 01:30:44 -0700, Chris Rebert wrote: Look at the date of the PEP and the status. Heck, just look at its number and mentally insert one slash or dash. Fourth of January? What's

Re: compiler package vs parser

2009-04-20 Thread Robin Becker
Kay Schluehr wrote: I realize that I probably ought to be trying this out with the newer ast stuff, but currently I am supporting code back to 2.3 and there's not much hope of doing it right there without using the compiler package. You might consider using the *builtin* parser module and

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread Chris Rebert
On Mon, Apr 20, 2009 at 1:54 AM, Gerhard Häring g...@ghaering.de wrote: Peter Otten wrote: bdb112 wrote: Your explanation of Boolean ops on lists was clear. It leads to some intriguing results: bool([False]) -- True I wonder if python 3 changes any of this? No. Tests like if items:  

RE: Keyerror addhandler

2009-04-20 Thread Steven Macintyre
Hi Peter, It looks like 2.5 has the better error message, but the actual problem is the same for both versions. Try changing mylogfileHandler's class to [handler_mylogfileHandler] class=handlers.RotatingFileHandler Many thanks, this worked for me! Steven --

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread Peter Otten
Gerhard Häring wrote: Peter Otten wrote: bdb112 wrote: Your explanation of Boolean ops on lists was clear. It leads to some intriguing results: bool([False]) -- True I wonder if python 3 changes any of this? No. Tests like if items: ... to verify that items is a non-empty

Re: Is there a programming language that is combination of Python and Basic?

2009-04-20 Thread Marco Mariani
baykus wrote: those lines as numbered steps or numbered bricks that are sitting on eachother but I see them as timelines or like filmstrips. Anyways it sounds like such a toy programming language does not exists except Arnaud surprisingly efficient code. and I will search my dream somewhere

Re: PEP 401

2009-04-20 Thread Stefan Behnel
Chris Rebert wrote: On Mon, Apr 20, 2009 at 1:22 AM, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Sun, 19 Apr 2009 11:02:35 -0700, alessiogiovanni.baroni wrote: Are 19 days that I read this PEP; it's all true? For the benefit of people who are not aware of the tradition of

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread Steven D'Aprano
On Mon, 20 Apr 2009 10:54:40 +0200, Gerhard Häring wrote: Peter Otten wrote: bdb112 wrote: Your explanation of Boolean ops on lists was clear. It leads to some intriguing results: bool([False]) -- True I wonder if python 3 changes any of this? No. Tests like if items: ...

Re: best void return of a member function

2009-04-20 Thread Christian Heimes
Andreas Otto wrote: well propable found the answer by my own ... Py_RETURN_NONE should be the best You have found the correct answer to your query. :) Christian -- http://mail.python.org/mailman/listinfo/python-list

Re: Create standalone Windows program with simple graphics?

2009-04-20 Thread Poster28
I'd like to program and compile a simple graphics program (showing something like a chess board, some numbers and buttons, mouse support) ... 2d or 3d graphics? You could start by looking at pygame and pyopengl. 2D Graphics. ... and provide it as a standalone binary for Windows users.

Re: best void return of a member function

2009-04-20 Thread Stefan Behnel
Andreas Otto writes: I'm writing a native language binding for a library. http://libmsgque.sourceforge.net/ Every native method called by PYTHON have to return a PyObject* even if the function itself does not return anything. [...] Question: what is the best return

Re: best void return of a member function

2009-04-20 Thread Stefan Behnel
Stefan Behnel wrote: you might want to try to wrap it in a more Pythonic lookfeel style, that wraps operations and use-cases rather than plain functions. That should make it easier to hide things like memory allocation and other C implementation details from users, and will generally increase

Re: Is there a programming language that is combination of Python and Basic?

2009-04-20 Thread Tim Rowe
2009/4/20 Steven D'Aprano st...@remove-this-cybersource.com.au: Sheesh. Talk about cherry-picking data. Go read my post in it's entirety, instead of quoting mining out of context. If you still think I'm unaware of the difference between unstructured GOTOs and structured jumps, or that I'm

Re: best void return of a member function

2009-04-20 Thread Stefan Behnel
Stefan Behnel wrote: define message packing formats in advance in some way, e.g. similar to Python's array module. I (obviously ;) meant the format identifiers in the struct module here. http://docs.python.org/library/struct.html Stefan -- http://mail.python.org/mailman/listinfo/python-list

Re: any(), all() and empty iterable

2009-04-20 Thread Antoon Pardon
On 2009-04-15, John O'Hagan m...@johnohagan.com wrote: On Tue, 14 Apr 2009, Mark Dickinson wrote: On Apr 14, 7:21 pm, Luis Alberto Zarrabeitia Gomez ky...@uh.cu wrote: It's more than that. Python's following the rules here. Maybe it could be documented better, for those without a

Re: Is there a programming language that is combination of Python and Basic?

2009-04-20 Thread david
When I was at Data General, writing C (and a little C++), we had a set of internal coding conventions that mandated a single return point for a function. Goto's were used during error checks to branch to the function exit; something like this: int frodo() { int rval = 0; if (bilbo() != 0) {

ANN: pyparsing 1.5.2 released!

2009-04-20 Thread Paul McGuire
Well, it has been about 6 months since the release of pyparsing 1.5.1, and there have been no new functional enhancements to pyparsing. I take this as a further sign that pyparsing is reaching a development/ maturity plateau. With the help of the pyparsing community, there are some compatibility

Re: The Python standard library and PEP8

2009-04-20 Thread Aahz
In article pan.2009.04.20.08.31...@remove.this.cybersource.com.au, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Mon, 20 Apr 2009 03:44:59 -0400, Terry Reedy wrote: Steven D'Aprano wrote: On Mon, 20 Apr 2009 19:18:23 +1200, Lawrence D'Oliveiro wrote: In message

Re: PEP 401

2009-04-20 Thread alessiogiovanni . baroni
On 20 Apr, 10:22, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: On Sun, 19 Apr 2009 11:02:35 -0700, alessiogiovanni.baroni wrote: Are 19 days that I read this PEP; it's all true? For the benefit of people who are not aware of the tradition of April Fools:

Re: The Python standard library and PEP8

2009-04-20 Thread Scott David Daniels
Steven D'Aprano wrote: ... There's an accepted definition for objected oriented programming language: a language which provides objects, which are constructs encapsulating both data and routines to operate on that data in a single item. Says you. Roger King wrote a book entitled My Cat is

Re: The Python standard library and PEP8

2009-04-20 Thread George Sakkis
On Apr 19, 6:01 pm, Martin P. Hellwig Besides, calling Python Object-Orientated is a bit of an insult :-). I would say that Python is Ego-Orientated, it allows me to do what I want. +1 QOTW -- http://mail.python.org/mailman/listinfo/python-list

when can i expect libraries and third party tools to be updated for python 3 ?

2009-04-20 Thread Deep_Feelings
every one is telling dont go with python 3 , 3rd party tools and libraries have no compitability with python 3 so from previous experience : when can i expect libraries and third party tools to be updated for python 3 ? (especially libraries ) --

Re: Is there a programming language that is combination of Python and Basic?

2009-04-20 Thread Tim Rowe
2009/4/20 david youngde...@gmail.com: When I was at Data General, writing C (and a little C++), we had a set of internal coding conventions that mandated a single return point for a function. How long ago was that? Or, more relevant, how old was the rule? Or how long earlier had the person who

Re: when can i expect libraries and third party tools to be updated for python 3 ?

2009-04-20 Thread alessiogiovanni . baroni
On 20 Apr, 15:47, Deep_Feelings doctore...@gmail.com wrote: every one is telling dont go with python 3 , 3rd party tools and libraries have no compitability with python 3 so from previous experience : when can i expect libraries and third party tools to be updated for python 3 ? (especially

How save clipboard data as bmp file

2009-04-20 Thread gopal mishra
Hi, I am trying to save my clipboard data (format is CF_ENHMETAFILE) as BitMap file (.BMP). Can any on suggest how to do this. Thanks Regards, Gopal -- http://mail.python.org/mailman/listinfo/python-list

Re: when can i expect libraries and third party tools to be updated for python 3 ?

2009-04-20 Thread Stefan Behnel
alessiogiovanni.baroni wrote: On 20 Apr, 15:47, Deep_Feelings wrote: every one is telling dont go with python 3 , 3rd party tools and libraries have no compitability with python 3 so from previous experience : when can i expect libraries and third party tools to be updated for python 3

Re: Help improve program for parsing simple rules

2009-04-20 Thread pruebauno
On Apr 17, 5:32 pm, Paul McGuire pt...@austin.rr.com wrote: On Apr 17, 2:40 pm, prueba...@latinmail.com wrote: On Apr 17, 11:26 am, Paul McGuire pt...@austin.rr.com wrote: On Apr 16, 10:57 am, prueba...@latinmail.com wrote: Another interesting task for those that are looking for

Re: any(), all() and empty iterable

2009-04-20 Thread Jani Hakala
Raymond Hettinger pyt...@rcn.com writes: FWIW, I wrote the docs. The pure python forms were put in as an integral part of the documentation. The first sentence of prose was not meant to stand alone. It is a lead-in to the code which makes explicit the short-circuiting behavior and the

Re: best void return of a member function

2009-04-20 Thread Andreas Otto
Stefan Behnel wrote: Andreas Otto writes: I'm writing a native language binding for a library. http://libmsgque.sourceforge.net/ Every native method called by PYTHON have to return a PyObject* even if the function itself does not return anything. [...] Question:

Re: when can i expect libraries and third party tools to be updated for python 3 ?

2009-04-20 Thread pruebauno
On Apr 20, 9:47 am, Deep_Feelings doctore...@gmail.com wrote: every one is telling dont go with python 3 , 3rd party tools and libraries have no compitability with python 3 so from previous experience : when can i expect libraries and third party tools to be updated for python 3 ? (especially

Re: when can i expect libraries and third party tools to be updated for python 3 ?

2009-04-20 Thread Gerhard Häring
Deep_Feelings wrote: every one is telling dont go with python 3 , 3rd party tools and libraries have no compitability with python 3 so from previous experience : when can i expect libraries and third party tools to be updated for python 3 ? (especially libraries ) The problem is: there is

Re: How save clipboard data as bmp file

2009-04-20 Thread Tino Wildenhain
gopal mishra wrote: Hi, I am trying to save my clipboard data (format is CF_ENHMETAFILE) as BitMap file (.BMP). Can any on suggest how to do this. Sure. Open Paint press ctrl-v and the save as BMP. Regards Tino smime.p7s Description: S/MIME Cryptographic Signature --

Re: Is there a programming language that is combination of Python and Basic?

2009-04-20 Thread david
I was at DG in the early nineties. A lot of very smart people devised some of these conventions, from hard-earned experience in the kernel and system-level software. I've never been one for fascist-rules documents, but in DG's case many of the rules made good sense. I'm not advocating one approach

Re: How save clipboard data as bmp file

2009-04-20 Thread Tim Golden
gopal mishra wrote: I am trying to save my clipboard data (format is CF_ENHMETAFILE) as BitMap file (.BMP). Have a look at PIL's ImageGrab module: http://www.pythonware.com/library/pil/handbook/imagegrab.htm I'm not sure if the current version supports metafiles, but it's easy enough to

Re: when can i expect libraries and third party tools to be updated for python 3 ?

2009-04-20 Thread Ben Finney
(Is there hope that you could set your ‘From’ field using your real name so we can discuss with a real person instead of a pseudonym?) Deep_Feelings doctore...@gmail.com writes: every one is telling dont go with python 3 , 3rd party tools and libraries have no compitability with python 3

out of memory with processing module

2009-04-20 Thread Brian
I'm using the third-party processing module in Python 2.5, which may have become the multiprocessing module in Python 2.6, to speed up the execution of a computation that takes over a week to run. The relevant code may not be relevant, but it is: q1, q2 = processing.Queue(),

Re: when can i expect libraries and third party tools to be updated for python 3 ?

2009-04-20 Thread Jeremiah Dodds
On Mon, Apr 20, 2009 at 3:40 PM, Stefan Behnel stefan...@behnel.de wrote: alessiogiovanni.baroni wrote: On 20 Apr, 15:47, Deep_Feelings wrote: every one is telling dont go with python 3 , 3rd party tools and libraries have no compitability with python 3 so from previous experience

Re: The Python standard library and PEP8

2009-04-20 Thread Jeremiah Dodds
On Mon, Apr 20, 2009 at 2:18 PM, Scott David Daniels scott.dani...@acm.orgwrote: Steven D'Aprano wrote: ... There's an accepted definition for objected oriented programming language: a language which provides objects, which are constructs encapsulating both data and routines to operate on

What is a real name, round 668 (was Re: when can i expect libraries and third party tools to be updated for python 3 ?)

2009-04-20 Thread Aahz
In article 87tz4jl66c@benfinney.id.au, Ben Finney ben+pyt...@benfinney.id.au wrote: (Is there hope that you could set your From field using your real name so we can discuss with a real person instead of a pseudonym?) Could you define what a real name is? (If you think the above sounds

Re: best void return of a member function

2009-04-20 Thread Andreas Otto
Propable you can help me with an other problem ... the following code crash with: ==31431== Process terminating with default action of signal 11 (SIGSEGV) ==31431== General Protection Fault ==31431==at 0x4EA5151: PyObject_GenericGetAttr (object.c:982) ==31431==by 0x4EF1FBD:

Re: best void return of a member function

2009-04-20 Thread Stefan Behnel
Andreas Otto wrote: if you wrote one language interface you can write every language interface This is like saying: if you used one programming language, you can use every programming language. Use is different from master or appreciate. - the tasks are allways the same... just the

Re: out of memory with processing module

2009-04-20 Thread alessiogiovanni . baroni
On 20 Apr, 17:03, Brian knair...@yahoo.com wrote: I'm using the third-party processing module in Python 2.5, which may have become the multiprocessing module in Python 2.6, to speed up the execution of a computation that takes over a week to run. The relevant code may not be relevant, but it

Re: unpythonic use of property()?

2009-04-20 Thread J Kenneth King
Carl Banks pavlovevide...@gmail.com writes: On Apr 17, 4:00 pm, Scott David Daniels scott.dani...@acm.org wrote: Carl Banks wrote: On Apr 17, 10:21 am, J Kenneth King ja...@agentultra.com wrote: Consider: code:

Python and GMP.

2009-04-20 Thread alessiogiovanni . baroni
There are reasons why Python not used the GMP library for implementing its long type? -- http://mail.python.org/mailman/listinfo/python-list

Re: unpythonic use of property()?

2009-04-20 Thread Michele Simionato
On Apr 17, 7:21 pm, J Kenneth King ja...@agentultra.com wrote: Consider: code: class MyInterface(object):     def __get_id(self):         return self.__id     id = property(fget=__get_id)     def __init__(self,

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread Peter Pearson
On 20 Apr 2009 09:26:34 GMT, Steven D'Aprano wrote: On Mon, 20 Apr 2009 10:54:40 +0200, Gerhard Häring wrote: [snip] I prefer to write it explicitly: if len(lst) 0: Do you also count the length of a list explicitly? n = 0 for item in lst: n += 1 if n 0: ... No? Of course

python-magic with python2.6

2009-04-20 Thread Gabriel
Is there any way to use python-magic(http://pypi.python.org/pypi/python-magic/0.1) with python2.6? Or do somebody know something similar to this what is running on 2.6? -- Gabriel -- http://mail.python.org/mailman/listinfo/python-list

sorting two corresponding lists?

2009-04-20 Thread Esmail
Hello all, I wonder if someone could help me with sorting two corresponding lists. For instance the first list contains some items, and the second list contains their value (higher is better) items = [apple, car, town, phone] values = [5, 2, 7, 1] I would like to sort the 'items' list based

Re: any(), all() and empty iterable

2009-04-20 Thread John O'Hagan
On Mon, 20 Apr 2009, Antoon Pardon wrote: On 2009-04-15, John O'Hagan m...@johnohagan.com wrote: On Tue, 14 Apr 2009, Mark Dickinson wrote: [...] I'd like to guess that in 93.7% of cases, when a programmer has used all(seq) without having thought in advance about what the right thing

Re: sorting two corresponding lists?

2009-04-20 Thread Diez B. Roggisch
Esmail wrote: Hello all, I wonder if someone could help me with sorting two corresponding lists. For instance the first list contains some items, and the second list contains their value (higher is better) items = [apple, car, town, phone] values = [5, 2, 7, 1] I would like to sort

Re: Python and GMP.

2009-04-20 Thread Diez B. Roggisch
alessiogiovanni.bar...@gmail.com wrote: There are reasons why Python not used the GMP library for implementing its long type? Any reason it should? I don't know GMP (only that it exists), but adding binary dependencies is always a tricky and in need of careful weighting thing to do. Diez --

Re: sorting two corresponding lists?

2009-04-20 Thread Saketh
On Apr 20, 12:10 pm, Esmail ebo...@hotmail.com wrote: Hello all, I wonder if someone could help me with sorting two corresponding lists. For instance the first list contains some items, and the second list contains their value (higher is better) items = [apple, car, town, phone] values =

Re: The Python standard library and PEP8

2009-04-20 Thread Colin J. Williams
Emmanuel Surleau wrote: Hi there, Exploring the Python standard library, I was surprised to see that several packages (ConfigParser, logging...) use mixed case for methods all over the place. I assume that they were written back when the Python styling guidelines were not well-defined.

Re: and [True,True] -- [True, True]?????

2009-04-20 Thread Paul Rubin
Peter Pearson ppear...@nowhere.invalid writes: The not empty interpretation is a cute shortcut. But somebody's gotta put up some resistance to cute shortcuts, or we'll find ourselves back with Perl. + QOTW -- http://mail.python.org/mailman/listinfo/python-list

Re: [ANN] pyxser-0.2r --- Python XML Serialization

2009-04-20 Thread Daniel Molina Wegener
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stefan Behnel wrote: Daniel Molina Wegener wrote: Sorry, it appears that I've misunderstand your question. By /unicode objects/ I mean /python unicode objects/ aka /python unicode strings/. Yes, that's exactly what I'm talking about. Maybe

Re: out of memory with processing module

2009-04-20 Thread Brian
On Apr 20, 9:18 am, alessiogiovanni.bar...@gmail.com wrote: On 20 Apr, 17:03, Brian knair...@yahoo.com wrote: I'm using the third-party processing module in Python 2.5, which may have become the multiprocessing module in Python 2.6, to speed up the execution of a computation that takes

Re: out of memory with processing module

2009-04-20 Thread Brian
On Apr 20, 9:18 am, alessiogiovanni.bar...@gmail.com wrote: On 20 Apr, 17:03, Brian knair...@yahoo.com wrote: I'm using the third-party processing module in Python 2.5, which may have become the multiprocessing module in Python 2.6, to speed up the execution of a computation that takes

efficiently checking for string.maketrans conflicts?

2009-04-20 Thread Saketh
Hi everyone: I'm using translation in the sense of string.maketrans here. I am trying to efficiently compare if two string translations conflict -- that is, either they differently translate the same letter, or they translate two different letters to the same one. Here are some examples: #

  1   2   3   >