Ann: OpenOpt and FuncDesigner 0.37

2011-12-15 Thread dmitrey
Hi all, I'm glad to inform you about new release 0.37 (2011-Dec-15) of our free software: OpenOpt (numerical optimization): IPOPT initialization time gap (time till first iteration) for FuncDesigner models has been decreased Some improvements and bugfixes for interalg, especially for

combuter is use full message

2011-12-15 Thread D. Mohan M. Dayalan
http;//123maza.com/48/moon670/ -- http://mail.python.org/mailman/listinfo/python-list

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Eelco
On Dec 15, 4:43 am, rusi rustompm...@gmail.com wrote: On Dec 14, 10:15 pm, Eelco hoogendoorn.ee...@gmail.com wrote: 'Kindof' off-topic, but what the hell :). deja-vu We keep having these debates -- so I wonder how off-topic it is... And so do famous

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Robert Kern
On 12/14/11 12:32 PM, Steven D'Aprano wrote: On Wed, 14 Dec 2011 10:56:02 +0200, Jussi Piitulainen wrote: I'm not misunderstanding any argument. There was no argument. There was a blanket pronouncement that _in mathematics_ mod is not a binary operator. I should learn to challenge such

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Chris Angelico
On Thu, Dec 15, 2011 at 9:47 PM, Robert Kern robert.k...@gmail.com wrote: 42 = 2 mod 5  2 = 42 mod 5 It might make more sense to programmers if you think of it as written: 42 = 2, mod 5 2 = 42, mod 5 ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread rusi
On Dec 15, 2:44 pm, Eelco hoogendoorn.ee...@gmail.com wrote: In other words, what logic needs is a better exception-handling system, which completes the circle with programming languages quite nicely. :) Cute... but dangerously recursive (if taken literally) Remember that logic is the

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread rusi
On Dec 15, 3:58 pm, Chris Angelico ros...@gmail.com wrote: On Thu, Dec 15, 2011 at 9:47 PM, Robert Kern robert.k...@gmail.com wrote:  42 = 2 mod 5  2 = 42 mod 5 It might make more sense to programmers if you think of it as written: 42 = 2, mod 5 2 = 42, mod 5 ChrisA For the record I

Screen Control Fullscreen ON/OFF

2011-12-15 Thread yeet
Hi all, I would like to make fullscreen white and fullscreen black using Python on Linux. With in the specs of the LCD, I want to be able to display fullscreen white and black approximately at 30Hz. Frequency (on/off per second) will be input manually which is between 1-40Hz. Any idea where to

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Eelco
On Dec 15, 11:47 am, Robert Kern robert.k...@gmail.com wrote: On 12/14/11 12:32 PM, Steven D'Aprano wrote: On Wed, 14 Dec 2011 10:56:02 +0200, Jussi Piitulainen wrote: I'm not misunderstanding any argument. There was no argument. There was a blanket pronouncement that _in mathematics_ mod

Re: Screen Control Fullscreen ON/OFF

2011-12-15 Thread yeet
On Dec 15, 12:59 pm, yeet y.tur...@gmail.com wrote: Hi all, I would like to make fullscreen white and fullscreen black using Python on Linux. With in the specs of the LCD, I want to be able to display fullscreen white and black approximately at 30Hz. Frequency (on/off per second) will be

Re: Screen Control Fullscreen ON/OFF

2011-12-15 Thread Nizamov Shawkat
I would like to make fullscreen white and fullscreen black using Python on Linux. With in the specs of the LCD, I want to be able to display fullscreen white and black approximately at 30Hz. Frequency (on/off per second) will be input manually which is between 1-40Hz. Any idea where to start

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Eelco
On Dec 15, 11:56 am, rusi rustompm...@gmail.com wrote: On Dec 15, 2:44 pm, Eelco hoogendoorn.ee...@gmail.com wrote: In other words, what logic needs is a better exception-handling system, which completes the circle with programming languages quite nicely. :) Cute... but dangerously

Re: Screen Control Fullscreen ON/OFF

