Re: Fallen Angels, Originators of Evil on Planet Earth?

2012-05-24 Thread seededfromstars
I don't believe that angels originated evil. Take a look at this book http://www.amazon.com/The-Change-Freiderici-Ms/dp/147508076X/ref=sr_1_1?ie=UTF8qid=1337792796sr=8-1 -- http://mail.python.org/mailman/listinfo/python-list

Applying a patch from a diff in python (if possible)

2012-05-24 Thread Astan
Hi, I'm trying to synch up two databases that are very far from each other using diff and patch. Currently, what happens is a mysqldump on database A (which is linux) which is sent over to database B and over time the diff of this mysql is sent over to database B. The database B lives on a NAS

PyDev IPython Confusion

2012-05-24 Thread Wanderer
I have two versions of Python and Ipython; Python 2.6.6 with Ipython 0.11 and Python 2.7.3 with Ipython 0.12. When I run the Eclipse PyDev console for the Python 2.7.3 it says it is using Ipython 0.11 as the interpreter. Ipython 0.11 should not be in the Path for Python 2.7.3. Is this a bug in

Re: Applying a patch from a diff in python (if possible)

2012-05-24 Thread Astan
On May 24, 1:24 pm, Astan astan.c...@rhubarbfizz.com wrote: Hi, I'm trying to synch up two databases that are very far from each other using diff and patch. Currently, what happens is a mysqldump on database A (which is linux) which is sent over to database B and over time the diff of this

Re: A better contextlib.contextmanager

2012-05-24 Thread Ethan Furman
Michele Simionato wrote: but I am asking a question instead: should I add this feature to the next release of the decorator module? I think it would be an excellent addition to your module. ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Book for a C Programmer?

2012-05-24 Thread Michael Poeltl
hi, take 'Pro Python' (by Marty Alchin) regards Michael * hsa...@gmail.com hsa...@gmail.com [2012-05-24 07:54]: I am trying to join an online class that uses python. I need to brush up on the language quickly. Is there a good book or resource that covers it well but does not have to

Re: Python Book for a C Programmer?

2012-05-24 Thread Ulrich Eckhardt
Am 24.05.2012 01:45, schrieb hsa...@gmail.com: I am trying to join an online class that uses python. I need to brush up on the language quickly. Is there a good book or resource that covers it well but does not have to explain what an if..then..else statement is? First thing to check first is

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Peter Otten
Fayaz Yusuf Khan wrote: ***TRIVIAL ISSUE***, but this has been irking me for a while now. The main logging.Handler class' __init__ accepts a level argument while none of its children do. The poor minions seem to be stuck with the setLevel method which considerably lengthens the code. In

Working with dates : complex problem

2012-05-24 Thread Thibaut DIRLIK
Hi, I've a list of python objects with dates attributes. This list is ordered by one of these date. Elements mandatory follow each other : Element #1 Element #2 Element #3 |-|--|--| Now, I want to insert an

Namespace hack

2012-05-24 Thread Steven D'Aprano
From the Zen of Python (import this): Namespaces are one honking great idea -- let's do more of those! Inspired by this, I have a decorator that abuses function closures to create a namespace type with the following properties: - all methods are static methods that do not take a self

Re: Working with dates : complex problem

2012-05-24 Thread Peter Otten
Thibaut DIRLIK wrote: Hi, I've a list of python objects with dates attributes. This list is ordered by one of these date. Elements mandatory follow each other : Element #1 Element #2 Element #3

Re: Korean fonts on Python 2.6 (MacOsX)

