ANN: dh-virtualenv 0.8 released

2014-10-02 Thread Jyrki Pulliainen
Hello, I'm pleased to announce that we at Spotify have released dh-virtualenv 0.8! Dh-virtualenv is a packaging tool that makes it possible to package virtualenvs inside Debian packages. dh-virtualenv works by registering itself as a part of debhelper sequence, so pretty much any pre-existing

Re: JSON-encoding very long iterators

2014-10-02 Thread Alfred Morgan
On Wednesday, October 1, 2014 3:55:19 PM UTC-7, Chris Angelico wrote: At some point, you'll have to port your patch to the latest codebase Okay, done. https://github.com/Zectbumo/cpython/compare/master Iterators for JSON is now Python 3 ready. --

Re: JSON-encoding very long iterators

2014-10-02 Thread Chris Angelico
On Thu, Oct 2, 2014 at 4:05 PM, Alfred Morgan alf...@54.org wrote: On Wednesday, October 1, 2014 3:55:19 PM UTC-7, Chris Angelico wrote: At some point, you'll have to port your patch to the latest codebase Okay, done. https://github.com/Zectbumo/cpython/compare/master Iterators for JSON is

Re: JSON-encoding very long iterators

2014-10-02 Thread Alfred Morgan
Excellent, thank you. http://bugs.python.org/issue14573 -alfred -- https://mail.python.org/mailman/listinfo/python-list

Re: Obscuring Python source from end users

2014-10-02 Thread Terry Reedy
On 10/2/2014 1:17 AM, Marko Rauhamaa wrote: Dan Stromberg drsali...@gmail.com: On Mon, Sep 29, 2014 at 4:47 AM, Steven D'Aprano Yes. Distribute the pyc files only. Yes, this is the way it's usually done. Has the .pyc file format stabilized? No. The cache files are binary specific and

Re: Obscuring Python source from end users

2014-10-02 Thread Steven D'Aprano
Marko Rauhamaa wrote: Dan Stromberg drsali...@gmail.com: On Mon, Sep 29, 2014 at 4:47 AM, Steven D'Aprano Yes. Distribute the pyc files only. Yes, this is the way it's usually done. Has the .pyc file format stabilized? A decade ago, my employer shipped an application as .pyc files but

Re: Obscuring Python source from end users

2014-10-02 Thread Johannes Bauer
On 29.09.2014 16:53, Sturla Molden wrote: Chris Angelico ros...@gmail.com wrote: I have a project that involves distributing Python code to users in an organisation. Users do not interact directly with the Python code; they only know this project as an Excel add-in. Now, internal audit

Re: Function passed as an argument returns none

2014-10-02 Thread Steven D'Aprano
Chris Angelico wrote: On Thu, Oct 2, 2014 at 12:29 PM, Rustom Mody rustompm...@gmail.com wrote: So by now you know there are 2 kinds of return: So the morals in short: 1. Stick to the return that works -- python's return statement -- and avoid the return that seems to work -- the print

Re: Clearing globals in CPython

2014-10-02 Thread Steven D'Aprano
Peter Otten wrote: Steven D'Aprano wrote: Obviously the easiest way to recover is to exit the current session and restart it, but as a challenge, can we recover from this state? $ python3 Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux Type help, copyright, credits or

Re: Clearing globals in CPython

2014-10-02 Thread Mark Lawrence
On 02/10/2014 09:11, Steven D'Aprano wrote: Peter Otten wrote: Steven D'Aprano wrote: Obviously the easiest way to recover is to exit the current session and restart it, but as a challenge, can we recover from this state? $ python3 Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2]

Re: Obscuring Python source from end users

2014-10-02 Thread Chris Angelico
On Thu, Oct 2, 2014 at 5:50 PM, Johannes Bauer dfnsonfsdu...@gmx.de wrote: On 29.09.2014 16:53, Sturla Molden wrote: Chris Angelico ros...@gmail.com wrote: I have a project that involves distributing Python code to users in an organisation. Users do not interact directly with the Python code;