2011-12-15 Thread Nizamov Shawkat
It depends on whether you want sync to vblank or not. If not, that is pretty easy - use sleep() or something similar. If you have to use sync (screen is always either black or white, never partly black and white) then it is much much more difficult. Actually I do not know of any way to sync

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Jussi Piitulainen
rusi writes: On Dec 15, 3:58 pm, Chris Angelico wrote: On Thu, Dec 15, 2011 at 9:47 PM, Robert Kern wrote:  42 = 2 mod 5  2 = 42 mod 5 It might make more sense to programmers if you think of it as written: 42 = 2, mod 5 2 = 42, mod 5 ChrisA For the record I should say

Re: AttributeError in with statement (3.2.2)

2011-12-15 Thread Steve Howell
On Dec 14, 9:01 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: [...] So what are methods? In Python, methods are wrappers around functions which automatically pass the instance to the inner function object. Under normal circumstances, you create methods by declaring functions

Odd behavior of object equality/identity in the context of relative vs fully qualified imports

2011-12-15 Thread Nathan Rice
I just ran into this yesterday, and I am curious if there is a rational behind it... I have a class that uses a dictionary to dispatch from other classes (k) to functions for those classes (v). I recently ran into a bug where the dictionary would report that a class which was clearly in the

Re: ERP with Supply chain management (incl. POS) and Customer relationship management — What's available?

2011-12-15 Thread Alec Taylor
On Thu, Dec 15, 2011 at 5:54 AM, Anurag Chourasia anurag.choura...@gmail.com wrote: Hi Alec, I am building a POS/CRM (Loyalty Management) system as well. So far, the best I could find to use as a base is this one https://github.com/rosarior/django-inventory In any case, I felt that even

Re: Screen Control Fullscreen ON/OFF

2011-12-15 Thread 88888 Dihedral
On Thursday, December 15, 2011 6:59:04 PM UTC+8, yeet wrote: Hi all, I would like to make fullscreen white and fullscreen black using Python on Linux. With in the specs of the LCD, I want to be able to display fullscreen white and black approximately at 30Hz. Frequency (on/off per second)

Re: Odd behavior of object equality/identity in the context of relative vs fully qualified imports

2011-12-15 Thread Dave Angel
On 12/15/2011 09:34 AM, Nathan Rice wrote: I just ran into this yesterday, and I am curious if there is a rational behind it... I have a class that uses a dictionary to dispatch from other classes (k) to functions for those classes (v). I recently ran into a bug where the dictionary would

Re: Screen Control Fullscreen ON/OFF

2011-12-15 Thread Ulrich Eckhardt
Am 15.12.2011 12:12, schrieb yeet: My LCD has 2ms respond time thus it can handle a maximum of 50Hz ON/ OFF (white/black) thus seems to fit my 1-40Hz range. You might want to ask Santa for a new calculator, as in my book a response time of 2ms would be enough for 250Hz (period = 2 * 2ms).

Re: What is this widget?

2011-12-15 Thread Rick Johnson
On Dec 14, 12:47 pm, Muddy Coder cosmo_gene...@yahoo.com wrote: Hi Folks, I am trying to write letters on a photo that is opened in a canvas. So I think I must need a widget to contain the letters I will type in. I tried to use a Label, it worked. But, a Label covered part of the photo

Re: What is this widget? -- again

2011-12-15 Thread Rick Johnson
On Dec 14, 8:17 pm, Muddy Coder cosmo_gene...@yahoo.com wrote: Hi Folks, Sorry for the unclear question in last post. Well, I am using Tkinter to do GUI, and I just don't know what kind of widget can let me do annotation on an image being displayed. An example is the Paint of Windows: a

Can't get Apache2 tp process py (Ubuntu 11.10)

2011-12-15 Thread Passiday
Hello, Sorry if this is not exactly appropriate forum where to ask Apache question, but I though't here would some Apache-experienced people probably hang out. Well, I can't get my Apache2 to process Python *.py files. I checked numerous tutorials how to enable it, and did the install steps:

Ann: OpenOpt and FuncDesigner 0.37

2011-12-15 Thread dmitrey
Hi all, I'm glad to inform you about new release 0.37 (2011-Dec-15) of our free software: OpenOpt (numerical optimization): IPOPT initialization time gap (time till first iteration) for FuncDesigner models has been decreased Some improvements and bugfixes for interalg, especially for

Re: What is this widget? -- again