2012-05-24 Thread Ulrich Eckhardt
Am 23.05.2012 11:30, schrieb 20_feet_tall: I have a problem with the visualization of korean fonts on Python. When I try to type in the characters only squares come out. I have tried to install the CJK codec, the hangul 1.0 codec but still no result. What exactly do you mean with

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Jean-Michel Pichavant
Fayaz Yusuf Khan wrote: Jean-Michel Pichavant wrote: Meanwhile you can shorten the code this way: root.addHandler(FileHandler('debug.log')) root.handlers[-1].setLevel(DEBUG) Eh? Readability was the aim. I fail to see how it's not readable, code is short and no magic is involved

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Peter Otten
Jean-Michel Pichavant wrote: Fayaz Yusuf Khan wrote: Jean-Michel Pichavant wrote: Meanwhile you can shorten the code this way: root.addHandler(FileHandler('debug.log')) root.handlers[-1].setLevel(DEBUG) Eh? Readability was the aim. I fail to see how it's not readable, code

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Jean-Michel Pichavant
Peter Otten wrote: Jean-Michel Pichavant wrote: Fayaz Yusuf Khan wrote: Jean-Michel Pichavant wrote: Meanwhile you can shorten the code this way: root.addHandler(FileHandler('debug.log')) root.handlers[-1].setLevel(DEBUG) Eh? Readability was the aim.

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Peter Otten
Jean-Michel Pichavant wrote: Peter Otten wrote: Jean-Michel Pichavant wrote: Fayaz Yusuf Khan wrote: Jean-Michel Pichavant wrote: Meanwhile you can shorten the code this way: root.addHandler(FileHandler('debug.log')) root.handlers[-1].setLevel(DEBUG)

other languages API to python

2012-05-24 Thread Rita
Hello, A vendor provided a C, C++ and Java API for a application. They dont support python so I would like to create a library for it. My question is, how hard/easy would it be to create something like this? Is there a simple HOWTO or examples I can follow? Can someone shed home light on this?

Re: problem loading matlab data with ompc and python

2012-05-24 Thread Tim Williams
On May 23, 5:10 pm, no1 no1.w...@gmail.com wrote: Hi, we're investigating transitioning our company from matlab to python. We found OMPC as a MATLAB m-file-to Python translator, but we're encountering a problem using the translated code to import MATLAB data structures into Python. For

Re: other languages API to python

2012-05-24 Thread Chris Angelico
On Thu, May 24, 2012 at 9:58 PM, Rita rmorgan...@gmail.com wrote: Hello, A vendor provided a C, C++ and Java API for a application. They dont support python so I would like to create a library for it. My question is, how hard/easy would it be to create something like this? Is there a simple

Email Id Verification

2012-05-24 Thread niks
Hello everyone.. I am new to asp.net... I want to use Regular Expression validator in Email id verification.. Can anyone tell me how to use this and what is the meaning of this \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* -- http://mail.python.org/mailman/listinfo/python-list

Re: Email Id Verification

2012-05-24 Thread Chris Angelico
On Thu, May 24, 2012 at 10:32 PM, niks nikunjparmar...@gmail.com wrote: Hello everyone.. I am new to asp.net... I want to use Regular Expression validator in Email id verification.. Can anyone tell me how to use this and what is the meaning of this

Re: Python Book for a C Programmer?

2012-05-24 Thread William R. Wing (Bill Wing)
On May 23, 2012, at 7:45 PM, hsa...@gmail.com wrote: I am trying to join an online class that uses python. I need to brush up on the language quickly. Is there a good book or resource that covers it well but does not have to explain what an if..then..else statement is? Thanks. --

Re: Email Id Verification

2012-05-24 Thread alister
On Thu, 24 May 2012 05:32:16 -0700, niks wrote: Hello everyone.. I am new to asp.net... I want to use Regular Expression validator in Email id verification.. Can anyone tell me how to use this and what is the meaning of this \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* this is not really a

Re: Python Book for a C Programmer?

2012-05-24 Thread alister
On Wed, 23 May 2012 16:45:05 -0700, hsaziz wrote: I am trying to join an online class that uses python. I need to brush up on the language quickly. Is there a good book or resource that covers it well but does not have to explain what an if..then..else statement is? Thanks. Dive into

Re: Namespace hack

2012-05-24 Thread Daniel Fetchinson
From the Zen of Python (import this): Namespaces are one honking great idea -- let's do more of those! Inspired by this, I have a decorator that abuses function closures to create a namespace type with the following properties: - all methods are static methods that do not take a self