Re: Function passed as an argument returns none

2014-10-02 Thread Shiva
Hi All, Thank you everyone. This is fantastic - I post a query and go to sleep and by the time I get up there is already a nice little thread of discussion going on. By the way, I sorted it with all your suggestions. def donuts(count): if count = 9: #This had to be 9 instead of 5 as

Re: Function passed as an argument returns none

2014-10-02 Thread Chris Angelico
On Thu, Oct 2, 2014 at 6:46 PM, Shiva shivaji...@yahoo.com.dmarc.invalid wrote: Hi All, Thank you everyone. This is fantastic - I post a query and go to sleep and by the time I get up there is already a nice little thread of discussion going on. Yeah, that's what python-list is like!

Re: Function passed as an argument returns none

2014-10-02 Thread cl
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: between printing output to the screen and returning values from a function, and under what circumstances Python will automatically print said returned values as a convenience. Conflating the two as 2 kinds of return is an To me

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread cl
Travis Griggs travisgri...@gmail.com wrote: Sent from my iPhone On Oct 1, 2014, at 04:12, Peter Otten __pete...@web.de wrote: `lambda` is just a fancy way to define a function inline Not sure fancy is the correct adjective; more like syntactic tartness (a less sweet version of

pyqt problem

2014-10-02 Thread sachin . tiwari50
Hi I am learning pyqt, can any one help me to make instances of pushbutton wherever cursor will be clicked on canvas,like a circuit simulator where we add components on canvas just by left or right click. Thanks Regards, Sachin -- https://mail.python.org/mailman/listinfo/python-list

Re: pyqt problem

2014-10-02 Thread Mark Lawrence
On 02/10/2014 10:49, sachin.tiwar...@gmail.com wrote: Hi I am learning pyqt, can any one help me to make instances of pushbutton wherever cursor will be clicked on canvas,like a circuit simulator where we add components on canvas just by left or right click. Thanks Regards, Sachin Please

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread Marko Rauhamaa
c...@isbd.net: It's not as if I'm new to programming either, I've been writing software professionally since the early 1970s, now retired. I have no formal computer training, there wasn't much in the way of university courses on computing in the 1960s, I have a degree in Electrical

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-10-02 Thread Peter Tomcsanyi
Thanks again for quick and informative reply. Ned Deily n...@acm.org wrote in message news:nad-40cb03.10344701102...@news.gmane.org... The python.org 3.4.x series of installers will likely never change from linking with Tk 8.5 by default. That would break a number of important third-party

Re: Function passed as an argument returns none

2014-10-02 Thread Rustom Mody
On Thursday, October 2, 2014 3:18:22 PM UTC+5:30, wrote: Steven D'Aprano wrote: between printing output to the screen and returning values from a function, and under what circumstances Python will automatically print said returned values as a convenience. Conflating the two as 2 kinds of

Re: Function passed as an argument returns none

2014-10-02 Thread Rustom Mody
On Thursday, October 2, 2014 1:30:03 PM UTC+5:30, Steven D'Aprano wrote: Chris Angelico wrote: wrote: So by now you know there are 2 kinds of return: So the morals in short: 1. Stick to the return that works -- python's return statement -- and avoid the return that seems to work -- the

Re: pyqt problem

2014-10-02 Thread Sachin Tiwari
On Thursday, October 2, 2014 3:19:22 PM UTC+5:30, Sachin Tiwari wrote: Hi I am learning pyqt, can any one help me to make instances of pushbutton wherever cursor will be clicked on canvas,like a circuit simulator where we add components on canvas just by left or right click.

Assignment Operators?

2014-10-02 Thread Didymus
Hi All, I was wondering if someone could explain an assignment operator that I'm seeing in some code. As an example: errors = False errors |= 3 errors 3 errors |= 4 errors 7 The '|=' operator, I read should be like a = a | b, but this appears to add the two numbers as long as it's

Re: Assignment Operators?

2014-10-02 Thread Chris Angelico
On Thu, Oct 2, 2014 at 11:24 PM, Didymus lynt...@gmail.com wrote: errors = False errors |= 3 errors 3 errors |= 4 errors 7 The '|=' operator, I read should be like a = a | b, but this appears to add the two numbers as long as it's more than the previous: errors |= 5 errors 7 It

Recommended hosting

2014-10-02 Thread writeson
Hi all, I'd like to build a web site for myself, essentially a vanity web site to show off whatever web development skills I have, and perhaps do some blogging. I'm a Python developer, so I'd like to develop the site with the following stack: web applications written with Python and Flask,

Re: Clearing globals in CPython

2014-10-02 Thread Marco Buttu
On 01/10/2014 18:00, Steven D'Aprano wrote: Out of curiosity, I ran: globals().clear() in the interactive interpreter. It broke much more than I expected! Built-ins were no longer available, and import stopped working. Interesting... :D Obviously the easiest way to recover is to exit the

Re: Thoughts on python classes to represent an ebook reader

2014-10-02 Thread math math
Thanks a lot. It is quite helpful to follow the thought process here. Another person gave the example of 'Calibre', but I've found it overwhelming and I couldn't find any UML diagram there (maybe not searched hard enough). Regards, Felix -- https://mail.python.org/mailman/listinfo/python-list

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread Grant Edwards
On 2014-10-02, c...@isbd.net c...@isbd.net wrote: Travis Griggs travisgri...@gmail.com wrote: Sent from my iPhone On Oct 1, 2014, at 04:12, Peter Otten __pete...@web.de wrote: `lambda` is just a fancy way to define a function inline Not sure fancy is the correct adjective; more

Re: Clearing globals in CPython

2014-10-02 Thread Grant Edwards
On 2014-10-01, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Obviously the easiest way to recover is to exit the current session and restart it, but as a challenge, can we recover from this state? Python apparently _does_ need a restart command. -- Grant Edwards

Re: Clearing globals in CPython

2014-10-02 Thread Chris Angelico
On Fri, Oct 3, 2014 at 12:07 AM, Grant Edwards invalid@invalid.invalid wrote: On 2014-10-01, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Obviously the easiest way to recover is to exit the current session and restart it, but as a challenge, can we recover from this state?

Re: Assignment Operators?

2014-10-02 Thread Grant Edwards
On 2014-10-02, Chris Angelico ros...@gmail.com wrote: On Thu, Oct 2, 2014 at 11:24 PM, Didymus lynt...@gmail.com wrote: errors = False errors |= 3 errors 3 errors |= 4 errors 7 [...] When you use False there, it's equivalent to zero. Why is that, you ask? [Or should, anyway] The fact

Re: Recommended hosting

2014-10-02 Thread Tim Golden
On 02/10/2014 14:30, writeson wrote: Hi all, I'd like to build a web site for myself, essentially a vanity web site to show off whatever web development skills I have, and perhaps do some blogging. I'm a Python developer, so I'd like to develop the site with the following stack: web

How to set the global variable so that it can be accessed and released inside other methods

2014-10-02 Thread Milson Munakami
Hi, I am newbie to Python, I am trying to use unittest and python. My python script is like this: #! /usr/bin/env python __author__ = 'Milson Munakami' __revision__ = '0.0.2' import json import urllib import httplib from scapy.all import * import unittest import os, sys, socket, struct,

Re: How to set the global variable so that it can be accessed and released inside other methods

2014-10-02 Thread Chris Angelico
On Fri, Oct 3, 2014 at 1:29 AM, Milson Munakami milson...@gmail.com wrote: #I am trying to set net variable to global global net def CreateNet(self): Create an empty network and add nodes to it. net = Mininet(

Re: Python unittesting method call issue

2014-10-02 Thread Milson Munakami
On Saturday, September 27, 2014 5:26:00 PM UTC-6, Milson Munakami wrote: I am trying to set the precondition for the test first prior to test other test cases. But as you can see in my code the precondition print command is not fired! Can you explain the cause and solution how to fire the

Re: Assignment Operators?

2014-10-02 Thread Ian Kelly
On Thu, Oct 2, 2014 at 7:24 AM, Didymus lynt...@gmail.com wrote: The '|=' operator, I read should be like a = a | b, but this appears to add the two numbers as long as it's more than the previous: Note that: a = a or b and: a = a | b are different operations. It sounds like

Re: Recommended hosting

2014-10-02 Thread Tim
On Thursday, October 2, 2014 9:30:38 AM UTC-4, writeson wrote: Hi all, I'd like to build a web site for myself, essentially a vanity web site snip web applications written with Python and Flask, running as uwsgi applications. These would support dynamic HTML where needed, but mostly it

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread cl
Grant Edwards invalid@invalid.invalid wrote: On 2014-10-02, c...@isbd.net c...@isbd.net wrote: Travis Griggs travisgri...@gmail.com wrote: Sent from my iPhone On Oct 1, 2014, at 04:12, Peter Otten __pete...@web.de wrote: `lambda` is just a fancy way to define a function

Reticulated Python

2014-10-02 Thread Mark Lawrence
My apologies if this has been discussed before but I thought it may be of interest wphomes.soic.indiana.edu/jsiek/files/2014/08/retic-python-v3.pdf -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence --

Re: Recommended hosting

2014-10-02 Thread David Hutto
You can go over to Zenfinite. I just so happen to know the owner; so if you see a nice plan you like, and it's a little pricey, I can see if the price can be dropped. On Thu, Oct 2, 2014 at 12:33 PM, Tim jtim.arn...@gmail.com wrote: On Thursday, October 2, 2014 9:30:38 AM UTC-4, writeson wrote:

Re: Recommended hosting

2014-10-02 Thread Chris Angelico
On Fri, Oct 3, 2014 at 3:33 AM, David Hutto dwightdhu...@gmail.com wrote: You can go over to Zenfinite. I just so happen to know the owner; so if you see a nice plan you like, and it's a little pricey, I can see if the price can be dropped. Or maybe you not so much *know* the owner as *are*

Re: Reticulated Python

2014-10-02 Thread Ethan Furman
On 10/02/2014 10:01 AM, Mark Lawrence wrote: My apologies if this has been discussed before but I thought it may be of interest wphomes.soic.indiana.edu/jsiek/files/2014/08/retic-python-v3.pdf Looks interesting, thanks for the link! -- ~Ethan~ --

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread Rustom Mody
On Thursday, October 2, 2014 4:47:50 PM UTC+5:30, Marko Rauhamaa wrote: It's not as if I'm new to programming either, I've been writing software professionally since the early 1970s, now retired. I have no formal computer training, there wasn't much in the way of university courses on

Re: Keepin constants, configuration values, etc. in Python - dedicated module or what?

2014-10-02 Thread Dave Angel
On 09/30/2014 10:55 AM, c...@isbd.net wrote: Dave Angel da...@davea.name wrote: name. And presumably you never remove an old name from the config. The only things really likely to change (and may change regularly) are the conversion factors, drifting voltage references etc. will

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread Ian Kelly
On Thu, Oct 2, 2014 at 10:33 AM, c...@isbd.net wrote: Ah, so at least there is a reason for it, I'm far from being a mathematician though so it's not particularly obvious (for me anyway). You're not alone; a lot of people find the terminology not intuitive. Even GvR has publicly lamented the

Programming for Everybody (Python)

2014-10-02 Thread Seymore4Head
Starts in 3 days Coursera.org About the Course This course is specifically designed to be a first programming course using the popular Python programming language. The pace of the course is designed to lead to mastery of each of the topics in the class. We will use simple data analysis as the

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread Grant Edwards
On 2014-10-02, c...@isbd.net c...@isbd.net wrote: Grant Edwards invalid@invalid.invalid wrote: On 2014-10-02, c...@isbd.net c...@isbd.net wrote: It throws me because 'lambda' simply has no meaning whatsoever for me, i.e. it's just a greek letter. So from my point of view it's like

Re: Programming for Everybody (Python)

2014-10-02 Thread Juan Christian
I recommend to everyone. Already took one of his courses on Coursera and he's amazing as a teacher. On Thu, Oct 2, 2014 at 4:24 PM, Seymore4Head Seymore4Head@hotmail.invalid wrote: Starts in 3 days Coursera.org About the Course This course is specifically designed to be a first programming

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread Dan Stromberg
On Thu, Oct 2, 2014 at 12:15 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Oct 2, 2014 at 10:33 AM, c...@isbd.net wrote: Ah, so at least there is a reason for it, I'm far from being a mathematician though so it's not particularly obvious (for me anyway). You're not alone; a lot of

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread Chris Angelico
On Fri, Oct 3, 2014 at 6:06 AM, Dan Stromberg drsali...@gmail.com wrote: Anyway, pylint doesn't complain about a bare use of lambda, but it does complain about a map applied to a lambda or a filter applied to a lambda. Pylint says they could be replaced by a list comprehension, with the

Re: Python 3.4.1 installer on Mac links Python to old Tcl/Tk

2014-10-02 Thread Ned Deily
In article m0jciu$hoi$1...@ger.gmane.org, Peter Tomcsanyi tomcsa...@slovanet.sk wrote: Ned Deily n...@acm.org wrote in message news:nad-40cb03.10344701102...@news.gmane.org... The python.org 3.4.x series of installers will likely never change from linking with Tk 8.5 by default. That

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread Steven D'Aprano
Dan Stromberg wrote: On Thu, Oct 2, 2014 at 12:15 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Oct 2, 2014 at 10:33 AM, c...@isbd.net wrote: Ah, so at least there is a reason for it, I'm far from being a mathematician though so it's not particularly obvious (for me anyway). You're

Re: Function passed as an argument returns none

2014-10-02 Thread Steven D'Aprano
Rustom Mody wrote: On Thursday, October 2, 2014 1:30:03 PM UTC+5:30, Steven D'Aprano wrote: Chris Angelico wrote: Restoring the attribution line you removed: On Thu, Oct 2, 2014 at 12:29 PM, Rustom Mody rustompm...@gmail.com wrote: So by now you know there are 2 kinds of return: So the

Re: Function passed as an argument returns none

2014-10-02 Thread Rustom Mody
On Friday, October 3, 2014 5:41:12 AM UTC+5:30, Steven D'Aprano wrote: [Rustom] Right and the OP subject as well as post are essentially that conflation: [allegedly Steven] Any idea why 'None' is getting passed even though calling the donuts(4) alone returns the expected value? I didn't

Re: Function passed as an argument returns none

2014-10-02 Thread Chris Angelico
On Fri, Oct 3, 2014 at 11:49 AM, Rustom Mody rustompm...@gmail.com wrote: Ok so there is no conventional attribution line because it was cut-pasted from elsewhere in the thread but there is a clear and unequivocal prefix of OP subject as well as post. When I respond to this part... Why/how

Re: How to show a dictionary sorted on a value within its data?

2014-10-02 Thread Chris Angelico
On Fri, Oct 3, 2014 at 9:16 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Anyway, pylint doesn't complain about a bare use of lambda, but it does complain about a map applied to a lambda or a filter applied to a lambda. Pylint says they could be replaced by a list

Re: Error from pandas.io.data import DataReader

2014-10-02 Thread Miki Tebeka
Greetings, I am trying to run this snippet of code. from pandas.io.data import DataReader ... I keep getting this error. Traceback (most recent call last): File C:\Python27\download_dow.py, line 1, in module from pandas.io.data import DataReader ImportError: No module

Re: Clearing globals in CPython

2014-10-02 Thread Stefan Behnel
Chris Angelico schrieb am 02.10.2014 um 16:12: On Fri, Oct 3, 2014 at 12:07 AM, Grant Edwards wrote: On 2014-10-01, Steven D'Aprano wrote: Obviously the easiest way to recover is to exit the current session and restart it, but as a challenge, can we recover from this state? Python

Is there a way to display source code for Python function?

2014-10-02 Thread Viet Nguyen
Hi, When I am debug mode, is there some command which will help display the source code for a Python function of interest? Much like you'd use info proc to display contents of Tcl proc. Thanks, Viet -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a way to display source code for Python function?

2014-10-02 Thread Ian Kelly
On Thu, Oct 2, 2014 at 11:34 PM, Viet Nguyen vhnguy...@yahoo.com.dmarc.invalid wrote: Hi, When I am debug mode, is there some command which will help display the source code for a Python function of interest? Much like you'd use info proc to display contents of Tcl proc. Thanks, Viet

[issue22537] Failure building 2.7 docs on Windows

2014-10-02 Thread Georg Brandl
Georg Brandl added the comment: you now do need You always did :) However, it should not be a problem to make the extensions 2.x and 3.x compatible in both branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22537