2011-12-15 Thread 88888 Dihedral
On Thursday, December 15, 2011 11:53:55 PM UTC+8, Rick Johnson wrote: On Dec 14, 8:17 pm, Muddy Coder cosmo_...@yahoo.com wrote: Hi Folks, Sorry for the unclear question in last post. Well, I am using Tkinter to do GUI, and I just don't know what kind of widget can let me do annotation

How to generate a, b, c, and d?

2011-12-15 Thread Roy Smith
I've got a list, ['a', 'b', 'c', 'd']. I want to generate the string, a, b, c, and d (I'll settle for no comma after 'c'). Is there some standard way to do this, handling all the special cases? [] == '' ['a'] == 'a' ['a', 'b'] == 'a and b' ['a', 'b', 'c', 'd'] == 'a, b, and c' It seems like

Re: Screen Control Fullscreen ON/OFF

2011-12-15 Thread Yigit Turgut
On Dec 15, 4:19 pm, Ulrich Eckhardt ulrich.eckha...@dominolaser.com wrote: Am 15.12.2011 12:12, schrieb yeet: My LCD has 2ms respond time thus it can handle a maximum of 50Hz ON/ OFF (white/black) thus seems to fit my 1-40Hz range. You might want to ask Santa for a new calculator, as in my

Re: Odd behavior of object equality/identity in the context of relative vs fully qualified imports

2011-12-15 Thread Nathan Rice
It would be more work than I want to go into to provide full context (unless it is to file a bug report, if it actually is a bug). I verified that there are no cyclical dependency issues using snakefood, and I doublechecked that just changing the import from full to partial name is sufficient to

Re: How to generate a, b, c, and d?