Re: Python Book for a C Programmer?

2012-05-24 Thread Javier Novoa C.
On 2012-05-24, alister alister.w...@ntlworld.com wrote: On Wed, 23 May 2012 16:45:05 -0700, hsaziz wrote: I am trying to join an online class that uses python. I need to brush up on the language quickly. Is there a good book or resource that covers it well but does not have to explain what an

Re: Python Book for a C Programmer?

2012-05-24 Thread boB Stepp
On Thu, May 24, 2012 at 8:28 AM, Javier Novoa C. jsti...@invernalia.homelinux.net wrote: On 2012-05-24, alister alister.w...@ntlworld.com wrote: On Wed, 23 May 2012 16:45:05 -0700, hsaziz wrote: I am trying to join an online class that uses python. I need to brush up on the language quickly.

Dynamic comparison operators

2012-05-24 Thread mlangenhoven
I would like to pass something like this into a function test(val1,val2,'=') and it should come back with True or False. Is there a way to dynamically compare 2 values like this or will I have to code each operator individually? -- http://mail.python.org/mailman/listinfo/python-list

Re: Dynamic comparison operators

2012-05-24 Thread Phil Le Bienheureux
Hello, You can pass an operator as an argument to your function. See : http://docs.python.org/library/operator.html Regards, -- Forwarded message -- From: mlangenho...@gmail.com Date: 2012/5/24 Subject: Dynamic comparison operators To: python-list@python.org I would like to

Re: Dynamic comparison operators

2012-05-24 Thread Alain Ketterlin
mlangenho...@gmail.com writes: I would like to pass something like this into a function test(val1,val2,'=') and it should come back with True or False. def test(x,y,c): return c(x,y) Call with: test(v1,v2, lambda x,y:x=y ). A bit noisy imho. If you have a finite number of comparison

Re: Dynamic comparison operators

2012-05-24 Thread Tim Chase
On 05/24/12 09:32, Phil Le Bienheureux wrote: I would like to pass something like this into a function test(val1,val2,'=') You can pass an operator as an argument to your function. See : http://docs.python.org/library/operator.html And if you want to use strings, you can map them to the

Re: Dynamic comparison operators

2012-05-24 Thread Jussi Piitulainen
Alain Ketterlin writes: mlangenho...@gmail.com writes: I would like to pass something like this into a function test(val1,val2,'=') and it should come back with True or False. def test(x,y,c): return c(x,y) Call with: test(v1,v2, lambda x,y:x=y ). A bit noisy imho. Re noisy:

Re: Email Id Verification

2012-05-24 Thread Chris Angelico
On Thu, May 24, 2012 at 11:45 PM, Dennis Lee Bieber wlfr...@ix.netcom.com wrote:        And maybe follow-up with a review of this monster: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html That is awesome. Epic. Eyeball-bleeding. ChrisA --

Re: Dynamic comparison operators

2012-05-24 Thread Colin J. Williams
On 24/05/2012 10:14 AM, mlangenho...@gmail.com wrote: I would like to pass something like this into a function test(val1,val2,'=') and it should come back with True or False. Is there a way to dynamically compare 2 values like this or will I have to code each operator individually? Would

Czy dysponujesz dwoma wolnymi godzinami w tygodniu? Oto jak zarobc 185 EUR w tym czasie.

2012-05-24 Thread python-list
Dzien dobry! Dziekujemy bardzo za zainteresowanie pozycja regionalnego przedstawiciela dostepna obecnie w Polsce i krajach Europy Srodkowej. Chcialem by przedstawic, bardzo krotko - nasza wybitna firme. W.U.G. Inc zostala zalozona w 1992 roku i obecnie stala sie jedna z najbardziej

Re: Python Book for a C Programmer?

