[RELEASE] Python 2.7.9

2014-12-11 Thread Benjamin Peterson
It is my pleasure to announce the release of Python 2.7.9, a new bugfix release in the Python 2.7 series. Despite technically being a maintenance release, Python 2.7.9 includes several majors changes from 2.7.8: - The ensurepip module has been backported to Python 2.7 - Python 3's ssl module has

Chennai Python User Group - December Meetup

2014-12-11 Thread Vijay Kumar
Hi Everyone, The Chennai Python User Group (Chennaipy) is meeting on 20th Dec, at IMSc, Chennai. For more details about the event, visit our meetup event page http://www.meetup.com/Chennaipy/events/219031098/ If you are interested, RSVP on our meetup page. Website: http://chennaipy.org Mailing

ANN: eGenix mxODBC Plone/Zope Database Adapter 2.2.0

2014-12-11 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING mxODBC Plone/Zope Database Adapter Version 2.2.0 for the Plone CMS and Zope server platform Available for Plone 4.0-4.3 and Plone 5.0,

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Bruno Cauet
Remarks heard form updated. Nathaniel, I'm not sure about that: even if the code is 2- and 3-compatible you'll pick one runtime. 2 others questions now mention writing polyglot code. By the way I published the survey on HN, /r/programming /r/python: https://news.ycombinator.com/item?id=8730156

Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Bruno Cauet
Hi all, Last year a survey was conducted on python 2 and 3 usage. Here is the 2014 edition, slightly updated (from 9 to 11 questions). It should not take you more than 1 minute to fill. I would be pleased if you took that time. Here's the url: http://goo.gl/forms/tDTcm8UzB3 I'll publish the

Re: How to detect that a function argument is the default one

2014-12-11 Thread Jean-Michel Pichavant
- Original Message - From: Chris Angelico ros...@gmail.com c1 = Circle((0,0), 10, None) print c1.mass 20 c1.radius = 20 print c1.mass 40 I think that juust might count as scope creep :) ChrisA Here you go :p c1 = Circle((0,0), 10, None) print c1.mass 20

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Bruno Cauet
I hesitated a while before deciding not to include it! Apart from python core development what would be the reasons to work mostly on this version ? I'll fix the omission right ahead. — Tagada tsouin tsouin On Wed, Dec 10, 2014 at 10:57 PM, Chris Angelico ros...@gmail.com wrote: On Thu, Dec

ANN: eGenix mxODBC Plone/Zope Database Adapter 2.2.0

2014-12-11 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING mxODBC Plone/Zope Database Adapter Version 2.2.0 for the Plone CMS and Zope server platform Available for Plone 4.0-4.3 and Plone 5.0,

Re: Python script isn't producing text in data file

2014-12-11 Thread alister
On Thu, 11 Dec 2014 05:19:44 +, Grant Edwards wrote: On 2014-12-11, Docfxit docf...@gmail.com wrote: I am happy to paste it into a post. The reason I didn't is because it's very large. The Python script is 1239 lines long. The example summary is 105 lines long. The input log is 6810

Re: Python script isn't producing text in data file

2014-12-11 Thread alister
On Wed, 10 Dec 2014 20:23:56 -0800, Docfxit wrote: On Wednesday, December 10, 2014 7:55:17 PM UTC-8, Ben Finney wrote: Docfxit docf...@gmail.com writes: I am happy to paste it into a post. The reason I didn't is because it's very large. The Python script is 1239 lines long. That's

Re: Python script isn't producing text in data file

2014-12-11 Thread Peter Otten
Docfxit wrote: I don't know enough about Python to figure out how to isolate where the problem is happening. Can you get hold of the person who wrote the script? -- https://mail.python.org/mailman/listinfo/python-list

Re: How to detect that a function argument is the default one

2014-12-11 Thread Jean-Michel Pichavant
- Original Message - From: ast nom...@invalid.com Note : what is the mass of a circle ? In fact it's a ball moving in a plan. I will change that name. I would advise to remove the the mass parameter of your Sphere initialization. It could be inconsistent with the radius. To

