makefile based python build

2013-02-12 Thread Antonio Cavallo
Hi, I'm releasing my first attempt to cross compile python on android using a simple makefile based build system: https://bitbucket.org/cavallo71/android As side effect it can also build on a gcc based system as (linux so far). The attempt was started in order to simplify the build

ANN: Training - Professional Testing with pytest and tox

2013-02-12 Thread Mike Müller
Professional Testing with pytest and tox What: An in-depth pytest and tox course When: June 24 - 26, 2013 Where: Python Academy, Leipzig, Germany Who: Holger Krekel Details: http://www.python-academy.com/courses/specialtopics/python_course_testing.html

ANN: Twisted Training - Three days to untwist the framework

2013-02-12 Thread Mike Müller
Twisted Training What: An in-depth Twisted course When: September 9 - 11, 2013 Where: Python Academy, Leipzig, Germany Who: Laurens Van Houtven Details: http://www.python-academy.com/courses/specialtopics/python_course_twisted.html Twisted [1] is a powerful framework to develop

Re: LangWart: Method congestion from mutate multiplicty

2013-02-12 Thread Jean-Michel Pichavant
Yeah, this is, pardon the french, just batshit crazy. huh ? :) JM -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the

Web Testing Frameworks

2013-02-12 Thread Greg Lindstrom
Hello, I'm not wanting to start anything here, but I am wanting to automate testing of my Django-based websites. A quick search on Google turns up a number of packages and I would like to know if any stand out from the others? Our main sites are used to display a customer dashboard, so my

Re: LangWart: Method congestion from mutate multiplicty

2013-02-12 Thread Chris Angelico
On Mon, Feb 11, 2013 at 8:52 PM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Yeah, this is, pardon the french, just batshit crazy. huh ? :) You're French, ergo you are pardoned. Makes good sense to me! :) ChrisA Cheshire was right, we're all mad here... --

Re: call from pthon to shell

2013-02-12 Thread Andrew Robinson
On 02/12/2013 05:38 AM, Bqsj Sjbq wrote: import os os.system(i=3) 0 os.system(echo $i) 0 why i can not get the value of i? First: os.system is only defined to give the return value (exit code) of the sub-process. However, one way to get the output of shell commands is to use

Re: call shell from python

2013-02-12 Thread spilcm
On Tuesday, February 12, 2013 6:13:38 AM UTC+1, contro opinion wrote: import os os.system(i=3) 0 os.system(echo $i) 0 how can i get the value of  i? You may want to take a look at the pexcpect module : http://www.noah.org/wiki/pexpect --

UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Magnus Pettersson
I am using Eclipse to write my python scripts and when i run them from inside eclipse they work fine without errors. But almost in every script that handle some form of special characters like swedish åäö and chinese characters etc i get Unicode errors when running the script externally with

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Andrew Berg
On 2013.02.12 04:43, Magnus Pettersson wrote: I am using Eclipse to write my python scripts and when i run them from inside eclipse they work fine without errors. But almost in every script that handle some form of special characters like swedish åäö and chinese characters etc i get

Re: how to call shell?

2013-02-12 Thread Albert Hopkins
On Tue, Feb 12, 2013, at 12:12 AM, contro opinion wrote: import os os.system(i=3) 0 os.system(echo $i) 0 why i can't get the value of i ? Whenever you call os.system, a new shell is created and the command is run, system() then waits for the command to complete. You don't see i

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Steven D'Aprano
Magnus Pettersson wrote: I am using Eclipse to write my python scripts and when i run them from inside eclipse they work fine without errors. But almost in every script that handle some form of special characters like swedish åäö and chinese characters etc A comment: they are not special

Python3 exec locals - this must be a FAQ

2013-02-12 Thread Helmut Jarausch
Hi, I've tried but didn't find an answer on the net. The exec function in Python modifies a copy of locals() only. How can I transfer changes in that local copy to the locals of my function ** without ** knowing the names of these variables. E.g. I have a lot of local names. Doing _locals=

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Magnus Pettersson
Ahh so its the actual printing that makes it error out outside of eclipse because its a different terminal that its printing to. Its the default DOS terminal in windows that runs then i run the script with python.exe and i guess its the same when i run with pythonw.exe just that the terminal