[issue22536] subprocess should include filename in FileNotFoundError exception

2014-10-02 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- assignee: ronaldoussoren - components: +Library (Lib) -Interpreter Core, Macintosh nosy: +gregory.p.smith title: Missing filename in FileNotFoundError - subprocess should include filename in FileNotFoundError exception versions: +Python 3.5

[issue22537] Failure building 2.7 docs on Windows

2014-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset fd2530294d50 by Georg Brandl in branch '2.7': Closes #22537: Make sphinx extensions compatible with Python 2 or 3, like in the 3.x branches https://hg.python.org/cpython/rev/fd2530294d50 -- nosy: +python-dev resolution: - fixed stage:

[issue19342] Improve grp module docstrings

2014-10-02 Thread Georg Brandl
Georg Brandl added the comment: LGTM. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19342 ___ ___ Python-bugs-list mailing

[issue19342] Improve grp module docstrings

2014-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset e2b757baaef1 by Georg Brandl in branch '3.4': Closes #19342: improve docstrings in grp module. https://hg.python.org/cpython/rev/e2b757baaef1 -- nosy: +python-dev resolution: - fixed stage: - resolved status: open - closed

[issue19342] Improve grp module docstrings

2014-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset de0ca868d44f by Georg Brandl in branch '2.7': Closes #19342: improve docstrings in grp module. https://hg.python.org/cpython/rev/de0ca868d44f -- ___ Python tracker rep...@bugs.python.org