2012-05-24 Thread Javier Novoa C.
On Thu, May 24, 2012 at 08:34:24AM -0500, boB Stepp wrote: On Thu, May 24, 2012 at 8:28 AM, Javier Novoa C. jsti...@invernalia.homelinux.net wrote: On 2012-05-24, alister alister.w...@ntlworld.com wrote: On Wed, 23 May 2012 16:45:05 -0700, hsaziz wrote: I am trying to join an online

Embedding Python27 in C++ on Windows: CRT compatibility issues with VS2010?

2012-05-24 Thread Stephen Lin
Hello, I'm a relative python newbie but I've been tasked to figure out how to embed calls to a python library in an Excel XLL add-in. The Python/C API for doing this seems pretty straightforward, but I seem to have read somewhere online that it's important that the C++ program or DLL linking to

Re: Email Id Verification

2012-05-24 Thread John Nagle
On 5/24/2012 5:32 AM, niks wrote: Hello everyone.. I am new to asp.net... I want to use Regular Expression validator in Email id verification.. Can anyone tell me how to use this and what is the meaning of this \w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* Not a Python question. It

Re: Python Book for a C Programmer?

2012-05-24 Thread Jim Wilson
On 05/23/2012 07:45 PM, hsa...@gmail.com wrote: I am trying to join an online class that uses python. I need to brush up on the language quickly. Is there a good book or resource that covers it well but does not have to explain what an if..then..else statement is? Thanks. My opinion:

Help doing it the python way

2012-05-24 Thread Scott Siegler
Hello, I am an experienced programmer but a beginner to python. As such, I can figure out a way to code most algorithms using more C style syntax. I am doing something now that I am sure is a more python way but i can't quite get it right. I was hoping someone might help. So I have a list

Re: Help doing it the python way

2012-05-24 Thread Duncan Booth
Scott Siegler scott.sieg...@gmail.com wrote: Hello, I am an experienced programmer but a beginner to python. As such, I can figure out a way to code most algorithms using more C style syntax. I am doing something now that I am sure is a more python way but i can't quite get it right.

Re: Help doing it the python way

2012-05-24 Thread Paul Rubin
Scott Siegler scott.sieg...@gmail.com writes: is there a way to do something like: [(x,y-1), (x,y+1) for zzz in coord_list] or something along those lines? You should read the docs of the itertools module on general principles, since they are very enlightening in many ways. Your

Re: Help doing it the python way

2012-05-24 Thread Dave Angel
On 05/24/2012 04:22 PM, Scott Siegler wrote: Hello, I am an experienced programmer but a beginner to python. As such, I can figure out a way to code most algorithms using more C style syntax. I am doing something now that I am sure is a more python way but i can't quite get it right. I

Re: Help doing it the python way

2012-05-24 Thread Paul Rubin
Paul Rubin no.email@nospam.invalid writes: new_list = chain( ((x,y-1), (x,y+1)) for x,y in coord_list ) Sorry: new_list = list(chain( ((x,y-1), (x,y+1)) for x,y in coord_list)) -- http://mail.python.org/mailman/listinfo/python-list

Re: problem loading matlab data with ompc and python

2012-05-24 Thread no1
On Thursday, May 24, 2012 5:06:41 AM UTC-7, Tim Williams wrote: On May 23, 5:10 pm, no1 no1.w...@gmail.com wrote: Hi, we're investigating transitioning our company from matlab to python. We found OMPC as a MATLAB m-file-to Python translator, but we're encountering a problem using the

Re: Email Id Verification

2012-05-24 Thread Ben Finney
John Nagle na...@animats.com writes: It matches anything that looks like a mail user name followed by an @ followed by anything that looks more or less like a domain name. The domain name must contain at least one ., and cannot end with a ., which is not strictly correct but usually works.

Re: Wish: Allow all log Handlers to accept the level argument

2012-05-24 Thread Cameron Simpson
On 24May2012 12:48, Jean-Michel Pichavant jeanmic...@sequans.com wrote: | Peter Otten wrote: | Jean-Michel Pichavant wrote: | Fayaz Yusuf Khan wrote: | Jean-Michel Pichavant wrote: | Meanwhile you can shorten the code this way: | root.addHandler(FileHandler('debug.log')) |