2011-12-15 Thread MRAB
On 15/12/2011 16:48, Roy Smith wrote: I've got a list, ['a', 'b', 'c', 'd']. I want to generate the string, a, b, c, and d (I'll settle for no comma after 'c'). Is there some standard way to do this, handling all the special cases? [] == '' ['a'] == 'a' ['a', 'b'] == 'a and b' ['a', 'b',

test for list equality

2011-12-15 Thread noydb
I want to test for equality between two lists. For example, if I have two lists that are equal in content but not in order, I want a return of 'equal' -- dont care if they are not in the same order. In order to get that equality, would I have to sort both lists regardless? if yes, how (having

Re: test for list equality

2011-12-15 Thread noydb
On Dec 15, 11:36 am, noydb jenn.du...@gmail.com wrote: I want to test for equality between two lists.  For example, if I have two lists that are equal in content but not in order, I want a return of 'equal' -- dont care if they are not in the same order.  In order to get that equality, would I

Re: test for list equality

2011-12-15 Thread MRAB
On 15/12/2011 16:36, noydb wrote: I want to test for equality between two lists. For example, if I have two lists that are equal in content but not in order, I want a return of 'equal' -- dont care if they are not in the same order. In order to get that equality, would I have to sort both

Re: test for list equality

2011-12-15 Thread John Gordon
In 61edc02c-4f86-45ef-82a1-61c701300...@t38g2000yqe.googlegroups.com noydb jenn.du...@gmail.com writes: My sort issue... as in this doesn't work if x.sort =3D=3D y.sort: ... print 'equal' ... else: ... print 'not equal' ... not equal ??? Use x.sort() instead of x.sort . -- John

Re: test for list equality

2011-12-15 Thread Stefan Behnel
noydb, 15.12.2011 18:49: On Dec 15, 11:36 am, noydb wrote: I want to test for equality between two lists. For example, if I have two lists that are equal in content but not in order, I want a return of 'equal' -- dont care if they are not in the same order. In order to get that equality,

Re: test for list equality

2011-12-15 Thread Miki Tebeka
My sort issue... as in this doesn't work if x.sort == y.sort: You're missing the () to make it a function call. Also list.sort() returns none, it mutates the original list. You can either sorted(x) == sorted(y) or set(x) == set(y) -- http://mail.python.org/mailman/listinfo/python-list

Re: test for list equality

2011-12-15 Thread Chris Kaynor
On Thu, Dec 15, 2011 at 9:57 AM, John Gordon gor...@panix.com wrote: In 61edc02c-4f86-45ef-82a1-61c701300...@t38g2000yqe.googlegroups.com noydb jenn.du...@gmail.com writes: My sort issue... as in this doesn't work if x.sort =3D=3D y.sort: ... print 'equal' ... else: ... print

Re: How to generate a, b, c, and d?

2011-12-15 Thread Tim Chase
On 12/15/11 10:48, Roy Smith wrote: I've got a list, ['a', 'b', 'c', 'd']. I want to generate the string, a, b, c, and d (I'll settle for no comma after 'c'). Is there some standard way to do this, handling all the special cases? [] == '' ['a'] == 'a' ['a', 'b'] == 'a and b' ['a', 'b',

Re: test for list equality

2011-12-15 Thread noydb
Ahh, I see (on the sort issue), thanks All! Still, any other slicker ways to do this? Just for learning. -- http://mail.python.org/mailman/listinfo/python-list

Re: Odd behavior of object equality/identity in the context of relative vs fully qualified imports

2011-12-15 Thread Ian Kelly
On Thu, Dec 15, 2011 at 7:34 AM, Nathan Rice nathan.alexander.r...@gmail.com wrote: I just ran into this yesterday, and I am curious if there is a rational behind it... I have a class that uses a dictionary to dispatch from other classes (k) to functions for those classes (v).  I recently ran

Re: test for list equality

2011-12-15 Thread darnold
On Dec 15, 11:59 am, Miki Tebeka miki.teb...@gmail.com wrote: My sort issue... as in this doesn't work if x.sort == y.sort: You're missing the () to make it a function call. Also list.sort() returns none, it mutates the original list. You can either     sorted(x) == sorted(y) or    

Re: test for list equality

2011-12-15 Thread MRAB
On 15/12/2011 17:49, noydb wrote: On Dec 15, 11:36 am, noydbjenn.du...@gmail.com wrote: I want to test for equality between two lists. For example, if I have two lists that are equal in content but not in order, I want a return of 'equal' -- dont care if they are not in the same order. In

MySQLdb for Python 2.7.2 for Windows 32 bit?

2011-12-15 Thread John Nagle
Is there a MySQLdb binary for Python 2.7.2 for Windows 32 bit? There's a 2.7 binary at http://www.lfd.uci.edu/~gohlke/pythonlibs/; but not a 2.7.2 binary. (Also, using modules from untrusted sites is riskier than it used to be. GPL code for major packages with added spyware and adware has

Re: test for list equality

2011-12-15 Thread MRAB
On 15/12/2011 17:59, Miki Tebeka wrote: My sort issue... as in this doesn't work if x.sort == y.sort: You're missing the () to make it a function call. Also list.sort() returns none, it mutates the original list. You can either sorted(x) == sorted(y) or set(x) == set(y) But

Re: test for list equality

2011-12-15 Thread Tim Chase
On 12/15/11 11:59, Miki Tebeka wrote: My sort issue... as in this doesn't work if x.sort == y.sort: You're missing the () to make it a function call. Also list.sort() returns none, it mutates the original list. You can either sorted(x) == sorted(y) or set(x) == set(y) Duplicates

Re: Odd behavior of object equality/identity in the context of relative vs fully qualified imports

2011-12-15 Thread Peter Otten
Nathan Rice wrote: I just ran into this yesterday, and I am curious if there is a rational behind it... I have a class that uses a dictionary to dispatch from other classes (k) to functions for those classes (v). I recently ran into a bug where the dictionary would report that a class

Re: test for list equality

2011-12-15 Thread Miki Tebeka
set(x) == set(y) Duplicates cause issues in the set() version: You're right, I stand corrected. -- http://mail.python.org/mailman/listinfo/python-list

Re: test for list equality

2011-12-15 Thread Ian Kelly
On Thu, Dec 15, 2011 at 11:07 AM, noydb jenn.du...@gmail.com wrote: Ahh, I see (on the sort issue), thanks All! Still, any other slicker ways to do this?  Just for learning. MRAB's collections.Counter suggestion is what I would do. Very tidy, and also more efficient I think: O(n) instead of

Re: How to generate a, b, c, and d?

2011-12-15 Thread Ethan Furman
Tim Chase wrote: On 12/15/11 10:48, Roy Smith wrote: I've got a list, ['a', 'b', 'c', 'd']. I want to generate the string, a, b, c, and d (I'll settle for no comma after 'c'). Is there some standard way to do this, handling all the special cases? [] == '' ['a'] == 'a' ['a', 'b'] == 'a

Re: How to generate a, b, c, and d?

2011-12-15 Thread Tim Chase
On 12/15/11 12:19, Ethan Furman wrote: Tim Chase wrote: On 12/15/11 10:48, Roy Smith wrote: I've got a list, ['a', 'b', 'c', 'd']. I want to generate the string, a, b, c, and d (I'll settle for no comma after 'c'). Is there some standard way to do this, handling all the special cases? If