[issue22528] Missing hint to source code

2014-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset b51742cb1685 by Georg Brandl in branch '3.4': closes #22528: add source links to symtable and compileall https://hg.python.org/cpython/rev/b51742cb1685 New changeset 5144c7d0ef29 by Georg Brandl in branch '2.7': closes #22528: add source links to

[issue14573] json iterencode can not handle general iterators

2014-10-02 Thread Alfred Morgan
Alfred Morgan added the comment: Need a patch? Here you go. https://github.com/Zectbumo/cpython/compare/master How to use it: encoder = JSONEncoder(stream=True) This will iterencode() iterators as lists and file objects as strings and stream them when constructed with stream=True.

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread anon
anon added the comment: Above I included a first attempt however I don't think my code is good and I couldn't figure out the case for negative integers. There's some discussion above about its inclusion. I like your x.bits suggestion actually, assuming x.bits returns an IntBitsView object

[issue14304] Implement utf-8-bmp codec

2014-10-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: Pending doing some experiments with current and patched code, and reading the rpc code, I believe I would like to see the patch applied. I don't care about whether the patch defines a 'codec' or what its name would be. What i do want is for the Idle Shell to

[issue14326] IDLE - allow shell to support different locales

2014-10-02 Thread Terry J. Reedy
Terry J. Reedy added the comment: I do not understand this issue. Locales (the title) and codecs (the message) are different things. A Tk Text widget, with Idle's wrapper, is essentially a BMP terminal. That is one thing that makes Idle's Shell better than Window's command prompt. An ascii