Re: Email Id Verification

2012-05-24 Thread Cameron Simpson
On 25May2012 01:20, Chris Angelico ros...@gmail.com wrote: | On Thu, May 24, 2012 at 11:45 PM, Dennis Lee Bieber | wlfr...@ix.netcom.com wrote: |        And maybe follow-up with a review of this monster: | http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html | | That is awesome. Epic.

Re: Email Id Verification

2012-05-24 Thread Cameron Simpson
On 24May2012 05:32, niks nikunjparmar...@gmail.com wrote: | Hello everyone.. | I am new to asp.net... Time to run away fast before you're commited then:-) You're aware this is a _python_ list/group, yes? | I want to use Regular Expression validator in Email id verification.. You can't. Valid

Re: Help doing it the python way

2012-05-24 Thread Emile van Sebille
On 5/24/2012 2:30 PM Paul Rubin said... Paul Rubinno.email@nospam.invalid writes: new_list = chain( ((x,y-1), (x,y+1)) for x,y in coord_list ) Sorry: new_list = list(chain( ((x,y-1), (x,y+1)) for x,y in coord_list)) from itertools import chain coord_list =

Re: Email Id Verification

2012-05-24 Thread Chris Angelico
On Fri, May 25, 2012 at 9:03 AM, Cameron Simpson c...@zip.com.au wrote: On 24May2012 05:32, niks nikunjparmar...@gmail.com wrote: | Hello everyone.. | I am new to asp.net... Time to run away fast before you're commited then:-) You're aware this is a _python_ list/group, yes? Committed to an

Re: Email Id Verification

2012-05-24 Thread Steven D'Aprano
On Thu, 24 May 2012 05:32:16 -0700, niks wrote: Hello everyone.. I am new to asp.net... I want to use Regular Expression validator in Email id verification.. Why do you want to write buggy code that makes your users hate your program? Don't do it! Write good code, useful code! Validating

Re: Email Id Verification

2012-05-24 Thread MRAB
On 25/05/2012 00:03, Cameron Simpson wrote: On 24May2012 05:32, niksnikunjparmar...@gmail.com wrote: | Hello everyone.. | I am new to asp.net... Time to run away fast before you're commited then:-) You're aware this is a _python_ list/group, yes? | I want to use Regular Expression validator

Re: Dynamic comparison operators

2012-05-24 Thread Steven D'Aprano
On Thu, 24 May 2012 11:22:37 -0400, Colin J. Williams wrote: On 24/05/2012 10:14 AM, mlangenho...@gmail.com wrote: I would like to pass something like this into a function test(val1,val2,'=') and it should come back with True or False. Is there a way to dynamically compare 2 values like

Scoping Issues

2012-05-24 Thread SherjilOzair
def adder(): s = 0 def a(x): s += x return sum return a pos, neg = adder(), adder() for i in range(10): print pos(i), neg(-2*i) This should work, right? Why does it not? Checkout slide no. 37 of a Tour of Go to know inspiration. Just

Re: Email Id Verification

2012-05-24 Thread Paul Rubin
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Why do you want to write buggy code that makes your users hate your program? ... The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO IT. Of course spamming people will make them hate you even more.

Re: Dynamic comparison operators

2012-05-24 Thread Paul Rubin
mlangenho...@gmail.com writes: I would like to pass something like this into a function test(val1,val2,'=') and it should come back with True or False. import operator test(val1, val2, operator.ge) -- http://mail.python.org/mailman/listinfo/python-list

Re: Scoping Issues

2012-05-24 Thread MRAB
On 25/05/2012 02:23, SherjilOzair wrote: def adder(): s = 0 def a(x): s += x return sum return a pos, neg = adder(), adder() for i in range(10): print pos(i), neg(-2*i) This should work, right? Why does it not? Checkout slide no. 37 of a

Re: Email Id Verification