Generate 16+MAX_WBITS decompressable data

2013-02-12 Thread Fayaz Yusuf Khan
I'm trying write unit-tests for some of my old code and have run into this piece of code. dcomp = zlib.decompressobj(16+zlib.MAX_WBITS) chunk = ''.join(f.chunks()) received_data = dcomp.decompress(chunk) How do I generate the chunk here? From what I've been trying I'm getting this exception:

how to add socks proxy feature to script based on requests module?

2013-02-12 Thread xliiv
Hi! I've go a script which uses python requests (http://docs.python-requests.org/en/latest/). I need to add to it socks proxy feature. AFAIK requests doesn't support socks proxy (http://stackoverflow.com/questions/12601316/how-to-make-python-requests-work-via-socks-proxy) so i was about to

Re: Python3 exec locals - this must be a FAQ

2013-02-12 Thread Dave Angel
On 02/12/2013 06:46 AM, Helmut Jarausch wrote: Hi, I've tried but didn't find an answer on the net. The exec function in Python modifies a copy of locals() only. How can I transfer changes in that local copy to the locals of my function ** without ** knowing the names of these variables.

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Magnus Pettersson
I have tried now to take away printing to terminal and just keeping the writing to a .txt file to disk (which is what the scripts purpose is): with open(filepath,a) as f: for card in cardlist: f.write(card+\n) The file it writes to exists and im just appending to it, but when i run

Re: Python3 exec locals - this must be a FAQ

2013-02-12 Thread Helmut Jarausch
On Tue, 12 Feb 2013 08:27:41 -0500, Dave Angel wrote: On 02/12/2013 06:46 AM, Helmut Jarausch wrote: Hi, I've tried but didn't find an answer on the net. The exec function in Python modifies a copy of locals() only. How can I transfer changes in that local copy to the locals of my

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Peter Otten
Magnus Pettersson wrote: I have tried now to take away printing to terminal and just keeping the writing to a .txt file to disk (which is what the scripts purpose is): with open(filepath,a) as f: for card in cardlist: f.write(card+\n) The file it writes to exists and im just

A newbie question

2013-02-12 Thread Alberto Salvati
Hi, All. I'm a (old) delphi developer. I want to learn Python. I've python 2.7 and django. For learning purpose I want to use firebird. But, package (egg) to use firebird needs easy_install for setup. When i run: python ez_setup.py install python says me error: Downloading

Re: Awsome Python - chained exceptions

2013-02-12 Thread Terry Reedy
On 2/12/2013 1:15 AM, Steven D'Aprano wrote: As an antidote to the ill-informed negativity of Ranting Rick's illusionary PyWarts, I thought I'd present a few of Python's more awesome features, starting with exception contexts. You do not need Rick to justify such an informative post. If

Re: Python3 exec locals - this must be a FAQ

2013-02-12 Thread MRAB
On 2013-02-12 13:27, Dave Angel wrote: On 02/12/2013 06:46 AM, Helmut Jarausch wrote: Hi, I've tried but didn't find an answer on the net. The exec function in Python modifies a copy of locals() only. How can I transfer changes in that local copy to the locals of my function ** without **

Re: string.replace doesn't removes :

2013-02-12 Thread vduncan80
On Sunday, February 10, 2013 4:36:53 AM UTC-6, Johannes Bauer wrote: On 09.02.2013 12:04, Joshua Robinson wrote: Hi *Monte-Pythons*, x = this is a simple : text: that has colon s = x.replace(string.punctuation, ); OR s = x.replace(string.punctuation, ); print x # 'this

Re: Web Testing Frameworks

2013-02-12 Thread John Gordon
In mailman.1689.1360655922.2939.python-l...@python.org Greg Lindstrom gslindst...@gmail.com writes: I'm not wanting to start anything here, but I am wanting to automate testing of my Django-based websites. A quick search on Google turns up a Have you looked at using the built-in django test

Re: Logwatch python

2013-02-12 Thread Jean-Michel Pichavant
- Original Message - In article 1de56e5b-4f9b-477d-a1d4-71e7222a2...@googlegroups.com, Cleuson Alves cleuso...@gmail.com wrote: Hello, I am trying to run this code, but I get an answer incorrect arguments numbers. someone could put an example of arguments for me to use in the

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Magnus Pettersson
Are you sure you are writing the same data? That would mean that pydev changes the default encoding -- which is evil. A portable approach would be to use codecs.open() or io.open() instead of the built-in: import io with io.open(filepath, a) as f: ...

buffers and memoryviews

2013-02-12 Thread Demian Brecht
I didn't know a whole lot (read: nothing) about buffers and memoryviews before digging into the C side of Python. Once I found them, ran into some of the 2.7 ugliness of having /both/ buffers and memoryviews available and found the tremendous usefulness in them, I decided to write a blog post. In

Re: Generate 16+MAX_WBITS decompressable data

2013-02-12 Thread Terry Reedy
On 2/12/2013 7:47 AM, Fayaz Yusuf Khan wrote: I'm trying write unit-tests for some of my old code and have run into this piece of code. dcomp = zlib.decompressobj(16+zlib.MAX_WBITS) Since zlib.MAX_WBITS is the largest value that should be passed (15), adding 16 makes no sense. Since it is

Re: Python3 exec locals - this must be a FAQ

2013-02-12 Thread Dave Angel
On 02/12/2013 09:29 AM, Helmut Jarausch wrote: On Tue, 12 Feb 2013 08:27:41 -0500, Dave Angel wrote: On 02/12/2013 06:46 AM, Helmut Jarausch wrote: Hi, I've tried but didn't find an answer on the net. The exec function in Python modifies a copy of locals() only. How can I transfer changes

Re: buffers and memoryviews

2013-02-12 Thread MRAB
On 2013-02-12 15:25, Demian Brecht wrote: I didn't know a whole lot (read: nothing) about buffers and memoryviews before digging into the C side of Python. Once I found them, ran into some of the 2.7 ugliness of having /both/ buffers and memoryviews available and found the tremendous usefulness

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Peter Otten
Magnus Pettersson wrote: io.open() uses UTF-8 by default, but you can specify other encodings with io.open(filepath, mode, encoding=whatever). Interesting. Pydev must be doing something behind the scenes because when i changed open() to io.open() i get error inside of eclipse now:

Re: Python3 exec locals - this must be a FAQ

2013-02-12 Thread Terry Reedy
On 2/12/2013 8:27 AM, Dave Angel wrote: On 02/12/2013 06:46 AM, Helmut Jarausch wrote: I've tried but didn't find an answer on the net. You should start with the fine manual, which is on the net as well as included with at least the Windows distribution. It has a nice index that includes

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Dave Angel
On 02/12/2013 10:29 AM, Magnus Pettersson wrote: Are you sure you are writing the same data? That would mean that pydev changes the default encoding -- which is evil. A portable approach would be to use codecs.open() or io.open() instead of the built-in: import io with io.open(filepath,

Re: A newbie question

2013-02-12 Thread Colin J. Williams
On 12/02/2013 10:06 AM, Alberto Salvati wrote: Hi, All. I'm a (old) delphi developer. I want to learn Python. I've python 2.7 and django. For learning purpose I want to use firebird. But, package (egg) to use firebird needs easy_install for setup. When i run: python ez_setup.py install

Re: A newbie question

2013-02-12 Thread Alberto Salvati
Hi, Colin. Thanks for your answer. But C:\Python27\Scripts is in my path and my trouble is about INSTALL easy_isntall. Bye A. -- http://mail.python.org/mailman/listinfo/python-list

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Terry Reedy
On 2/12/2013 7:34 AM, Magnus Pettersson wrote: Ahh so its the actual printing that makes it error out outside of eclipse because its a different terminal that its printing to. Its the default DOS terminal in windows that runs then i run the script with python.exe and i guess its the same when i

Re: Python3 exec locals - this must be a FAQ

2013-02-12 Thread Dave Angel
On 02/12/2013 10:50 AM, Terry Reedy wrote: On 2/12/2013 8:27 AM, Dave Angel wrote: On 02/12/2013 06:46 AM, Helmut Jarausch wrote: snip Doing _locals= locals() This merely gives you a handle of the dict returned by locals() for when you want to do more than just pass it to (for example)

Re: buffers and memoryviews

2013-02-12 Thread Demian Brecht
I guess I /should/ have written it with current releases.. My 3 is current dev source :P Demian Brecht http://demianbrecht.github.com On 2013-02-12 7:42 AM, MRAB pyt...@mrabarnett.plus.com wrote: On 2013-02-12 15:25, Demian Brecht wrote: I didn't know a whole lot (read: nothing) about

Installing Apache 2 and mod_wsgi on CentOS?

2013-02-12 Thread Gilles
Hello Before I go ahead, I'd like to make sure I'm doing it the right away: 1. yum install httpd mod_wsgi 2. Edit /etc/sysconfig/httpd to uncomment this line to get Apache to run as worker MPM: #HTTPD=/usr/sbin/httpd.worker 3. Edit mod_wsgi 4. Build a test WSGI Python script 5. Start Apache,

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Magnus Pettersson
What encoding is this file? Since you're appending to it, you really need to match the pre-existing encoding, or the next program to deal with it is in big trouble. So using the io.open() without the encoding= keyword is probably a mistake. The .txt file is in UTF-8 I have got it

Re: Implicit conversion to boolean in if and while statements

2013-02-12 Thread Rick Johnson
On Monday, February 11, 2013 11:55:19 PM UTC-6, Chris Angelico wrote: On Tue, Feb 12, 2013 at 12:06 PM, 8 Dihedral wrote: A permanently mutated list is a tuple of constant objects. I nominate this line as bemusing head-scratcher of the week. Actually the statement is fact IF you can grok

Re: Awsome Python - chained exceptions

2013-02-12 Thread Zero Piraeus
: On 12 February 2013 02:15, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: As an antidote to the ill-informed negativity of Ranting Rick's illusionary PyWarts, I thought I'd present a few of Python's more awesome features [...] You could call them PyW00ts. -[]z. --

Re: Awsome Python - chained exceptions

2013-02-12 Thread Ethan Furman
On 02/12/2013 10:01 AM, Zero Piraeus wrote: On 12 February 2013 02:15, Steven D'Aprano wrote: As an antidote to the ill-informed negativity of Ranting Rick's illusionary PyWarts, I thought I'd present a few of Python's more awesome features [...] You could call them PyW00ts. +1 QOTW --

A better way to accomplish loop

2013-02-12 Thread Joseph L. Casale
I have an issue with some code I have been passed: for (x, y) in [(a_dict1, a_tuple[0]), (a_dict2, a_tuple[1])]: I only noticed it as PyCharm failed to assign the str type to y, whereas it knew the tuples 0 and 1 item were type str. In the loop it flags the passing of y into a method that

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Fabio Zadrozny
Just to note, PyDev does something behind the scenes (it sets the encoding for the console). You may specify which encoding you want at your launch configuration (in the 'common' tab you can set the encoding you want for the shell). Cheers, Fabio On Tue, Feb 12, 2013 at 3:12 PM, Magnus

Re: A better way to accomplish loop

2013-02-12 Thread Dave Angel
On 02/12/2013 02:59 PM, Joseph L. Casale wrote: I have an issue with some code I have been passed: I had to read it about four times before I knew what you were saying. Maybe I still have it wrong. for (x, y) in [(a_dict1, a_tuple[0]), (a_dict2, a_tuple[1])]: I only noticed it as

Re: Generate 16+MAX_WBITS decompressable data

2013-02-12 Thread Marc Christiansen
Terry Reedy tjre...@udel.edu wrote: On 2/12/2013 7:47 AM, Fayaz Yusuf Khan wrote: dcomp = zlib.decompressobj(16+zlib.MAX_WBITS) Since zlib.MAX_WBITS is the largest value that should be passed (15), adding 16 makes no sense. Since it is also the default, there is also no point in providing

Re: LangWart: Method congestion from mutate multiplicty

2013-02-12 Thread Rick Johnson
On Monday, February 11, 2013 11:28:57 PM UTC-6, zipher wrote: [...] Yeah, this is where one has to consider the idea of a unified data model (a sort of OOPv2). Right now, it's all confused because people are using their own internal, subconscious ideas of data. Indeed! The current

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Dave Angel
On 02/12/2013 12:12 PM, Magnus Pettersson wrote: snip #Here kanji = u私 baseurl = uhttp://www.romajidesu.com/kanji/; url = baseurl+kanji savefile([url]) #this test works now. uses: io.open(filepath, a,encoding=UTF-8) as f: # This made the fetching of the website work. You don't show the

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread MRAB
On 2013-02-12 14:24, Magnus Pettersson wrote: I have tried now to take away printing to terminal and just keeping the writing to a .txt file to disk (which is what the scripts purpose is): with open(filepath,a) as f: for card in cardlist: f.write(card+\n) The file it writes to

Re: Implicit conversion to boolean in if and while statements

2013-02-12 Thread Chris Angelico
On Wed, Feb 13, 2013 at 4:48 AM, Rick Johnson rantingrickjohn...@gmail.com wrote: Your confusion may stem from interpreting constant as the CS term CONSTANT[1]; whereby the objects in the tuple are programming CONSTANTS, that is, unable to change. Uhh, yeah. Not being Humpty Dumpty, I

RE: A better way to accomplish loop

2013-02-12 Thread Joseph L. Casale
I think you're saying that the lint-feature of PyCharm is trying to  guess the object types, and telling you there's a conflict here.  I don't think you're saying that it executes incorrectly. Hah, yeah sorry Dave that's it.  Still there are ways to express it differently, and maybe one of

Re: Python3 exec locals - this must be a FAQ

2013-02-12 Thread Steven D'Aprano
Dave Angel wrote: Thanks for this hint which surprises me again since I thought locals() by itself is a copy only. (Thanks MRAB for your correction.) As MRAB points out, I was in error on this point.  I only tested it in global scope.  Inside a function it doesn't seem to work. One of

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Steven D'Aprano
Magnus Pettersson wrote: # This made the fetching of the website work. Why did i have to write # url.encode(UTF-8) when url already is unicode? I feel i dont have a # good understanding of this. page = urllib2.urlopen(url.encode(UTF-8)) Start here: The Absolute Minimum Every Software

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Magnus Pettersson
You don't show the code that actually does the io.open(), nor the url.encode, so I'm not going to guess what you're actually doing. Hmm im not sure what you mean but I wrote all code needed in a previous post so maybe you missed that one :) In short I basically just have: import io

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Magnus Pettersson
Thanks a lot Steven, you gave me a good AHA experience! :) Now I understand why I had to use encoding when calling the urllib2! So basically Eclipse PyDev does this in the background for me, and its console supports utf-8, so thats why i never had to think about it before (and why some scripts

Python Makefiles... are they possible?

2013-02-12 Thread Malcolm White
I have written a piece of code that will be part of a larger repository of related programs. Within this repository, it is standard to issue a 'make' command to compile any desired program. Is it possible to create a Makefile to compile a simple Python program? Based on what I have come across

Re: Python Makefiles... are they possible?

2013-02-12 Thread Joel Goldstick
On Tue, Feb 12, 2013 at 7:44 PM, Malcolm White white@gmail.com wrote: I have written a piece of code that will be part of a larger repository of related programs. Within this repository, it is standard to issue a 'make' command to compile any desired program. Is it possible to create a

Re: Python Makefiles... are they possible?

2013-02-12 Thread Oscar Benjamin
On 13 February 2013 00:44, Malcolm White white@gmail.com wrote: I have written a piece of code that will be part of a larger repository of related programs. Within this repository, it is standard to issue a 'make' command to compile any desired program. Is it possible to create a Makefile

Re: Python Makefiles... are they possible?

2013-02-12 Thread Roy Smith
In article mailman.1731.1360717275.2939.python-l...@python.org, Oscar Benjamin oscar.j.benja...@gmail.com wrote: On 13 February 2013 00:44, Malcolm White white@gmail.com wrote: I have written a piece of code that will be part of a larger repository of related programs. Within this

Re: Implicit conversion to boolean in if and while statements

2013-02-12 Thread 88888 Dihedral
Rick Johnson於 2013年2月13日星期三UTC+8上午1時48分07秒寫道: On Monday, February 11, 2013 11:55:19 PM UTC-6, Chris Angelico wrote: On Tue, Feb 12, 2013 at 12:06 PM, 8 Dihedral wrote: A permanently mutated list is a tuple of constant objects. I nominate this line as bemusing head-scratcher

Re: Awsome Python - chained exceptions

2013-02-12 Thread Rick Johnson
On Tuesday, February 12, 2013 12:15:29 AM UTC-6, Steven D'Aprano wrote: [snip inflammatory remarks] I thought I'd present a few of Python's more awesome features, starting with exception contexts. Well that's great idea, however, in order to find this very valuable information the searcher

Re: Awsome Python - chained exceptions

2013-02-12 Thread Rick Johnson
On Tuesday, February 12, 2013 12:01:45 PM UTC-6, Zero Piraeus wrote: You could call them PyW00ts. +1 on the name -INFINITY on the execution Actually i am happy that DeAprano used the unintuitive tag now. Bad enough to use an unintuitive tag. Worse to misspell it. But it would been a crime to

Re: UnicodeEncodeError when not running script from IDE

2013-02-12 Thread Dave Angel
On 02/12/2013 07:20 PM, Magnus Pettersson wrote: You don't show the code that actually does the io.open(), nor the url.encode, so I'm not going to guess what you're actually doing. Hmm im not sure what you mean but I wrote all code needed in a previous post so maybe you missed that one :)

Re: Awsome Python - chained exceptions

2013-02-12 Thread Michael Torrie
On 02/12/2013 07:47 PM, Rick Johnson wrote: ...Oh Steven, if you only knew how we interpreted the Oops!, more like Doh!. You keep using that word. I do not think it means what you think it means. Got any more bright ideas DeAprano? (Oh gawd that felt

Re: string.replace doesn't removes :

2013-02-12 Thread Rick Johnson
On Saturday, February 9, 2013 5:04:18 AM UTC-6, Joshua Robinson wrote: Hi Monte-Pythons, x = this is a simple : text: that has colon s = x.replace(string.punctuation, ); OR s = x.replace(string.punctuation, ); print x # 'this is a simple : text: that has colon' # The colon is still

Re: Generate 16+MAX_WBITS decompressable data

2013-02-12 Thread Fayaz Yusuf Khan
Marc Christiansen wrote: Try using a compressobj with 24 = wbits 32. It should work, but I didn't try. Er, the problem is that compressobj doesn't accept a WBIT argument. -- Fayaz Yusuf Khan Cloud architect, Dexetra SS, India fayaz.yusuf.khan_AT_gmail_DOT_com, fayaz_AT_dexetra_DOT_com

Re: string.replace doesn't removes :

2013-02-12 Thread Rick Johnson
On Tuesday, February 12, 2013 10:44:09 PM UTC-6, Rick Johnson wrote: REFERENCES: [1]: Should string.replace handle list, tuple and dict arguments in addition to strings?

Re: Python Makefiles... are they possible?

2013-02-12 Thread Steven D'Aprano
On Tue, 12 Feb 2013 20:06:35 -0500, Roy Smith wrote: One thing we do in our Makefiles is find . -name '*.pyc' | xargs rm. It avoids all sorts of nasty and hard to track down bugs (consider what happens if you move a .py file from one place in your source tree to another and leave the old .pyc

Re: Generate 16+MAX_WBITS decompressable data

2013-02-12 Thread Terry Reedy
On 2/13/2013 12:18 AM, Fayaz Yusuf Khan wrote: Marc Christiansen wrote: Try using a compressobj with 24 = wbits 32. It should work, but I didn't try. Er, the problem is that compressobj doesn't accept a WBIT argument. Changed in version 3.3: Added the method, wbits, memlevel, strategy and

Re: Awsome Python - chained exceptions

2013-02-12 Thread Chris Angelico
On Wed, Feb 13, 2013 at 1:47 PM, Rick Johnson rantingrickjohn...@gmail.com wrote: On Tuesday, February 12, 2013 12:15:29 AM UTC-6, Steven D'Aprano wrote: If you've ever written an exception handler, you've probably written a *buggy* exception handler: def getitem(items, index): #

Re: string.replace doesn't removes :

2013-02-12 Thread jmfauth
On 13 fév, 06:26, Rick Johnson rantingrickjohn...@gmail.com wrote: On Tuesday, February 12, 2013 10:44:09 PM UTC-6, Rick Johnson wrote:  REFERENCES: [1]: Should

Re: Awsome Python - chained exceptions

2013-02-12 Thread Michael Torrie
On Feb 13, 2013 12:00 AM, Chris Angelico ros...@gmail.com wrote: Which word? we? I'm not entirely sure, given that non-monospaced fonts get in the way. Normally people would put exactly as many carets/tildes as there are letters in the word, but aligning the text in a mono font puts the

[issue17190] _FAST opcodes do no range checking

2013-02-12 Thread Larry Hastings
Larry Hastings added the comment: I'm not surprised it was discussed to death long ago. And I can get behind wontfix. But let me just say that a) I think an uncrashable Python interpreter is a laudable goal, and steps we can take towards that should not be dismissed out of hand. b) I doubt

[issue12077] Harmonizing descriptor protocol documentation

2013-02-12 Thread Raymond Hettinger
Changes by Raymond Hettinger raymond.hettin...@gmail.com: -- assignee: rhettinger - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12077 ___ ___

[issue17136] ctypes tests fail with clang on non-OS X

2013-02-12 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: libffi-3.0.12 has been released with that fix. Perhaps that should be included in future Python releases? -- nosy: +benjamin.peterson, georg.brandl, larry priority: normal - release blocker ___ Python tracker

[issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions

2013-02-12 Thread Torsten Bronger
Changes by Torsten Bronger bron...@physik.rwth-aachen.de: -- nosy: +bronger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9400 ___ ___

[issue917120] imaplib: incorrect quoting in commands

2013-02-12 Thread Mauro Cicognini
Mauro Cicognini added the comment: The removal of the dead code causes imaplib under py3k to lose the quoting functionality that is described in documentation (except for passwords, that do get always quoted as stated). I submit that we give at least a temporary warning in the docs, and that

[issue17191] pdb list shows unexpected code when stack frame includes a try / finally block

2013-02-12 Thread Abram Clark
New submission from Abram Clark: The list command in pdb shows an unexpected portion of code after an up command enters a try / finally block in the call stack. To reproduce: pdb pdb_list_bug_reproduce.py c up list Expected behavior: Show 11 lines around line 8, throw_something(), which was

[issue17170] string method lookup is too slow

2013-02-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I left some comments on Rietveld. I wonder if PyArg_ParseTupleAndKeywords can be replaced by something that would compute and cache the set of keywords; a bit like _Py_IDENTIFIER. -- nosy: +amaury.forgeotdarc

[issue9285] Add a profile decorator to profile and cProfile

2013-02-12 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9285 ___ ___

[issue17130] Add runcall() function to profile.py and cProfile.py

2013-02-12 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17130 ___ ___

[issue17187] Python segfaults from improperly formed and called function

2013-02-12 Thread Ramchandra Apte
Ramchandra Apte added the comment: Perhaps types.CodeType should refuse to generate the malformed code object in the first place? Yup. -- nosy: +ramchandra.apte ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17187

[issue17189] Add zip64 support to shutil

2013-02-12 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- stage: - patch review versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17189 ___

[issue17172] Add turtledemo to IDLE menu

2013-02-12 Thread Ramchandra Apte
Ramchandra Apte added the comment: Attached is a patch. I hope the File menu is the right place for this. I had to move the code in Lib/turtledemo.py after if __name__ ==... into main(). -- ___ Python tracker rep...@bugs.python.org

[issue17172] Add turtledemo to IDLE menu

2013-02-12 Thread Ramchandra Apte
Changes by Ramchandra Apte maniandra...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file29048/issue.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17172 ___

[issue17172] Add turtledemo to IDLE menu

2013-02-12 Thread Ramchandra Apte
Ramchandra Apte added the comment: Should this be added to Lib/idlelib/NEWS.txt ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17172 ___ ___

[issue17192] libffi-3.0.12 import

2013-02-12 Thread Matthias Klose
New submission from Matthias Klose: issue for tracking the libffi-3.0.12 import. checked that builds on x86_64-linux-gnu and arm-linux-gnueabihf do work. still needs updating/checking the extra copies of: - libffi_arm_wince - libffi_msvc - libffi_osx -- components: Extension

[issue917120] imaplib: incorrect quoting in commands

2013-02-12 Thread R. David Murray
R. David Murray added the comment: I don't understand what you mean by removing dead code leading to loss of functionality, unless you mean that the removal of the call to the quoting code in Python3 led to a loss of functionality relative to Python2, in which case I agree. It also led to

[issue17192] libffi-3.0.12 import

2013-02-12 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7727be7613f9 by doko in branch 'default': - Issue #17192: Import libffi-3.0.12. http://hg.python.org/cpython/rev/7727be7613f9 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue17136] ctypes tests fail with clang on non-OS X

2013-02-12 Thread Matthias Klose
Matthias Klose added the comment: libffi-3.0.12 is now imported, tracked in issue #17192. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17136 ___

[issue17192] libffi-3.0.12 import

2013-02-12 Thread Matthias Klose
Changes by Matthias Klose d...@debian.org: -- nosy: +ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17192 ___ ___ Python-bugs-list

[issue17192] libffi-3.0.12 import

2013-02-12 Thread Ronald Oussoren
Ronald Oussoren added the comment: libffi_osx is not a copy of the regular libffi, but a (fairly old) fork. I don't know how far the two branches have diverged. An important feature of liffi_osx is that is compiles cleanly when all intel and ppc related sources are compiled with '-arch ppc

[issue17193] Use binary prefixes

2013-02-12 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Starting around 1998, a number of standards and trade organizations approved standards and recommendations for a new set of binary prefixes that would refer unambiguously to powers of 1024. According to these, the SI prefixes would only be used in the

[issue9285] Add a profile decorator to profile and cProfile

2013-02-12 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: A preliminary patch for cProfile.py is in attachment. Will make changes to profile.py later. -- Added file: http://bugs.python.org/file29050/profile.patch ___ Python tracker rep...@bugs.python.org

[issue17187] Python segfaults from improperly formed and called function

2013-02-12 Thread Benjamin Peterson
Benjamin Peterson added the comment: In general, you can generate whatever junky bytecode you want, and the eval loop will happy crash itself. Your on your own when screwing with types.CodeType. -- nosy: +benjamin.peterson ___ Python tracker

[issue17193] Use binary prefixes

2013-02-12 Thread Brett Cannon
Brett Cannon added the comment: Patch looks good except for the consistent lack of space between number and unit, e.g. 5MiB instead of 5 MiB. Is there a reason for this? -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org

[issue17170] string method lookup is too slow

2013-02-12 Thread Guido van Rossum
Guido van Rossum added the comment: What's the status of Argument Clinic? Won't that make this obsolete? --Guido van Rossum (sent from Android phone) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17170

[issue17194] operator.attrgetter is slower than a lambda

2013-02-12 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- title: operator.attrgetter is slow - operator.attrgetter is slower than a lambda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17194

  1   2   >