Re: file data = array(s)

2011-12-15 Thread Eric
On Dec 14, 5:27 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Wed, 14 Dec 2011 14:20:40 -0800, Eric wrote: I'm trying to read some file data into a set of arrays.  The file data is just four columns of numbers, like so:    1.2    2.2   3.3  0.5    0.1   0.2    1.0  

Re: How to generate a, b, c, and d?

2011-12-15 Thread Roy Smith
FWIW, I ended up with: n = len(names) if n == 0: return '' if n == 1: return names[0] pre = ', '.join(names[:-1]) post = names[-1] return '%s, and %s' (pre, post) the slice-and-join() takes care of both the 2 and 2 element

Re: file data = array(s)

2011-12-15 Thread Eric
On Dec 14, 4:59 pm, Dave Angel d...@davea.name wrote: On 12/14/2011 05:20 PM, Eric wrote: I'm trying to read some file data into a set of arrays.  The file data is just four columns of numbers, like so:     1.2    2.2   3.3  0.5     0.1   0.2    1.0  10.1     ... and so on

Localhost client-server simple ssl socket test program problems

2011-12-15 Thread Yang Chun-Kai
Hello,everyone!! I am writing a simple ssl client-server test program on my personal laptop. And I encounter some problems with my simple programs. Please give me some

Re: [Tutor] Localhost client-server simple ssl socket test program problems

2011-12-15 Thread Alexander
2011/12/15 Yang Chun-Kai waitmefore...@hotmail.com Hello,everyone!! I am writing a simple ssl client-server test program on my personal laptop. And I encounter some problems with my simple programs. Please give me some helps.

Re: How to generate a, b, c, and d?

2011-12-15 Thread MRAB
On 15/12/2011 18:51, Tim Chase wrote: On 12/15/11 12:19, Ethan Furman wrote: Tim Chase wrote: On 12/15/11 10:48, Roy Smith wrote: I've got a list, ['a', 'b', 'c', 'd']. I want to generate the string, a, b, c, and d (I'll settle for no comma after 'c'). Is there some standard way to do this,

Re: file data = array(s)

2011-12-15 Thread MRAB
On 15/12/2011 18:37, Eric wrote: [snip] Neat. This is what I had in mind for a python-esque solution. [snip] FYI, the word is Pythonic when talking about the programming language. The word Pythonesque refers to Monty Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: Localhost client-server simple ssl socket test program problems