2012-05-24 Thread Steven D'Aprano
On Thu, 24 May 2012 18:35:21 -0700, Paul Rubin wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Why do you want to write buggy code that makes your users hate your program? ... The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO IT. Of course

Re: Scoping Issues

2012-05-24 Thread Steven D'Aprano
On Thu, 24 May 2012 18:23:18 -0700, SherjilOzair wrote: def adder(): s = 0 def a(x): s += x return sum return a I think you mean return s, not sum. This should work, right? Why does it not? No, it shouldn't. When you have an assignment, such as s

Re: Scoping Issues

2012-05-24 Thread Chris Rebert
On Thu, May 24, 2012 at 6:23 PM, SherjilOzair sherjiloz...@gmail.com wrote: def adder():        s = 0        def a(x): Add a nonlocal s declaration right here. See http://www.python.org/dev/peps/pep-3104/            s += x            return sum        return a pos, neg = adder(), adder()

Re: Embedding Python27 in C++ on Windows: CRT compatibility issues with VS2010?

2012-05-24 Thread Mark Hammond
On 25/05/2012 2:10 AM, Stephen Lin wrote: Hello, I'm a relative python newbie but I've been tasked to figure out how to embed calls to a python library in an Excel XLL add-in. The Python/C API for doing this seems pretty straightforward, but I seem to have read somewhere online that it's

Re: Scoping Issues

2012-05-24 Thread Dave Angel
On 05/24/2012 09:23 PM, SherjilOzair wrote: def adder(): s = 0 def a(x): s += x return sum return a pos, neg = adder(), adder() for i in range(10): print pos(i), neg(-2*i) This should work, right? Why does it not? Guess that depends on what

Re: Email Id Verification

2012-05-24 Thread Chris Angelico
On Fri, May 25, 2012 at 11:35 AM, Paul Rubin no.email@nospam.invalid wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Why do you want to write buggy code that makes your users hate your program? ... The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO

Re: Scoping Issues

2012-05-24 Thread Andrew Berg
On 5/24/2012 8:59 PM, Dave Angel wrote: so I fixed that, and got inconsistent use of tabs and spaces in indentation because you mistakenly used tabs for indentation. Not to start another tabs-vs.-spaces discussion, but tabs are perfectly legal indentation in Python. That exception is

Re: Namespace hack

2012-05-24 Thread Steven D'Aprano
Pardon me for breaking threading, but Daniel's response is not available on my ISP's news server, and I only discovered it by accident. On Thu May 24 15:04:34 CEST 2012, Daniel Fetchinson fetchinson at googlemail.com wrote: On Thu, 24 May 2012 08:50:59 +, Steven D'Aprano wrote: From

Is there a custom fields plugin or component of django

2012-05-24 Thread kevon wang
I want to find a plugin of django what it can custom fields in the form. The functions include custom fields in web page and create the fields in database. plugin's flow like these: 1.we can define fields in web page -- 2.create the table in database(table includes all custom fields) --

Re: Help doing it the python way

2012-05-24 Thread Terry Reedy
On 5/24/2012 4:53 PM, Duncan Booth wrote: Scott Sieglerscott.sieg...@gmail.com wrote: Hello, I am an experienced programmer but a beginner to python. As such, I can figure out a way to code most algorithms using more C style syntax. Hi, welcome to Python. I came here from C also. I am

Re: Scoping Issues

2012-05-24 Thread Dave Angel
On 05/24/2012 10:27 PM, Andrew Berg wrote: On 5/24/2012 8:59 PM, Dave Angel wrote: so I fixed that, and got inconsistent use of tabs and spaces in indentation because you mistakenly used tabs for indentation. Not to start another tabs-vs.-spaces discussion, but tabs are perfectly legal

Re: Email Id Verification

2012-05-24 Thread Ben Finney
Paul Rubin no.email@nospam.invalid writes: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Why do you want to write buggy code that makes your users hate your program? ... The only way to validate an email address is to ACTUALLY SEND AN EMAIL TO IT. Of course spamming