Problem with a dialog

2014-12-11 Thread ast
Hello I provide two almost identical small test case programs. The first one works as expected, 'True' is printed on the console. With the second one Python complains that 'test' is not known. I dont understand why. Python 3.4, windows # ## First #

Re: gdb python print truncated string

2014-12-11 Thread milanxa
-=Scorp=- Okay, i fixed this limit (truncated) as follows: find python2.7-gdb.py (in /usr/lib... path) and found/change value for MAX_OUTPUT_LEN const (default value is 1024), then restart gdb and you'll se new truncate limits. -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem with a dialog

2014-12-11 Thread Steven D'Aprano
ast wrote: Hello I provide two almost identical small test case programs. The first one works as expected, 'True' is printed on the console. With the second one Python complains that 'test' is not known. I dont understand why. # ## Second #

Re: Problem with a dialog

2014-12-11 Thread ast
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info a écrit dans le message de news:54898820$0$12989$c3e8da3$54964...@news.astraweb.com... As I said, most programming languages work like this. But a small minority use a different system, called dynamic scoping. In dynamic scoping, it

New member - 'odd' question

2014-12-11 Thread Jacob Kruger
Firstly, python is one of my two current focus areas, and while I still work with python 2.7, sort of for backward compatibility, my other focus area is web development, making use of PHP, javascript, jQuery, MySQL, etc. And, I develop on windows7 64 bit machines, in conjunction with screen

Re: Problem with a dialog

2014-12-11 Thread ast
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info a écrit dans le message de news:54898820$0$12989$c3e8da3$54964...@news.astraweb.com... You can make test global by declaring it global: def try_(): global test test = True setup = MyDialog(root) If that solves your problem to

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Giampaolo Rodola'
On Wed, Dec 10, 2014 at 5:59 PM, Bruno Cauet brunoca...@gmail.com wrote: Hi all, Last year a survey was conducted on python 2 and 3 usage. Here is the 2014 edition, slightly updated (from 9 to 11 questions). It should not take you more than 1 minute to fill. I would be pleased if you took

Re: When do default parameters get their values set?

2014-12-11 Thread Chris Kaynor
On Wed, Dec 10, 2014 at 7:15 PM, Steven D'Aprano st...@pearwood.info wrote: On Wed, 10 Dec 2014 18:18:44 -0800, Rustom Mody wrote: And going the other way -- no defs only lambdas its this: f = lambda : (lambda x= {}: x) f()() is f()() False d = f() d() is d() True But

is_whatever_you_are_testing_for as method or property?

2014-12-11 Thread Mateusz Loskot
Hi, I have been looking at various places to answer this dilemma: If a class member function simply tests something and returns a b::oolean call it def is_whatever_you_are_testing_for(): pass like 'is_even'. Should I define it as a classic method def is_even(self): pass or as a

Re: How to detect that a function argument is the default one

2014-12-11 Thread Ian Kelly
On Thu, Dec 11, 2014 at 3:02 AM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: I would advise to remove the the mass parameter of your Sphere initialization. It could be inconsistent with the radius. To compute the mass you would need the radius and the volumetric mass density. You

Re: How to detect that a function argument is the default one

2014-12-11 Thread Ian Kelly
On Thu, Dec 11, 2014 at 11:03 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Thu, Dec 11, 2014 at 3:02 AM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: I would advise to remove the the mass parameter of your Sphere initialization. It could be inconsistent with the radius. To compute

Re: is_whatever_you_are_testing_for as method or property?

2014-12-11 Thread Chris Angelico
On Fri, Dec 12, 2014 at 4:34 AM, Mateusz Loskot mate...@loskot.net wrote: If a class member function simply tests something and returns a b::oolean call it def is_whatever_you_are_testing_for(): pass like 'is_even'. Should I define it as a classic method def is_even(self): pass

Re: is_whatever_you_are_testing_for as method or property?