2011-12-15 Thread Christian Heimes
Am 15.12.2011 20:09, schrieb Yang Chun-Kai: Server side error: File views.py, line 17, in module connstream = ssl.wrap_socket(newsocket, server_side=True, certfile=/etc/home/ckyang/PHA/testsslsocket/mypha.crt, keyfile=/etc/home/ckyang/PHA/testsslsocket/mypha.key,

Re: Screen Control Fullscreen ON/OFF

2011-12-15 Thread Grant Edwards
On 2011-12-15, Nizamov Shawkat nizamov.shaw...@gmail.com wrote: I would like to make fullscreen white and fullscreen black using Python on Linux. With in the specs of the LCD, I want to be able to display fullscreen white and black approximately at 30Hz. Frequency (on/off per second) will be

RE: Localhost client-server simple ssl socket test program problems

2011-12-15 Thread Yang Chun-Kai
Thanks for tips. But I dont understand one thing is if Python's SSL lib doesn't support encrypted private keys for sockets. Then why should we encrypt the private key with openssl rsa -in /etc/home/ckyang/PHA/testsslsocket/mypha.key -out /etc/home/ckyang/PHA/testsslsocket/mypha-nopasswd.key

PyDev 2.3.0 Released

2011-12-15 Thread Fabio Zadrozny
Hi All, PyDev 2.3.0 has been released Details on PyDev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- * Pep8.py integrated (must be enabled in PyDev Editor Code Analysis pep8.py). * Faster PyDev startup (internal

Re: AttributeError in with statement (3.2.2)

2011-12-15 Thread Gregory Ewing
MRAB wrote: To give an analogy, it is like defining mammals as hairy animals which give birth to live young, which is correct for all mammals except for monotremes, which are mammals which lay eggs. Or the naked mole-rat. Or cetaceans (whales). The way I understand it, the main

Re: Localhost client-server simple ssl socket test program problems

2011-12-15 Thread Christian Heimes
Am 15.12.2011 21:09, schrieb Yang Chun-Kai: Thanks for tips. But I dont understand one thing is if Python's SSL lib doesn't support encrypted private keys for sockets. Then why should we encrypt the private key with openssl rsa -in /etc/home/ckyang/PHA/testsslsocket/mypha.key -out

LoadLibrary and extern ctype

2011-12-15 Thread bouleetbil bouleetbil
Hi, I've a little problem for define this : extern enum __pmerrno_t { PM_ERR_MEMORY = 1, PM_ERR_SYSTEM, PM_ERR_WRONG_ARCH } pm_errno; I've write : pacman=cdll.LoadLibrary(libpacman.so) ... #errors ( PM_ERR_MEMORY , PM_ERR_SYSTEM, ... PM_ERR_WRONG_ARCH )=map(ctypes.c_int,

Re: [Tutor] Localhost client-server simple ssl socket test program problems

2011-12-15 Thread Chris Angelico
On Fri, Dec 16, 2011 at 6:24 AM, Alexander rhettna...@gmail.com wrote: You're trying to connect to the same port on localhost as a client and a server? I don't know for certain but I don't think that should work. Two computers? That's bind() on the server and connect() on the client - the

Re: Overriding a global

2011-12-15 Thread Joshua Landau
On 14 December 2011 17:06, Jean-Michel Pichavant jeanmic...@sequans.comwrote: Joshua Landau wrote: [snip] Using currentLogger is just padding, in my opinion. *Every *value is currentvalue. Not always. I try to keep names on the same object because that object is supposed to be named that

RE: Localhost client-server simple ssl socket test program problems

2011-12-15 Thread Yang Chun-Kai
Hello~ Thanks for your fast reply. No, it doesn't ask for password, just a single line with writing RSA kay, then mypha-nopasswd.key appeared. If my key is not in PEM Format, can openssl with simple commands to switch it to? Or I should re-do the self-signed process with some certain key-words

Re: How to generate a, b, c, and d?

2011-12-15 Thread Ian Kelly
On Thu, Dec 15, 2011 at 11:51 AM, Tim Chase python.l...@tim.thechases.com wrote: For the fun/challenge?  Because you have a REALLY big data source that you don't want to keep in memory (in addition the resulting string)? If you have that much data, then I question why you would want to build

Ann: Python-SIMPL online tutorial updated to include examples of cloud interfacing

2011-12-15 Thread bobicanprogram
The Python-SIMPL tutorial is at: http://www.icanprogram.com/06py/lesson1/lesson1.html Several lessons (3,4, 6 7) have been enhanced to include examples of Python apps interfacing to the cloud housed on a Linode. The open source SIMPL toolkit provides a very lean Send/Receive/Reply (QNX style)

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Terry Reedy
On 12/15/2011 6:04 AM, rusi wrote: On Dec 15, 3:58 pm, Chris Angelicoros...@gmail.com wrote: On Thu, Dec 15, 2011 at 9:47 PM, Robert Kernrobert.k...@gmail.com wrote: 42 = 2 mod 5 2 = 42 mod 5 It might make more sense to programmers if you think of it as written: 42 = 2, mod 5 2 = 42,

Re: Can't get Apache2 tp process py (Ubuntu 11.10)

2011-12-15 Thread Passiday
Ok, figured this out by myself. There was an apache config conflict, and the config without mod_python enabled took over the config with mod_python enabled. -- http://mail.python.org/mailman/listinfo/python-list

Python Interpreter Error with PyDev (Eclipse IDE)

2011-12-15 Thread Joshua Jodrey
Hi, This is my first email to this list, so I apologize if there's a better mailing-list for this type of question. I'm looking to get started with python development, so I downloaded Python 3.2.2 and PyDev IDE for Eclipse.  When I go to configure my interpreter for a new python project,

Re: AttributeError in with statement (3.2.2)

2011-12-15 Thread Terry Reedy
On 12/15/2011 12:01 AM, Steven D'Aprano wrote: On Wed, 14 Dec 2011 18:13:36 -0500, Terry Reedy wrote: On 12/14/2011 3:01 AM, Steven D'Aprano wrote: On Wed, 14 Dec 2011 01:29:13 -0500, Terry Reedy wrote: To complement what Eric says below: The with statement is looking for an instance

Re: How to generate a, b, c, and d?

2011-12-15 Thread Terry Reedy
On 12/15/2011 12:27 PM, MRAB wrote: On 15/12/2011 16:48, Roy Smith wrote: I've got a list, ['a', 'b', 'c', 'd']. I want to generate the string, a, b, c, and d (I'll settle for no comma after 'c'). Is there some standard way to do this, handling all the special cases? [] == '' ['a'] == 'a'

Re: test for list equality

2011-12-15 Thread Terry Reedy
On 12/15/2011 12:59 PM, Miki Tebeka wrote: My sort issue... as in this doesn't work if x.sort == y.sort: You're missing the () to make it a function call. Also list.sort() returns none, it mutates the original list. You can either sorted(x) == sorted(y) or set(x) == set(y) or

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread alex23
Eelco hoogendoorn.ee...@gmail.com wrote: To tie it back in with python language design; all the more reason not to opt for pseudo-backwards compatibility. If python wants a remainder function, call it 'remainder'. Not 'rem', not 'mod', and certainly not '%'. Good luck with the PEP. Its the

Re: How to generate a, b, c, and d?

2011-12-15 Thread Chris Angelico
On Fri, Dec 16, 2011 at 11:57 AM, Terry Reedy tjre...@udel.edu wrote:  items[-1] = and + items[-1]  return , .join(items) This works only if you're sure there are at least two items, and if you don't mind two items coming out as a, and b. ChrisA --

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread MRAB
On 16/12/2011 02:14, alex23 wrote: Eelcohoogendoorn.ee...@gmail.com wrote: To tie it back in with python language design; all the more reason not to opt for pseudo-backwards compatibility. If python wants a remainder function, call it 'remainder'. Not 'rem', not 'mod', and certainly not '%'.

Re: AttributeError in with statement (3.2.2)

2011-12-15 Thread Steven D'Aprano
On Thu, 15 Dec 2011 05:35:55 -0800, Steve Howell wrote: For the special methods like __enter__ and __exit__, the tricky part isn't understanding what would happen once the methods were called; the tricky part is getting them to be called in the first place, if they were not declared inside

Help about Xlib Library in Python

2011-12-15 Thread 阮铮
Hi, A question about Xlib Library in Python troubled me for several days and I finally found this email list. I hope someone could answer my question. I think it is easy for experienced user. I would like to write a small script to response my mouse click in root screen and write something

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Chris Angelico
On Fri, Dec 16, 2011 at 1:58 PM, MRAB pyt...@mrabarnett.plus.com wrote: In financial circles it could be an operator for calculating percentages, eg. 5 % x would be 5 percent of x. It's an oddity, but an established one. :-) And I would be most sorry to see % renamed to mod in Python. Hello,

online data entry jobs

2011-12-15 Thread vengal b
online data entry jobs http://venuonlinejobs.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: How to generate a, b, c, and d?

2011-12-15 Thread Terry Reedy
On 12/15/2011 9:42 PM, Chris Angelico wrote: On Fri, Dec 16, 2011 at 11:57 AM, Terry Reedytjre...@udel.edu wrote: items[-1] = and + items[-1] return , .join(items) This works only if you're sure there are at least two items, and if you don't mind two items coming out as a, and b.

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread alex23
On Dec 16, 3:01 pm, Chris Angelico ros...@gmail.com wrote: And I would be most sorry to see % renamed to mod in Python. Hello, %s! My favourite number is %d. mod (Fred,42)   # This just looks wrong. Finally we can give this operator a more fitting name - I propose 'inject' - and put an end to

Re: % is not an operator [was Re: Verbose and flexible args and kwargs syntax]

2011-12-15 Thread Ian Kelly
On Dec 15, 2011 8:01 PM, MRAB pyt...@mrabarnett.plus.com wrote: Python has def, del, int, str, len, and so on. rem or mod (Ada has both, I believe) would be in keeping with the language. I think I would have to object to rem purely on the basis that it denotes comments in BASIC. --

Re: test for list equality

2011-12-15 Thread Alec Taylor
Just for fun, use the Hungarian Algorithm (Python implementation: http://software.clapper.org/munkres/) On Fri, Dec 16, 2011 at 3:36 AM, noydb jenn.du...@gmail.com wrote: I want to test for equality between two lists.  For example, if I have two lists that are equal in content but not in

Re: ERP with Supply chain management (incl. POS) and Customer relationship management — What's available?

2011-12-15 Thread Gregory Ewing
On Thu, Dec 15, 2011 at 5:54 AM, Anurag Chourasia anurag.choura...@gmail.com wrote: I am building a POS/CRM (Loyalty Management) system as well. Is it just me, or does the phrase Loyalty Management have a faintly ominous ring to it? -- Greg --

Re: test for list equality

2011-12-15 Thread Ian Kelly
On Thu, Dec 15, 2011 at 11:30 PM, Alec Taylor alec.tayl...@gmail.com wrote: Just for fun, use the Hungarian Algorithm (Python implementation: http://software.clapper.org/munkres/) That's a pretty silly approach, but okay: def listequals(a, b): if len(a) != len(b): return False

Re: test for list equality

2011-12-15 Thread Ian Kelly
On Fri, Dec 16, 2011 at 12:11 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Dec 15, 2011 at 11:30 PM, Alec Taylor alec.tayl...@gmail.com wrote: Just for fun, use the Hungarian Algorithm (Python implementation: http://software.clapper.org/munkres/) That's a pretty silly approach, but

[issue13601] sys.stderr should be unbuffered (or always line-buffered)

2011-12-15 Thread Geoffrey Bache
Changes by Geoffrey Bache gjb1...@users.sourceforge.net: -- nosy: +gjb1002 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13601 ___ ___

[issue13603] Add prime-related and number theory functions to Python

2011-12-15 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Agree with the -1s. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___

[issue13603] Add prime-related and number theory functions to Python

2011-12-15 Thread maniram maniram
Changes by maniram maniram maniandra...@gmail.com: -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___ ___

[issue1559549] ImportError needs attributes for module and file name

2011-12-15 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: Just following up on this ticket. Anyone have any objections to Brian's patch? Also, would 'fullname' be more appropriate than 'name', to be more in sync with that identifier in importlib? --

[issue2377] Replace __import__ w/ importlib.__import__

2011-12-15 Thread Eric Snow
Eric Snow ericsnowcurren...@gmail.com added the comment: AFAICT, #1559549 is the ImportError attribute ticket. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2377 ___

[issue13603] Add prime-related and number theory functions to Python

2011-12-15 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- resolution: - rejected status: languishing - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13603 ___

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Davide Rizzo
Davide Rizzo sor...@gmail.com added the comment: Mark, it's been a long time since I went through this bug and don't remember the details. Are you sure subtype_dealloc should not call PyType_Modified? It looked like the appropriate place at the time. In the example the reference cycle was

[issue12555] PEP 3151 implementation

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Here is a patch. Can someone take a look? -- Added file: http://bugs.python.org/file23962/oserror_new.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12555

[issue1559549] ImportError needs attributes for module and file name

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch doesn't appear to have the necessary mechanics to pass the new arguments from the import machinery when an ImportError is raised, is this deliberate? Also, I'm not sure why the new arguments are keyword-only. -- nosy: +pitrou

[issue13604] update PEP 393 (match implementation)

2011-12-15 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo, loewis stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13604 ___

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Absolutely. subtype_dealloc deals with deallocation of subtype *instances*, not the types themselves. Maybe we can try and explore the reference graph again? This sort of thing is one of the reasons that the cycle GC does not call any

[issue13598] string.Formatter doesn't support empty curly braces {}

2011-12-15 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: This bug is assigned to me. Sometimes it takes a while before a committer has time to review a bug and act on it. I can assure you that I will review this before the next release of Python. Thank you for the bug report, and especially thanks

  1   2   3   >