Re: Namespace hack

2012-05-24 Thread Temia Eszteri
[Default] On 25 May 2012 02:47:11 GMT, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Do you object to the ability to write standard Python modules? # module.py def spam(obj, n): return len(obj) + n def ham(obj): return spam(obj, 23) By your apparent misunderstanding of

Re: Email Id Verification

2012-05-24 Thread Paul Rubin
Ben Finney ben+pyt...@benfinney.id.au writes: The point is that, having collected the email address, it's useless unless one actually uses it *as an email address*, by sending a message to it. Before then, “validating” it tells you nothing. Right, the only legitimate use of an email address is

Re: Namespace hack

2012-05-24 Thread Chris Angelico
On Fri, May 25, 2012 at 1:02 PM, Temia Eszteri lamial...@cleverpun.com wrote: But then we've got Simple is better than complex, and Complex is better than complicated. Of course if we decided to start iterating through the zen of Python's verses and continually modifying the example code to

[issue14877] No option to run bdist_wininst against newer msvc versions on non-windows systems

2012-05-24 Thread Aaron Staley
Aaron Staley usaa...@gmail.com added the comment: Hi Eric, Quick rundown: There are template 'exe' inside distutils/command. bdist_wininst appends to the template to build a customized installer. First the 64 bit bug: http://bugs.python.org/issue6792 With that bug active, I must be able to

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread mesheb82
New submission from mesheb82 meshe...@gmail.com: I found some unexpected behavior while working with the struct module. import struct This works as expected: struct.pack('1s1s','3','4') '34' In this case, with bad input, the error message says I need 2 arguments, when I provide 2 arguments.

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread mesheb82
mesheb82 meshe...@gmail.com added the comment: Also, I tested this on Windows in Python 3.2.3 and Windows in Python 2.7.2 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14897 ___

[issue14889] PyBytes_FromObject(bytes_object) fails

2012-05-24 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: I also wonder how the buffer interface section can fail. PyBuffer_ToContiguous() should translate to a simple memcpy() for a bytes object. What is going on? -- nosy: +skrah ___ Python tracker