[issue20076] Add UTF-8 locale aliases

2014-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 840af1a073f7 by Serhiy Storchaka in branch '2.7': Issue #20076: Remove just added the sr_rs.utf8@latn alias because it is https://hg.python.org/cpython/rev/840af1a073f7 New changeset ed92f06cdd8b by Serhiy Storchaka in branch '3.4': Issue #20076:

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Nick Coghlan
Nick Coghlan added the comment: Right, I had a specific concern related to the way the C level code works. On closer inspection, it turned out all the Python level code execution is complete by the time we reach the point I was worried about. -- ___

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
STINNER Victor added the comment: I don't like the idea of the array-view int.bits[a:b]: it's harder to implement and the proposed behaviour is different than a list. Example: x=list(abcdef) x[2] 'c' x[2:4] ['c', 'd'] x[2:4] returns a subset of the list, so a new list. It doesn't return

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- Removed message: http://bugs.python.org/msg228173 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915 ___

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
STINNER Victor added the comment: I don't know where at of bits_at() comes from. It's rarely used in Python: Lib/asynchat.py:def find_prefix_at_end(haystack, needle): Lib/asyncio/test_utils.py:def call_at(self, when, callback, *args): Lib/asyncio/base_events.py:def call_at(self, when,

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
STINNER Victor added the comment: I don't know what at of bits_at() comes from. It's rarely used in Python: Lib/asynchat.py:def find_prefix_at_end(haystack, needle): Lib/asyncio/test_utils.py:def call_at(self, when, callback, *args): Lib/asyncio/base_events.py:def call_at(self, when,

[issue14304] Implement utf-8-bmp codec

2014-10-02 Thread STINNER Victor
STINNER Victor added the comment: Tkinter (and IDLE specially) can use only UCS-2 characters. Is it always the case, or does depend on a compilation flag of Tcl or Tk? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14304

[issue22534] Possible Memory Leak with 'shelve'

2014-10-02 Thread Ned Deily
Ned Deily added the comment: Sorry, I'm not able to reproduce any major memory leak, using a couple of different dbm implementations, and there is not enough information to go on. To pursue further, you should identify: - what platform (operating system distribution and version) - exactly what

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't like the idea of the array-view int.bits[a:b]: it's harder to implement and the proposed behaviour is different than a list. Sequences are not lists. -- ___ Python tracker rep...@bugs.python.org

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5502a82fb103 by Serhiy Storchaka in branch 'default': Issue #20079: makelocalealias.py now supports installed SUPPORTED file, https://hg.python.org/cpython/rev/5502a82fb103 New changeset 4a19ce6c6e0c by Serhiy Storchaka in branch '2.7': Issue

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread STINNER Victor
STINNER Victor added the comment: Sequences are not lists. Are there other object types for which obj[a:b] does not return a new sequence? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915

[issue14304] Implement utf-8-bmp codec

2014-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In theory Tcl/Tk can be built with 32-bit Tcl_Char. But I doubt that this option is well tested. In any case on Linux Python depends on system Tcl/Tk. -- ___ Python tracker rep...@bugs.python.org

[issue14304] Implement utf-8-bmp codec

2014-10-02 Thread STINNER Victor
STINNER Victor added the comment: In theory Tcl/Tk can be built with 32-bit Tcl_Char. Would it make sense to compile Tcl/Tk with 32-bit Tcl_Char on Windows? I think that we embed our own build ot Tcl/Tk, right? -- ___ Python tracker

[issue19915] int.bit_at(n) - Accessing a single bit in O(1)

2014-10-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Are there other object types for which obj[a:b] does not return a new sequence? That's a good question :-) I can't think of any. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19915

[issue22534] Possible Memory Leak with 'shelve'

2014-10-02 Thread STINNER Victor
STINNER Victor added the comment: I modified the example a little bit to display the RSS memory 10 times. The RSS increases by +176 kB at the beginning and then it is stable. I tested on Fedora 20 (Linux): anydbm.open('bla', 'c') creates a 'bsddb._DBWithCursor' object. Can you please give us

[issue20079] Add support for glibc supported locales

2014-10-02 Thread STINNER Victor
STINNER Victor added the comment: A lot of buildbot failed. Example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/2692/steps/test/logs/stdio == FAIL: test_valencia_modifier

[issue1176504] locale._build_localename treatment for utf8

2014-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue is already fixed (see issue10154 and issue10090). -- nosy: +serhiy.storchaka resolution: - duplicate stage: patch review - resolved status: open - closed superseder: - locale.normalize strips - from UTF-8, which fails on Mac

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 02.10.2014 10:24, STINNER Victor wrote: STINNER Victor added the comment: A lot of buildbot failed. Example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/2692/steps/test/logs/stdio

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7ce459fc57b9 by Serhiy Storchaka in branch '2.7': Issue #20079: Fixed tests. https://hg.python.org/cpython/rev/7ce459fc57b9 New changeset 8cdea138 by Serhiy Storchaka in branch '3.4': Issue #20079: Fixed tests.

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 02.10.2014 10:38, Marc-Andre Lemburg wrote: What I don't understand is why the above case failed. That mapping wasn't changed by the patch, AFAICT. Ah, the change is in the second patch round you applied, which is not on the ticket as separate patch

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry. I should be more careful. Test failed due to mismatch between glibc and X11 locale.alias (issue20087). In X11 locale.alias ca_ES is mapped to ca_ES.ISO8859-1, and in glibc 2.19 it is mapped to ca_ES.ISO8859-15. ca_ES@valencia exists only in glibc

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Reviewing that, I think this change need to be documented (in the comment above the table) and also researched a bit: The 'kk_kz' was added just, in the first commit of this issue (which was based on glibc 2.18 data). No changes to previous Python

[issue1602] windows console doesn't print or input Unicode

2014-10-02 Thread stijn
stijn added the comment: New here, but I think this is the correct issue to get info about this unicode problem. On the windows console: chcp Active code page: 437 type utf.txt ╨ƒ╤Ç╨╕╨▓╨╡╤é chcp 65001 Active code page: 65001 type utf.txt Привет python --version Python 3.5.0a0 cat

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Test failed due to mismatch between glibc and X11 locale.alias (issue20087). In X11 locale.alias ca_ES is mapped to ca_ES.ISO8859-1, and in glibc 2.19 it is mapped to ca_ES.ISO8859-15. ca_ES@valencia exists only in glibc SUPPORTED file and was added in the

[issue1158490] locale fails if LANGUAGE has multiple locales

2014-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks to me that this issue is already gone. import os, locale os.environ['LANGUAGE'] = 'en_DK:en_GB:en_US:en' locale.getdefaultlocale(['LANGUAGE']) ('en_DK', 'ISO8859-1') 'en_DK' was added in issue20079. -- nosy: +serhiy.storchaka status:

[issue20079] Add support for glibc supported locales

2014-10-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 02.10.2014 11:13, Serhiy Storchaka wrote: Serhiy Storchaka added the comment: Test failed due to mismatch between glibc and X11 locale.alias (issue20087). In X11 locale.alias ca_ES is mapped to ca_ES.ISO8859-1, and in glibc 2.19 it is mapped to

[issue18228] AIX locale parsing failure

2014-10-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18228 ___ ___

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
Georg Brandl added the comment: I'm attaching a patch that works without changing the recursion limit, and adds some tests for pathological cases. Instead, PyErr_GivenExceptionMatches is changed so that if an exception was previously set, it is replaced by an exception that

[issue12029] Catching virtual subclasses in except clauses

2014-10-02 Thread Georg Brandl
Georg Brandl added the comment: New version including (I think) correct refcount handling. -- Added file: http://bugs.python.org/file36777/exception_proper_subclass_matching_v2.patch ___ Python tracker rep...@bugs.python.org

  1   2   3   >