2014-12-11 Thread Ethan Furman
On 12/11/2014 09:34 AM, Mateusz Loskot wrote: def is_whatever_you_are_testing_for(): pass like 'is_even'. Should I define it as a classic method def is_even(self): pass or as a property @property def is_even(self): pass So, a classic method or a property, which

Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax'

2014-12-11 Thread Simon Evans
At the start of Chapter 3 of 'Getting Started in Beautiful Soup' it has said to create a html file, 'ecological pyramid.html' - which I have already done re: html body div class=ecopyramid ul id= producers li

Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax'

2014-12-11 Thread sohcahtoa82
On Thursday, December 11, 2014 11:21:52 AM UTC-8, Simon Evans wrote: At the start of Chapter 3 of 'Getting Started in Beautiful Soup' it has said to create a html file, 'ecological pyramid.html' - which I have already done re:

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Mark Roberts
I disagree. I know there's a huge focus on The Big Libraries (and wholesale migration is all but impossible without them), but the long tail of libraries is still incredibly important. It's like saying that migrating the top 10 Perl libraries to Perl 6 would allow people to completely ignore all

Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax'

2014-12-11 Thread Dave Angel
Please give your environment when starting a new thread. Python version and OS version. In this case, I'm guessing Windows, because I have to guess something to give a meaningful answer. On 12/11/2014 02:21 PM, Simon Evans wrote: At the start of Chapter 3 of 'Getting Started in Beautiful

Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax'

2014-12-11 Thread Chris Angelico
On Fri, Dec 12, 2014 at 6:34 AM, Dave Angel da...@davea.name wrote: Please give your environment when starting a new thread. Python version and OS version. In this case, I'm guessing Windows, because I have to guess something to give a meaningful answer. On 12/11/2014 02:21 PM, Simon Evans