[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: For Python 3.3, _PyUnicodeWriter API is faster than the Py_UCS4 buffer API and PyAccu API in quite all cases, with a speedup between 30% and 100%. But there are some cases where the _PyUnicodeWriter API is slower: Perhaps most of

[issue14889] PyBytes_FromObject(bytes_object) fails

2012-05-24 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: I can't reproduce this, and it was pretty late in my day when I saw it, so let's assume I was mistaken and PyBytes_CheckBuffer() works fine. Nevertheless I think the patch is a good idea--why create a new object when you don't have to?

[issue14890] typo in difflib

2012-05-24 Thread ninsen
ninsen jcsla...@gmail.com added the comment: My bad, closing... -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14890 ___

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Hmm. Yes, that's not very clear. The same message is used both for struct.pack and for Struct.pack (which struct.pack is really just a convenient alias for); it makes a bit more sense for the latter: struct.Struct('1s1s').pack('33')

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: Funny. struct.pack(fmt, args...) is just an alias to struct.Struct(fmt).pack(args...). The error message should be changed to explicitly state that we are talking about the data for packing, and not about the arguments of function. Or

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: It might help if the error message also stated how many arguments were actually received, like the TypeError message already does for bad function / method calls. E.g., struct.error: pack expected 2 items for packing (got 1) --

[issue14894] distutils.LooseVersion fails to compare number and a word

2012-05-24 Thread Natalia
Natalia natalia.frydr...@gmail.com added the comment: Hello, as a GSoC student, I'm working on PyPI to Debian repository converter. I wanted to compare  versions of packages available in PyPI and it broke while comparing appwsgi, wsgi-design ('default') and gar ('prototype.1') versions.

[issue5767] xmlrpclib expat

2012-05-24 Thread Phil Daintree
Changes by Phil Daintree phildaint...@gmail.com: -- title: xmlrpclib loads invalid documents - xmlrpclib expat versions: +Python 2.7 -Python 2.5, Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5767

[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2012-05-24 Thread Phil Daintree
Phil Daintree phildaint...@gmail.com added the comment: The field in question contains the utf-8 text: PEÇAS -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11804 ___

[issue14855] IPv6 support for logging.handlers

2012-05-24 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Or should it go to the separate ticket? Yes, please. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14855 ___

[issue14897] struct.pack raises unexpected error message

2012-05-24 Thread Serhiy Storchaka
Serhiy Storchaka storch...@gmail.com added the comment: It might help if the error message also stated how many arguments were actually received, like the TypeError message already does for bad function / method calls. E.g., struct.error: pack expected 2 items for packing (got 1) Yes,

[issue14744] Use _PyUnicodeWriter API in str.format() internals

2012-05-24 Thread STINNER Victor
STINNER Victor victor.stin...@gmail.com added the comment: For Python 3.3, _PyUnicodeWriter API is faster than the Py_UCS4 buffer API and PyAccu API in quite all cases, with a speedup between 30% and 100%. But there are some cases where the _PyUnicodeWriter API is slower: Perhaps most of

[issue14814] Implement PEP 3144 (the ipaddress module)

2012-05-24 Thread Hynek Schlawack
Hynek Schlawack h...@ox.cx added the comment: Here is a patch with some more pep8-wankery + some dead code removal. Feel free to add only what you like, no hard feelings. :) -- Added file: http://bugs.python.org/file25694/ipaddress-pep8-and-dead-code.diff

[issue14886] json C vs pure-python implementation difference

2012-05-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: class pseudo_list(object): __class__ = list # fake isinstance Why not inherit from list directly? Setting __class__ to something else isn't widely supported in the Python code base. It may work or may not work, depending on the API, but

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Sasha B
New submission from Sasha B sbermeis...@gmail.com: Not sure if this is predicted behaviour, but if I make a dict like: x = {0: 'bar', True: 'foo'} and modify True with 1, or 0 with False: x[False] = 'boo' x[1] = 'far' the modifications happen: x {0: 'boo', True: 'far'} Is this expected

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Sasha B
Changes by Sasha B sbermeis...@gmail.com: -- components: +Build type: - behavior versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14898 ___

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks for the report. Yes, this is expected. Dictionary membership is based on equality of keys. Since True and 1 are equal, only one of them can be present in a dictionary at a time (and a key lookup works with either). x = {0: 'bar'}

[issue14898] Dict collision on boolean and integer values

2012-05-24 Thread Sasha B
Sasha B sbermeis...@gmail.com added the comment: Ahh, I see. You are correct. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14898 ___

[issue14822] Build unusable when compiled for Win 64-bit release

2012-05-24 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: I tested against the latest tip and the issue no longer exists. -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14822

[issue14821] _ctypes and other modules not built with msbuild on vs2010 solution

2012-05-24 Thread Jason R. Coombs
Jason R. Coombs jar...@jaraco.com added the comment: Excellent! The latest tip now builds nicely using msbuild. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14821

[issue14899] Naming conventions and guidelines for packages and namespace packages

2012-05-24 Thread Benoît Bryon
New submission from Benoît Bryon ben...@marmelune.net: Scope: * Python documentation lacks conventions, or at least guidelines, to choose a name for a package. * Python has tools to create and distribute packages. Not covered by this issue. * Python has tools to create namespace packages.

[issue11804] expat parser not xml 1.1 (breaks xmlrpclib)

2012-05-24 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes, but where does this data come from? how did you feed it to the parser? And this does not relate to xml 1.1. BTW, I found this page about XML 1.1: http://www.cafeconleche.org/books/effectivexml/chapters/03.html Everything you

[issue14899] Naming conventions and guidelines for packages and namespace packages

2012-05-24 Thread Benoît Bryon
Benoît Bryon ben...@marmelune.net added the comment: Use branch doc-package-names (not only conventions) instead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14899 ___

  1   2   >