Re: Text Code(from 'Getting Started in Beautiful Soup' re: cd Soup , returns 'Syntax Error, invalid syntax'

2014-12-11 Thread Dave Angel
On 12/11/2014 02:40 PM, Chris Angelico wrote: On Fri, Dec 12, 2014 at 6:34 AM, Dave Angel da...@davea.name wrote: Please give your environment when starting a new thread. Python version and OS version. In this case, I'm guessing Windows, because I have to guess something to give a meaningful

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Dan Stromberg
On Thu, Dec 11, 2014 at 11:35 AM, Mark Roberts wiz...@gmail.com wrote: I disagree. I know there's a huge focus on The Big Libraries (and wholesale migration is all but impossible without them), but the long tail of libraries is still incredibly important. It's like saying that migrating the

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Brett Cannon
On Thu Dec 11 2014 at 3:14:42 PM Dan Stromberg drsali...@gmail.com wrote: On Thu, Dec 11, 2014 at 11:35 AM, Mark Roberts wiz...@gmail.com wrote: I disagree. I know there's a huge focus on The Big Libraries (and wholesale migration is all but impossible without them), but the long tail of

Re: When do default parameters get their values set?

2014-12-11 Thread random832
On Wed, Dec 10, 2014, at 21:18, Rustom Mody wrote: But I have a different question -- can this be demonstrated without the 'is'? Er, yeah. You can, for example, add an item to one of the dictionaries and observe that it's not present in the other. --

Re: Python script isn't producing text in data file

2014-12-11 Thread Docfxit
On Thursday, December 11, 2014 1:32:02 AM UTC-8, Peter Otten wrote: Docfxit wrote: I don't know enough about Python to figure out how to isolate where the problem is happening. Can you get hold of the person who wrote the script? No. I tried. They are not answering their email.

Re: Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Ben Finney
Giampaolo Rodola' g.rod...@gmail.com writes: I still think the only *real* obstacle remains the lack of important packages such as twisted, gevent and pika which haven't been ported yet. What disqualifies other obstacles from being “*real* obstacles”? How do you determine that? With those

Re: is_whatever_you_are_testing_for as method or property?

2014-12-11 Thread Ben Finney
Chris Angelico ros...@gmail.com writes: A property should be used if what you're creating is virtually an attribute. Methods are attributes. Are you distinguishing here between “callable attribute” versus “non-callable attribute”? -- \ “Repetition leads to boredom, boredom to

Re: is_whatever_you_are_testing_for as method or property?

2014-12-11 Thread Devin Jeanpierre
On Thu, Dec 11, 2014 at 1:33 PM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: A property should be used if what you're creating is virtually an attribute. Methods are attributes. Are you distinguishing here between “callable attribute” versus

Re: is_whatever_you_are_testing_for as method or property?

2014-12-11 Thread Chris Angelico
On Fri, Dec 12, 2014 at 8:33 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Angelico ros...@gmail.com writes: A property should be used if what you're creating is virtually an attribute. Methods are attributes. Are you distinguishing here between “callable attribute” versus

Re: Python Iterables struggling using map() built-in

2014-12-11 Thread Ian Kelly
On Wed, Dec 10, 2014 at 9:01 PM, Steven D'Aprano st...@pearwood.info wrote: On Wed, 10 Dec 2014 09:46:55 -0700, Ian Kelly wrote: I don't particularly have a problem with functions having attributes, e.g. I think itertools.chain.from_iterable is just peachy. There is a downside though,

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Victor Stinner
2014-12-11 15:47 GMT+01:00 Giampaolo Rodola' g.rod...@gmail.com: I still think the only *real* obstacle remains the lack of important packages such as twisted, gevent and pika which haven't been ported yet. twisted core works on python 3, right now. Contribute to Twisted if you want to port

Re: Do you like the current design of python.org?

2014-12-11 Thread Ned Deily
Just a gentle reminder that any problems seen with or changes desired to the python.org website need to be documented on its issue tracker at https://github.com/python/pythondotorg/issues/. Key players working on it likely are not aware of discussions here. -- Ned Deily, n...@acm.org --

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Barry Warsaw
On Dec 11, 2014, at 11:35 AM, Mark Roberts wrote: I disagree. I know there's a huge focus on The Big Libraries (and wholesale migration is all but impossible without them), but the long tail of libraries is still incredibly important. It is, but I think it's increasingly the case that packages

Re: When do default parameters get their values set?

2014-12-11 Thread Steven D'Aprano
Chris Kaynor wrote: On Wed, Dec 10, 2014 at 7:15 PM, Steven D'Aprano st...@pearwood.info wrote: Using is you are demonstrating that calling the function twice returns two distinct objects. That is the purpose of is, to compare object identity. Without is, you can compare object IDs

Re: How to detect that a function argument is the default one

2014-12-11 Thread Ben Finney
Tony the Tiger tony@tiger.invalid writes: radius='10', mass='1' if radius == '10' ... if mass == '1' ... This ignores the problem as stated: The OP wants to distinguish between a value that was explicitly set by the caller, versus a value that was set by default because the caller did not

Re: Problem with a dialog

2014-12-11 Thread Steven D'Aprano
ast wrote: Since try() is a callback function called when a button is pushed, with the effect to open a dialog, I tried to define MyDialog class inside try(). The program is the following and it works. I no longer need to define test as global. Is it a good practice to define a class inside

Re: Python Iterables struggling using map() built-in

2014-12-11 Thread Steven D'Aprano
Ian Kelly wrote: A function, on the other hand, is not well suited to be a namespace, because it's not expected to provide one. And that is exactly the point I am making about the inherent conservativeness of Python developers. Functions ARE namespaces, like instances of user-defined

Re: Python Iterables struggling using map() built-in

2014-12-11 Thread Ian Kelly
On Thu, Dec 11, 2014 at 4:28 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Ian Kelly wrote: A function, on the other hand, is not well suited to be a namespace, because it's not expected to provide one. And that is exactly the point I am making about the inherent

Re: Python Iterables struggling using map() built-in

2014-12-11 Thread Chris Angelico
On Fri, Dec 12, 2014 at 10:28 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I think that there is a legitimate debate to be had as to whether this conservativeness and resistance to change is a good thing or a bad thing, but I don't think that there should be any debate about

Re: Do you like the current design of python.org?

2014-12-11 Thread Cameron Simpson
On 11Dec2014 00:19, Ian Kelly ian.g.ke...@gmail.com wrote: On Tue, Dec 9, 2014 at 10:16 PM, Cameron Simpson c...@zip.com.au wrote: - the AA menu buttons are all dysfunctional, being purely javascript; it would be better if the menu was styled display=none by default, and made visible by

Re: Python Script to convert firewall rules

2014-12-11 Thread Jason Friedman
I am network engineer and not expert in programming. I would like to make one python script to convert juniper netscreen firewall configuration into juniper SRX firewall configuration. Looks pretty tricky, do you have a specification for each format containing all the possible

Re: Python Iterables struggling using map() built-in

2014-12-11 Thread Roy Smith
In article mailman.16880.1418342293.18130.python-l...@python.org, Ian Kelly ian.g.ke...@gmail.com wrote: I never said that functions can't be used as namespaces. I said that functions are *bad* namespaces, and I gave reasons why I think this is true. An excellent example of functions acting

beautifulsoup VS lxml

2014-12-11 Thread iMath
which is more easy and elegant for pulling data out of HTML? -- https://mail.python.org/mailman/listinfo/python-list

Re: beautifulsoup VS lxml

2014-12-11 Thread Michael Torrie
On 12/11/2014 07:02 PM, iMath wrote: which is more easy and elegant for pulling data out of HTML? Beautiful Soup is specialized for HTML parsing, and it can deal with badly formed HTML, but if I recall correctly BeautifulSoup can use the lxml engine under the hood, so maybe it's the way to go

Extension of while syntax

2014-12-11 Thread Nelson Crosby
I was thinking a bit about the following pattern: value = get_some_value() while value in undesired_values: value = get_some_value() I've always hated code that looks like this. Partly due to the repetition, but partly also due to the fact that without being able to immediately recognise

Re: Extension of while syntax

2014-12-11 Thread Ben Finney
Nelson Crosby n...@sourcecomb.com writes: I was thinking a bit about the following pattern: value = get_some_value() while value in undesired_values: value = get_some_value() I think that's an anti-pattern (because of the repetition, as you say). An improvement:: value =

Re: Extension of while syntax

2014-12-11 Thread Chris Angelico
On Fri, Dec 12, 2014 at 1:21 PM, Nelson Crosby n...@sourcecomb.com wrote: I was thinking a bit about the following pattern: value = get_some_value() while value in undesired_values: value = get_some_value() I've always hated code that looks like this. Partly due to the repetition, but

Re: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition

2014-12-11 Thread Terry Reedy
On 12/10/2014 5:04 PM, Bruno Cauet wrote: I hesitated a while before deciding not to include it! Apart from python core development what would be the reasons to work mostly on this version ? where 'This version' == 3.5. A possible reason: one is developing an app expected to be released fall

RE: Extension of while syntax

2014-12-11 Thread Clayton Kirkwood
I would prefer: while value = initial_value in undesired_values: value = get_some_value() Seems I've seen something like this before, C, Perl? Clayton -Original Message- From: Python-list [mailto:python-list- bounces+crk=godblessthe...@python.org] On Behalf Of Ben Finney Sent:

Re: Extension of while syntax

2014-12-11 Thread Terry Reedy
On 12/11/2014 9:21 PM, Nelson Crosby wrote: I was thinking a bit about the following pattern: value = get_some_value() while value in undesired_values: value = get_some_value() This is do_while or do_until. In Python, write it as do_until in this form. while True: value =

Re: Extension of while syntax

2014-12-11 Thread Ben Finney
(Please don't top-post; instead, interleave responses inline with the quoted material and trim the excess. See URL:https://en.wikipedia.org/wiki/Posting_style#Interleaved_style.) Clayton Kirkwood c...@godblessthe.us writes: I would prefer: while value = initial_value in undesired_values:

Re: PyQt: user interface freezed when using concurrent.futures.ThreadPoolExecutor

2014-12-11 Thread iMath
在 2014年12月11日星期四UTC+8下午1时25分41秒,Michael Torrie写道: On 12/10/2014 09:52 PM, iMath wrote: I think the user interface shouldn't be freezed when using concurrent.futures.ThreadPoolExecutor here,as it executes asynchronously , but it doesn't meet my expectations,anyone can explain why ? any

Re: PyQt: user interface freezed when using concurrent.futures.ThreadPoolExecutor

2014-12-11 Thread Michael Torrie
On 12/11/2014 08:20 PM, iMath wrote: 在 2014年12月11日星期四UTC+8下午1时25分41秒,Michael Torrie写道: On 12/10/2014 09:52 PM, iMath wrote: when it comes to I/O and GUIs, asynchronous calls are always better than threads. I cannot grasp your meaning here, IMO, asynchronous calls are done by using

list comprehension return a list and sum over in loop

2014-12-11 Thread KK Sasa
Hi there, The list comprehension is results = [d2(t[k]) for k in xrange(1000)], where d2 is a function returning a list, say [x1,x2,x3,x4] for one example. So results is a list consisting of 1000 lists, each of length four. Here, what I want to get is the sum of 1000 lists, and then the result

Re: Extension of while syntax

2014-12-11 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: You could deduplicate it by shifting the condition: while True: value = get_some_value() if value not in undesired_values: break But I'm not sure how common this idiom actually is. Extremely common, and not only in Python. Marko --

Re: list comprehension return a list and sum over in loop

2014-12-11 Thread Mark Lawrence
On 12/12/2014 06:22, KK Sasa wrote: Hi there, The list comprehension is results = [d2(t[k]) for k in xrange(1000)], where d2 is a function returning a list, say [x1,x2,x3,x4] for one example. So results is a list consisting of 1000 lists, each of length four. Here, what I want to get is the

Re: PyQt: user interface freezed when using concurrent.futures.ThreadPoolExecutor

2014-12-11 Thread Marko Rauhamaa
Michael Torrie torr...@gmail.com: An asynchronous API lets you start long-running I/O calls and define a function that is automatically called upon completion. In other words it's event-driven. Qt may provide everything you need already in an asynchronous form. GUI developers have been doing

Re: Python Iterables struggling using map() built-in

2014-12-11 Thread Ian Kelly
On Thu, Dec 11, 2014 at 6:55 PM, Roy Smith r...@panix.com wrote: In article mailman.16880.1418342293.18130.python-l...@python.org, Ian Kelly ian.g.ke...@gmail.com wrote: I never said that functions can't be used as namespaces. I said that functions are *bad* namespaces, and I gave reasons

Re: Extension of while syntax

2014-12-11 Thread Chris Angelico
On Fri, Dec 12, 2014 at 6:10 PM, Marko Rauhamaa ma...@pacujo.net wrote: Chris Angelico ros...@gmail.com: You could deduplicate it by shifting the condition: while True: value = get_some_value() if value not in undesired_values: break But I'm not sure how common this idiom actually

Re: PyQt: user interface freezed when using concurrent.futures.ThreadPoolExecutor

2014-12-11 Thread Chris Angelico
On Fri, Dec 12, 2014 at 6:18 PM, Marko Rauhamaa ma...@pacujo.net wrote: GUI developers have been doing event-driven programming for decades. That's an excellent preparation for network programming as well. Unfortunately, the minds of a generation of programmers were contaminated by the thread

Fatal Python error: PyCOND_WAIT(gil_cond) failed

2014-12-11 Thread keepplearningpython
Hi, I am running ipython3 on Unix and constantly see this crash - It happens when i try to issue commands on the ipython interactive shell. I have tried to set the PYTHONDIR to /var/tmp/ in case there was an issue accessing the default location of the history file. However, this makes no

Re: Python Script to convert firewall rules

2014-12-11 Thread Kashif Rana
Hi Jason Thanks for the reply. Yes I can make the all possible keywords/values for both formate. But after that what gonna be the logic to convert one format to other format. Like to convert one line below are the keywords: set interface ethernet2/5 ip 10.17.10.1/24 (format 1) set interfaces

[issue20866] Crash in the libc fwrite() on SIGPIPE (segfault with os.popen and SIGPIPE)

2014-12-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- title: segfailt with os.popen and SIGPIPE - Crash in the libc fwrite() on SIGPIPE (segfault with os.popen and SIGPIPE) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20866

[issue20866] Crash in the libc fwrite() on SIGPIPE (segfault with os.popen and SIGPIPE)

2014-12-11 Thread STINNER Victor
STINNER Victor added the comment: I added this bug to my list of Bugs that won’t be fixed in Python 2 anymore: http://haypo-notes.readthedocs.org/python.html#bugs-in-the-c-stdio-used-by-the-python-i-o -- ___ Python tracker rep...@bugs.python.org

[issue22823] Use set literals instead of creating a set from a list

2014-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset b6e6a86a92a7 by Serhiy Storchaka in branch 'default': Issue #22823: Use set literals instead of creating a set from a list. https://hg.python.org/cpython/rev/b6e6a86a92a7 New changeset 86a694781bee by Serhiy Storchaka in branch '3.4': Issue #22823:

[issue22823] Use set literals instead of creating a set from a list

2014-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Docs changes were applied to 3.4 too. Here is a patch for lib2to3. -- assignee: serhiy.storchaka - benjamin.peterson nosy: +benjamin.peterson stage: commit review - patch review Added file: http://bugs.python.org/file37413/set_literal_2to3.patch

[issue22823] Use set literals instead of creating a set from a list

2014-12-11 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch for lib2to3. In Python 3.5, I still found some set([ and frozenset([ in Lib/lib2to3, Lib/test/, Lib/stringrep.py, Lib/unittest/test/ and Lib/idlelib/CodeContext.py if someone is motived to patch them. (Ok, Serhiy wrote a patch for lib2to3.)

[issue22823] Use set literals instead of creating a set from a list

2014-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Tests are intentionally omitted, Lib/stringrep.py is very special case (it's code is generated and outdated, see issue15239), idlelib is deferred by Terry. And there is yet one one-line change to Lib/distutils/msvc9compiler.py in set_literal_3.patch.

[issue23024] Python Compile Error on Mac os X ld: unknown option: -export-dynamic

2014-12-11 Thread zhuoyikang
zhuoyikang added the comment: thank u very much ! question solved 2014-12-11 14:42 GMT+08:00 Ned Deily rep...@bugs.python.org: Ned Deily added the comment: That should work just fine, assuming you are using an unmodified Python 3.4.x source download or the 3.4 branch of a source repo. My

[issue21600] mock.patch.stopall doesn't work with patch.dict to sys.modules

2014-12-11 Thread Michael Foord
Michael Foord added the comment: Using patch.dict manipulates the contents of sys.modules, it doesn't replace sys.modules. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21600 ___

[issue23025] ssl.RAND_bytes docs should mention os.urandom

2014-12-11 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23025 ___ ___ Python-bugs-list mailing

[issue22823] Use set literals instead of creating a set from a list

2014-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce66b65ad8d6 by Terry Jan Reedy in branch '2.7': Issue 22823: Use set literal in idlelib. https://hg.python.org/cpython/rev/ce66b65ad8d6 New changeset daec40891d43 by Terry Jan Reedy in branch '3.4': Issue 22823: Use set literal in idlelib.

[issue23022] heap-use-after-free in find_maxchar_surrogates

2014-12-11 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23022 ___ ___ Python-bugs-list mailing

[issue19527] Test failures with COUNT_ALLOCS

2014-12-11 Thread Bohuslav Slavek Kabrda
Bohuslav Slavek Kabrda added the comment: Good catch, using getrefcount was a mistake. I'm attaching a new version which always checks for getcounts (and also applies on 3.4.2). -- Added file: http://bugs.python.org/file37414/00141-fix-tests_with_COUNT_ALLOCS-v3.patch

[issue23022] heap-use-after-free in find_maxchar_surrogates

2014-12-11 Thread STINNER Victor
STINNER Victor added the comment: Your code is strange. It exchanges pointer between processes if I understand correctly: class Berbagi(ctypes.Structure): _fields_ = [('a', ctypes.c_wchar_p), ('b', ctypes.c_double) ] nilai = multiprocessing.Array(Berbagi, [Berbagi() for x in range(9)]

[issue23022] heap-use-after-free in find_maxchar_surrogates

2014-12-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23022 ___ ___ Python-bugs-list

[issue23025] ssl.RAND_bytes docs should mention os.urandom

2014-12-11 Thread STINNER Victor
STINNER Victor added the comment: RAND_bytes() has an annoying bug: it can produces the same byte sequence in two different processes if they get the same identifier (yes, it occurs sometimes). See the issue #18747 and warnings about fork in the ssl module. I don't know if it is now fixed in

[issue23025] ssl.RAND_bytes docs should mention os.urandom

2014-12-11 Thread STINNER Victor
STINNER Victor added the comment: Note: ssl.RAND_bytes() doesn't exist in Python 2 (even in Python 2.7.9!). -- versions: +Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23025

[issue23022] heap-use-after-free in find_maxchar_surrogates

2014-12-11 Thread peerhash
Changes by peerhash ch...@rop.io: Removed file: http://bugs.python.org/file37406/repro.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23022 ___ ___

[issue19527] Test failures with COUNT_ALLOCS

2014-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19527 ___ ___

[issue17679] sysconfig generation uses some env variables multiple times

2014-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: needs patch - patch review versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17679 ___

[issue22765] Fixes for test_gdb (first frame address, entry values)

2014-12-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka stage: - patch review type: - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22765

[issue18028] Warnings with -fstrict-aliasing

2014-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: - christian.heimes nosy: +serhiy.storchaka stage: patch review - commit review versions: +Python 3.5 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18028

[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2014-12-11 Thread Xuefer x
Xuefer x added the comment: please fix this bug. it seems the patch no longer applies to the current 2.7/3.4 code but the bug is still reproduce-able in another way i have CXX=ccache_cxx -pthread -shared but what actually happen is: ccache_cxx gcc -pthread -shared ...

[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2014-12-11 Thread Xuefer x
Xuefer x added the comment: even with CXX=x86_64-openwrt-linux-gnu-g++ -pthread -shared /usr/src/xuefer/openwrt/trunk/staging_dir/host/bin/python setup.py build it's donig x86_64-openwrt-linux-gnu-g++ gcc -pthread -shared -- ___ Python tracker

[issue22225] Add SQLite support to http.cookiejar

2014-12-11 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- resolution: - rejected stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5 ___

[issue23030] lru_cache manual get/put

2014-12-11 Thread Constantin
New submission from Constantin: In an effort for improved communication between stacked decorators, I would like to propose that all decorators providing caching mechanisms should provide the functions cache_info, cache_clear, cache_get and cache_put. The standard lib only provides

[issue23007] Unnecessary big intermediate result in Lib/bisect.py

2014-12-11 Thread Sergey Litvinov
Sergey Litvinov added the comment: mark.dickinson do you have an example of the Lib/bisect.py code No. I was thinking about something hypothetical similar to the one you provided. rhettinger The textbook formula is more important in languages rhettinger without something like Python long ints.

[issue23007] Unnecessary big intermediate result in Lib/bisect.py

2014-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: Sergey: thanks for the response. Closing. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23007 ___

[issue23007] Unnecessary big intermediate result in Lib/bisect.py

2014-12-11 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- stage: - resolved ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23007 ___ ___ Python-bugs-list

  1   2   >