Re: Programming puzzle with boolean circuits

2013-12-10 Thread Chris Angelico
On Tue, Dec 10, 2013 at 1:21 PM, Chris Angelico ros...@gmail.com wrote: Output: (I tweaked my __repr__ functions to parenthesize for clarity) (((not ((($1 and $2) or ($1 and $4)) or ($2 and $4)) and not ((($1 and $2) and $4) or (not ((($1 and $2) or ($1 and $4)) or ($2 and $4)) and (($1 or

Re: interactive help on the base object

2013-12-10 Thread Mark Lawrence
On 10/12/2013 05:16, rusi wrote: On Tuesday, December 10, 2013 10:40:27 AM UTC+5:30, Steven D'Aprano wrote: By the way, I'm curious. Why are discussions about object oriented coding off-topic to Python? This is not a rhetorical question. Well OOP on the python list is certainly on topic.

ANN: eGenix mx Base Distribution 3.2.7 (mxDateTime, mxTextTools, etc.)

2013-12-10 Thread eGenix Team: M.-A. Lemburg
ANNOUNCING eGenix.com mx Base Distribution mxDateTime, mxTextTools, mxProxy, mxURL, mxUID, mxBeeBase, mxStack, mxQueue, mxTools Version 3.2.7

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-10 Thread Oscar Benjamin
On 9 December 2013 19:57, Terry Reedy tjre...@udel.edu wrote: On 12/9/2013 7:23 AM, Oscar Benjamin wrote: Hi all, I work in a University Engineering faculty teaching, among other things, programming. In our last meeting about improving our teaching syllabus and delivery we've identified the

Re: Qml Error on CentOS6.4 when ./configure ?

2013-12-10 Thread Steven D'Aprano
On Mon, 09 Dec 2013 16:38:19 +0800, levinie wrote: I install latest QT5 and PyQt5 on CentOS6.4 And here is some error: Sorry, I have no experience installing QT or PyQT. If you don't get a response here, perhaps you should try on a dedicated QT or PyQT forum. It will probably help if you

Re: interactive help on the base object

2013-12-10 Thread Ian Kelly
On Mon, Dec 9, 2013 at 8:19 PM, Steven D'Aprano st...@pearwood.info wrote: While I'm very confident at this point that he is a crank, in the same category as circle-squarers, cold fusion proponents, pi-is-a-rational- number theorists, perpetual motion machine inventors, evolution or AGW

Permission for contribution: http://bugs.python.org/issue19940

2013-12-10 Thread shankha
I wish to make contribution to Python source code. I have studied the developers guide and made myself familiar with mercurial. I wish to start of with some doc bugs as this will give me insight into how the whole process(review, tests, patches) works. Is it okay if to take:

Re: interactive help on the base object

2013-12-10 Thread rusi
On Tuesday, December 10, 2013 3:07:36 PM UTC+5:30, Mark Lawrence wrote: On 10/12/2013 05:16, rusi wrote: On Tuesday, December 10, 2013 10:40:27 AM UTC+5:30, Steven D'Aprano wrote: By the way, I'm curious. Why are discussions about object oriented coding off-topic to Python? This is not a

Re: Permission for contribution: http://bugs.python.org/issue19940

2013-12-10 Thread Tim Golden
On 10/12/2013 11:35, shankha wrote: I wish to make contribution to Python source code. I have studied the developers guide and made myself familiar with mercurial. I wish to start of with some doc bugs as this will give me insight into how the whole process(review, tests, patches) works. Is it

Re: Permission for contribution: http://bugs.python.org/issue19940

2013-12-10 Thread Tim Golden
On 10/12/2013 11:35, shankha wrote: I wish to make contribution to Python source code. I have studied the developers guide and made myself familiar with mercurial. I wish to start of with some doc bugs as this will give me insight into how the whole process(review, tests, patches) works. Is it

Re: squeeze out some performance

2013-12-10 Thread Robert Voigtländer
Actually for optimised code it looks very similar to some code posted here http://www.daniweb.com/software-development/python/threads/321181/python-bresenham-circle-arc-algorithm over three years ago. This is where it origins from. I just extended it for my needs and now want to

Re: squeeze out some performance

2013-12-10 Thread Robin Becker
On 09/12/2013 20:46, Dave Angel wrote: On Mon, 09 Dec 2013 15:54:36 +, Robin Becker ro...@reportlab.com wrote: On 06/12/2013 22:07, Joel Goldstick wrote: end, start = start, end a similar behaviour for simple assignments for less than 4 variables the tuple method is faster.

RE: noobie needs help with ctypes

2013-12-10 Thread Sells, Fred
Mucho apologies for rich text, I think I picked that up when replying to a post without properly checking. Thanks for heads up. Fred. -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread harish . barvekar
On Monday, July 20, 2009 11:28:53 PM UTC+5:30, tvashtar wrote: On Jul 20, 4:42 pm, Nike nike...@gmail.com wrote: hi!  It's looks like a ssl error . Under the following step to help u :   1. takes a simple code to confirm your pupose without ssl protocol.   2. to confirm python version and

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Chris Angelico
On Wed, Dec 11, 2013 at 12:35 AM, harish.barve...@gmail.com wrote: Is this issue fixed. I am also facing the same issue of tunneling in https request. Please suggest how to proceed further You're responding to something from 2009. It's highly likely things have changed. Does the same code

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Mark Lawrence
On 10/12/2013 13:35, harish.barve...@gmail.com wrote: On Monday, July 20, 2009 11:28:53 PM UTC+5:30, tvashtar wrote: On Jul 20, 4:42 pm, Nike nike...@gmail.com wrote: hi! It's looks like a ssl error . Under the following step to help u : 1. takes a simple code to confirm your pupose

Re: using ffmpeg command line with python's subprocess module

2013-12-10 Thread Andreas Perstinger
iMath redstone-c...@163.com wrote: we don't have permission to use the temporary file while it has not been closed,but when the file is closed , it will be destroyed by default(delete=True),but once we set delete=False,then we couldn't depend on the convenience of letting the temporary file

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Mark Lawrence
On 10/12/2013 13:47, Chris Angelico wrote: On Wed, Dec 11, 2013 at 12:35 AM, harish.barve...@gmail.com wrote: Is this issue fixed. I am also facing the same issue of tunneling in https request. Please suggest how to proceed further You're responding to something from 2009. It's highly

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Chris Angelico
On Wed, Dec 11, 2013 at 1:06 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 10/12/2013 13:47, Chris Angelico wrote: On Wed, Dec 11, 2013 at 12:35 AM, harish.barve...@gmail.com wrote: Is this issue fixed. I am also facing the same issue of tunneling in https request. Please suggest how

Re: Programming puzzle with boolean circuits

2013-12-10 Thread Antoon Pardon
Op 09-12-13 12:49, Johannes Bauer schreef: Hi group, it's somewhat OT here, but I have a puzzle to which I would like a solution -- but I'm unsure how I should tackle the problem with Python. But it's a fun puzzle, so maybe it'll be appreciated here. The question is: How do you design a

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Mark Lawrence
On 10/12/2013 14:14, Chris Angelico wrote: On Wed, Dec 11, 2013 at 1:06 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: On 10/12/2013 13:47, Chris Angelico wrote: On Wed, Dec 11, 2013 at 12:35 AM, harish.barve...@gmail.com wrote: Is this issue fixed. I am also facing the same issue of

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-10 Thread rusi
On Tuesday, December 10, 2013 4:12:53 PM UTC+5:30, Oscar Benjamin wrote: On 9 December 2013 19:57, Terry Reedy wrote: On 12/9/2013 7:23 AM, Oscar Benjamin wrote: Hi all, I work in a University Engineering faculty teaching, among other things, programming. In our last meeting about

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread rurpy
On 12/10/2013 06:47 AM, Chris Angelico wrote: On Wed, Dec 11, 2013 at 12:35 AM, harish.barve...@gmail.com wrote: Also: You appear to be using Google Groups, which is the Mos Eisley of the newsgroup posting universe. You'll do far better to instead use some other means of posting, such as the

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Mark Lawrence
On 10/12/2013 15:48, ru...@yahoo.com wrote: On 12/10/2013 06:47 AM, Chris Angelico wrote: On Wed, Dec 11, 2013 at 12:35 AM, harish.barve...@gmail.com wrote: Also: You appear to be using Google Groups, which is the Mos Eisley of the newsgroup posting universe. You'll do far better to instead

Re: ProgrammingError: (1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S SIZE 11.5 NEW IN BOX', '$49.99')'

2013-12-10 Thread Dan Stromberg
On Mon, Dec 9, 2013 at 12:41 AM, Jai jaiprakashsingh...@gmail.com wrote: sql = insert into `category` (url, catagory,price) VAlUES ('%s', '%s', '%s')%(link1,x,y) Is that VALUES or VAlUES or VAIUES? It probably should be VALUES. --

Re: ProgrammingError: (1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'S SIZE 11.5 NEW IN BOX', '$49.99')'

2013-12-10 Thread Chris Angelico
On Wed, Dec 11, 2013 at 3:23 AM, Dan Stromberg drsali...@gmail.com wrote: On Mon, Dec 9, 2013 at 12:41 AM, Jai jaiprakashsingh...@gmail.com wrote: sql = insert into `category` (url, catagory,price) VAlUES ('%s', '%s', '%s')%(link1,x,y) Is that VALUES or VAlUES or VAIUES? It

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Dan Stromberg
On Mon, Dec 9, 2013 at 10:40 PM, Ben Finney ben+pyt...@benfinney.id.auwrote: Dan Stromberg drsali...@gmail.com writes: Is anyone using a module or database that gives Python 3.x access to MPAA ratings (EG G, PG, PG-13, etc.)? What information would you want access to? Why would a library

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Dan Stromberg
On Mon, Dec 9, 2013 at 10:48 PM, Paul Scott pscott...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/12/2013 08:40, Ben Finney wrote: Dan Stromberg drsali...@gmail.com writes: Is anyone using a module or database that gives Python 3.x access to MPAA ratings (EG

Trouble with Multi-threading

2013-12-10 Thread dan . rose
I am running PYTHON 2.7.3 and executing a PYTHON program that uses multi-threading. I am running this on a 64-bit Windows 2008 R2 server (Service Pack 1). Three months ago, I was able to execute this program just fine. I ran the program and opened Task Manager and verified that the program

Re: Trouble with Multi-threading

2013-12-10 Thread Dan Stromberg
On Tue, Dec 10, 2013 at 8:21 AM, dan.r...@parker.com wrote: I am running PYTHON 2.7.3 and executing a PYTHON program that uses multi-threading. I am running this on a 64-bit Windows 2008 R2 server (Service Pack 1). Three months ago, I was able to execute this program just fine. I ran the

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread rusi
On Tuesday, December 10, 2013 9:52:47 PM UTC+5:30, Mark Lawrence wrote: On 10/12/2013 15:48, rurpy wrote: On 12/10/2013 06:47 AM, Chris Angelico wrote: On Wed, Dec 11, 2013 at 12:35 AM, harish.barvekar wrote: Also: You appear to be using Google Groups, which is the Mos Eisley of the

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Chris Angelico
On Wed, Dec 11, 2013 at 3:49 AM, rusi rustompm...@gmail.com wrote: There are 10 kinds of people in the world: those who understand binary and those who dont. There are 10 kinds of people in the world: those who understand Gray Code, those who don't, and those who confuse it with binary. ChrisA

Re: Trouble with Multi-threading

2013-12-10 Thread Roy Smith
In article mailman.3837.1386693350.18130.python-l...@python.org, dan.r...@parker.com wrote: PLEASE NOTE: The preceding information may be confidential or privileged. It only should be used or disseminated for the purpose of conducting business with Parker. If you are not an intended

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Mark Lawrence
On 10/12/2013 16:49, rusi wrote: On Tuesday, December 10, 2013 9:52:47 PM UTC+5:30, Mark Lawrence wrote: On 10/12/2013 15:48, rurpy wrote: On 12/10/2013 06:47 AM, Chris Angelico wrote: On Wed, Dec 11, 2013 at 12:35 AM, harish.barvekar wrote: Also: You appear to be using Google Groups, which

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread rurpy
On 12/10/2013 09:22 AM, Mark Lawrence wrote: On 10/12/2013 15:48, ru...@yahoo.com wrote: [...] There is no you might want to about it. There are two options here, either read and action the page so we don't see double spaced crap amongst other things, use another tool, or don't post. Mark

Re: problem with graph of python(show)

2013-12-10 Thread Asemaneh Allame
در دوشنبه 9 دسامبر 2013، ساعت 23:04:43 (UTC+3:30)، Asemaneh Allame نوشته: hi everybody i recently install python vpython(v:2.6.7) in my windows(32bit) it install succesfully but dont show some of graphes that involved their code in the lib.python , i dont know what s problem...

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Mark Lawrence
On 10/12/2013 16:59, ru...@yahoo.com wrote: On 12/10/2013 09:22 AM, Mark Lawrence wrote: On 10/12/2013 15:48, ru...@yahoo.com wrote: [...] There is no you might want to about it. There are two options here, either read and action the page so we don't see double spaced crap amongst other

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread Grant Edwards
On 2013-12-10, Chris Angelico ros...@gmail.com wrote: On Wed, Dec 11, 2013 at 3:49 AM, rusi rustompm...@gmail.com wrote: There are 10 kinds of people in the world: those who understand binary and those who dont. There are 10 kinds of people in the world: those who understand Gray Code, those

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread David Robinow
On Tue, Dec 10, 2013 at 11:59 AM, ru...@yahoo.com wrote: On 12/10/2013 09:22 AM, Mark Lawrence wrote: ... Mark is one of the resident trolls here. Among his other traits is his delusion that he is Lord High Commander of this list. Like with other trolls, the best advice is to ignore him

Re: Trouble with Multi-threading

2013-12-10 Thread Walter Hurry
On Tue, 10 Dec 2013 11:21:32 -0500, dan.rose wrote: PLEASE NOTE: The preceding information may be confidential or privileged. It only should be used or disseminated for the purpose of conducting business with Parker. If you are not an intended recipient, please notify the sender by replying

Re: Trouble with Multi-threading

2013-12-10 Thread Mark Lawrence
On 10/12/2013 16:21, dan.r...@parker.com wrote: * 216-896-3351* PLEASE NOTE: The preceding information may be confidential or privileged. It only should be used or disseminated for the purpose of conducting business with Parker. If you are not an intended recipient, please notify the sender by

Re: problem with graph of python(show)

2013-12-10 Thread Andreas Perstinger
On 10.12.2013 18:03, Asemaneh Allame wrote: my mean is obvios i cont get any graph of vpython it shows me a maseage in this form: pythonw.exe has stopped working i m sure that have a good perfect install and i dont khnow what s problem is that enouph?? No, that's not enough. You need to

Re: Problem when applying Patch from issue1424152 to get https over authenticating proxies working with urllib2 in Python 2.5

2013-12-10 Thread rurpy
On 12/10/2013 10:36 AM, David Robinow wrote: On Tue, Dec 10, 2013 at 11:59 AM, ru...@yahoo.com wrote: On 12/10/2013 09:22 AM, Mark Lawrence wrote: ... Mark is one of the resident trolls here. Among his other traits is his delusion that he is Lord High Commander of this list. Like with

Re: problem with graph of python(show)

2013-12-10 Thread Terry Reedy
On 12/10/2013 12:03 PM, Asemaneh Allame wrote: thanks for your attention my mean is obvios i cont get any graph of vpython I am fairly expert with python but know almost nothing about vpython. I have no idea what 'graph of python' or 'graph of vpython' means. I suggest that you find a

Re: Permission for contribution: http://bugs.python.org/issue19940

2013-12-10 Thread Terry Reedy
On 12/10/2013 6:35 AM, shankha wrote: I wish to make contribution to Python source code. I have studied the developers guide and made myself familiar with mercurial. I wish to start of with some doc bugs as this will give me insight into how the whole process(review, tests, patches) works. Is it

ANN: Wing IDE 5.0.1 released

2013-12-10 Thread Wingware
Hi, Wingware has released version 5.0.1 of Wing IDE, our integrated development environment designed specifically for the Python programming language. Wing IDE includes a professional quality code editor with vi, emacs, and other key bindings, auto-completion, call tips, refactoring,

Re: Trouble with Multi-threading

2013-12-10 Thread feedthetroll
Am Dienstag, 10. Dezember 2013 17:21:32 UTC+1 schrieb dan@parker.com: PLEASE NOTE: The preceding information may be confidential or privileged. It only should be used or disseminated for the purpose of conducting business with Parker. If you are not an intended recipient, please notify the

Alternate initializer pattern?

2013-12-10 Thread buchanae
Hello. I've been pondering an alternate initializer pattern that I've attempted to document here: https://gist.github.com/abuchanan/7882317 Instead of using classmethod, I invent a new descriptor alt_init that creates an instance and passes it to the decorated function as the first argument

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Ben Finney
Dan Stromberg drsali...@gmail.com writes: On Mon, Dec 9, 2013 at 10:40 PM, Ben Finney ben+pyt...@benfinney.id.auwrote: What information would you want access to? Why would a library (rather than, say, a short set of strings) be needed? Movie ratings. EG G, PG, PG-13, etc. That tells me

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Petite Abeille
On Dec 10, 2013, at 6:25 AM, Dan Stromberg drsali...@gmail.com wrote: The IMDB flat text file probably came the closest, but it appears to have encoding issues; it's apparently nearly windows-1255, but not quite. It's ISO-8859-1. Both certificates.list.gz and mpaa-ratings-reasons.list.gz

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-10 Thread Gregory Ewing
Chris Angelico wrote: But in teaching woodwork you SHOULD let people use basic tools, and not just a CNC lathe. Programming shouldn't be painful just for the sake of making it painful. That's the only point I was trying to make. Pain in and of itself doesn't help anyone to learn anything! --

ANN: pathlib 0.97 released

2013-12-10 Thread Antoine Pitrou
Hello, As you may know, pathlib has recently been accepted for inclusion into the Python 3.4 standard library. You can view the new module's documentation here: http://docs.python.org/dev/library/pathlib.html As part of the inclusion process, many API changes were done to the original pathlib

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-10 Thread Ethan Furman
On 12/09/2013 05:24 AM, Gene Heskett wrote: I toss out that 1. a semester is insufficient to gain a working familiarity with either python or java. I don't know about java, but it would certainly be enough to get a good start in Python. 2. If you want to start at the nuts and bolts

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-10 Thread Ethan Furman
On 12/09/2013 08:10 AM, Gene Heskett wrote: On Monday 09 December 2013 10:46:42 Larry Martell did opine: On Mon, Dec 9, 2013 at 8:24 AM, Gene Heskett wrote: On Monday 09 December 2013 07:51:12 Oscar Benjamin did opine: [weapon of mass snippage] Okay, folks, it's really okay to snip stuff!

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Michael Torrie
On 12/10/2013 01:26 PM, Ben Finney wrote: Movie ratings. EG G, PG, PG-13, etc. That tells me only that you want short strings. Based on what you've said so far, your requirements can be met with code like this: movie_ratings = [G, PG, PG-13, …] which doesn't need a library to

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Ben Finney
Michael Torrie torr...@gmail.com writes: I'm not sure whether there's actual confusion here on your part, or deliberate obtuseness. Not confusion, but a desire to avoid guesses based on very vague requirements. From the other comments on this thread, it seems some people at least understand

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Dan Stromberg
On Tue, Dec 10, 2013 at 1:07 PM, Petite Abeille petite.abei...@gmail.comwrote: On Dec 10, 2013, at 6:25 AM, Dan Stromberg drsali...@gmail.com wrote: The IMDB flat text file probably came the closest, but it appears to have encoding issues; it's apparently nearly windows-1255, but not quite.

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Dan Stromberg
On Tue, Dec 10, 2013 at 3:34 PM, Ben Finney ben+pyt...@benfinney.id.auwrote: Michael Torrie torr...@gmail.com writes: I'm not sure whether there's actual confusion here on your part, or deliberate obtuseness. Not confusion, but a desire to avoid guesses based on very vague requirements.

Re: PEP 450 Adding a statistics module to Python

2013-12-10 Thread CM
On Friday, August 9, 2013 9:10:18 PM UTC-4, Steven D'Aprano wrote: I am seeking comments on PEP 450, Adding a statistics module to Python's standard library: I just saw today that this will be included in Python 3.4. Congratulations, Steven, this is a nice addition. --

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Ben Finney
Dan Stromberg drsali...@gmail.com writes: What part of movie ratings (EG G, PG, PG-13) don't you understand? As stated, that example requirement is satisfied by a list of strings ‘[G, PG, PG-13]’. If your example of “movie ratings” is a small collection of short strings, then that's all I've

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Mark Lawrence
On 10/12/2013 23:50, Dan Stromberg wrote: But I believe imdbpy is 2.7 only. I guess it wouldn't be that difficult to run it through 2to3. Try that and see what happens? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark

Re: interactive help on the base object

2013-12-10 Thread alex23
On 10/12/2013 7:37 PM, Mark Lawrence wrote: One of the great joys of reading this list is how wonderfully OT it can get. I have the right to make this statement as I started *THIS* thread. Now what *WERE* we talking about? :) The God Object (or Higgs Object for the non-theists). --

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-10 Thread Denis McMahon
On Tue, 10 Dec 2013 20:35:47 -0500, Dennis Lee Bieber wrote: On Tue, 10 Dec 2013 18:25:48 +1300, Gregory Ewing greg.ew...@canterbury.ac.nz declaimed the following: That's like saying that when teaching woodwork we shouldn't let people use hammers, we should make them use rocks to bang nails

Unit testing asynchronous processes

2013-12-10 Thread Tim Chase
I've got some code that kicks off a background request to a remote server over an SSL connection using client-side certificates. Since the request is made from a separate thread, I'm having trouble testing that everything is working without without spinning up an out-of-band mock server and

grab dict keys/values without iterating ?!

2013-12-10 Thread Tamer Higazi
Hi people! Is there a way to get dict by search terms without iterating the entire dictionary ?! Let us assume I have: {'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'} I want to grab the dict's key and values started with 'Ar'... I could

Re: Unit testing asynchronous processes

2013-12-10 Thread Terry Reedy
On 12/10/2013 9:24 PM, Tim Chase wrote: I've got some code that kicks off a background request to a remote server over an SSL connection using client-side certificates. Since the request is made from a separate thread, I'm having trouble testing that everything is working without without

Re: grab dict keys/values without iterating ?!

2013-12-10 Thread MRAB
On 11/12/2013 00:02, Tamer Higazi wrote: Hi people! Is there a way to get dict by search terms without iterating the entire dictionary ?! Let us assume I have: {'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'} I want to grab the dict's key

Re: grab dict keys/values without iterating ?!

2013-12-10 Thread Tim Chase
On 2013-12-11 02:02, Tamer Higazi wrote: Is there a way to get dict by search terms without iterating the entire dictionary ?! Let us assume I have: {'Amanda':'Power','Amaly':'Higgens','Joseph':'White','Arlington','Black','Arnold','Schwarzenegger'}

Re: grab dict keys/values without iterating ?!

2013-12-10 Thread Ben Finney
Tamer Higazi tamerito...@arcor.de writes: Is there a way to get dict by search terms without iterating the entire dictionary ?! (A language note: you may be unaware that “?!” does not connote a simple question, but outrage or incredulity or some other indignant expression. This implies not a

Re: Movie (MPAA) ratings and Python?

2013-12-10 Thread Dan Stromberg
On Tue, Dec 10, 2013 at 4:07 PM, Mark Lawrence breamore...@yahoo.co.ukwrote: On 10/12/2013 23:50, Dan Stromberg wrote: But I believe imdbpy is 2.7 only. I guess it wouldn't be that difficult to run it through 2to3. Try that and see what happens? 2to3 doesn't necessarily produce working

python import error

2013-12-10 Thread smilesonisamal
Hi, I am a new bie in python I was trying to execute the python script aaa.py in fedora which imports different modules. Actually when I am executing the aaa.py I am getting the following error and PYTHON_PATH=/bin/python which has a symlink to python-2.7. Please help me in this regard? I am

Re: python import error

2013-12-10 Thread Michael Torrie
On 12/10/2013 08:56 PM, smilesonisa...@gmail.com wrote: Traceback (most recent call last): File aaa.py, line 5, in module from ccc.ddd import sss ImportError: No module named ccc.ddd directory structure as follows: ccc | ddd | aaa.py sss.py This is because

Re: grab dict keys/values without iterating ?!

2013-12-10 Thread Dave Angel
On Wed, 11 Dec 2013 02:02:20 +0200, Tamer Higazi tamerito...@arcor.de wrote: Is there a way to get dict by search terms without iterating the entire dictionary ?! I want to grab the dict's key and values started with 'Ar'... Your wording is so ambiguous that each respondent has guessed

Re: python import error

2013-12-10 Thread John Gordon
In 93405ea9-6faf-4a09-9fd9-ed264e313...@googlegroups.com smilesonisa...@gmail.com writes: File aaa.py, line 5, in module from ccc.ddd import sss ImportError: No module named ccc.ddd directory structure as follows: ccc | ddd | aaa.py sss.py A python file isn't

Re: python import error

2013-12-10 Thread Michael Torrie
On 12/10/2013 09:25 PM, Michael Torrie wrote: On 12/10/2013 08:56 PM, smilesonisa...@gmail.com wrote: Traceback (most recent call last): File aaa.py, line 5, in module from ccc.ddd import sss ImportError: No module named ccc.ddd directory structure as follows: ccc | ddd |

Re: python import error

2013-12-10 Thread smilesonisamal
On Wednesday, December 11, 2013 10:23:34 AM UTC+5:30, John Gordon wrote: In 93405ea9-6faf-4a09-9fd9-ed264e313...@googlegroups.com smilesonisa...@gmail.com writes: File aaa.py, line 5, in module from ccc.ddd import sss ImportError: No module named ccc.ddd directory

Re: python import error

2013-12-10 Thread Benjamin Kaplan
On Tue, Dec 10, 2013 at 9:45 PM, smilesonisa...@gmail.com wrote: On Wednesday, December 11, 2013 10:23:34 AM UTC+5:30, John Gordon wrote: In 93405ea9-6faf-4a09-9fd9-ed264e313...@googlegroups.com smilesonisa...@gmail.com writes: File aaa.py, line 5, in module from ccc.ddd import

load_module for import entire package

2013-12-10 Thread Sergey
Hi, I need to import package and instantiate a class, defined in one of modules, located in package. Package is located in folder tmp. basedir - path to running python script. I'm doing it so: import imp def load_package_strict(p_package_name, p_package_path): f, filename, description =

[issue19481] IDLE hangs while printing instance of Unicode subclass

2013-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good suggestion Terry. And for unicode in 2.7 we can use unicode.__getslice__(s, None, None) (because there is no unicode.__unicode__). -- ___ Python tracker rep...@bugs.python.org

[issue19481] IDLE hangs while printing instance of Unicode subclass

2013-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset df9596ca838c by Serhiy Storchaka in branch '2.7': Issue #19481: print() of unicode, str or bytearray subclass instance in IDLE http://hg.python.org/cpython/rev/df9596ca838c New changeset d462b2bf875b by Serhiy Storchaka in branch '3.3': Issue

[issue19928] Implement cell repr test

2013-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset d98c5806c33c by Serhiy Storchaka in branch '2.7': Issue #19928: Implemented a test for repr() of cell objects. http://hg.python.org/cpython/rev/d98c5806c33c New changeset 49eb895be796 by Serhiy Storchaka in branch '3.3': Issue #19928: Implemented a

[issue19928] Implement cell repr test

2013-12-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19928

[issue19481] IDLE hangs while printing instance of Unicode subclass

2013-12-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19481

[issue19939] Deprecate portions or all of pkgutil module.

2013-12-10 Thread Nick Coghlan
Nick Coghlan added the comment: Programmatic deprecation definitely isn't worth it - setuptools et al need this for cross-version compatibility with 2.x, and packaging tools are hard enough to write without us programatically deprecating things in 3.x releases. Explicit documented

[issue19717] resolve() fails when the path doesn't exist

2013-12-10 Thread Vajrasky Kok
Vajrasky Kok added the comment: Thanks for the review, Antoine! Here is the updated patch. I haven't tested it on Windows yet because I want to clarify one thing. Let's say we have this valid directory: /tmp/@test123 = directory And this directory only has one valid file:

[issue19914] help([object]) returns Not enough memory. on standard Python types, object and object functions

2013-12-10 Thread Mark Lawrence
Mark Lawrence added the comment: I can confirm that code page 65001 is the problem using 3.3.3 on Windows 7. -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19914 ___

[issue18996] unittest: more helpful truncating long strings

2013-12-10 Thread Vajrasky Kok
Vajrasky Kok added the comment: Hello, Serhiy. Do you want to remove this debug messaging? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18996 ___

[issue19914] help([object]) returns Not enough memory. on standard Python types, object and object functions

2013-12-10 Thread STINNER Victor
STINNER Victor added the comment: It looks like the issue comes from the more system command, used as a pager for the documentation. When the OEM code page is set to 65001 (ex: type chcp 65001 in a Windows console), more document.txt does nothing (display nothing and exit). Try commamands:

[issue19846] Python 3 raises Unicode errors with the C locale

2013-12-10 Thread STINNER Victor
STINNER Victor added the comment: 2013/12/10 Martin v. Löwis rep...@bugs.python.org: From what I read, it appears that the SO posting is plain wrong. Consider, for example, https://developer.gnome.org/glib/stable/glib-Character-Set-Conversion.html#g-filename-to-utf8 # Converts a string

[issue19017] selectors: towards uniform EBADF handling

2013-12-10 Thread STINNER Victor
STINNER Victor added the comment: What is the status of this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19017 ___ ___

[issue19017] selectors: towards uniform EBADF handling

2013-12-10 Thread STINNER Victor
STINNER Victor added the comment: The issue #19876 has been closed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19017 ___ ___

[issue19407] PEP 453: update the Installing Python Modules documentation

2013-12-10 Thread Nick Coghlan
Nick Coghlan added the comment: After reviewing the Extending Embedding docs recently, I think a disclaimer/redirect to the tool recommendations in the Python Packaging User Guide is appropriate there as well. Marcus also added an issue to update the distutils docs themselves:

[issue19941] python -m imports non-ASCII .py file without encoding declaration

2013-12-10 Thread Jakub Wilk
New submission from Jakub Wilk: If you have a non-ASCII .py file without encoding declaration, then you can't normally import it: $ python --version Python 2.7.6 $ python -c 'import test' Traceback (most recent call last): File string, line 1, in module File test.py, line 1 SyntaxError:

[issue19941] python -m imports non-ASCII .py file without encoding declaration

2013-12-10 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +brett.cannon, haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19941 ___ ___

[issue17762] platform.linux_distribution() should honor /etc/os-release

2013-12-10 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17762 ___ ___ Python-bugs-list mailing list

[issue19907] gettext - Non ascii chars in header

2013-12-10 Thread Jakub Wilk
Jakub Wilk added the comment: See also issue18128. Date headers are not only for humans; I've seen software that parses them. -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19907

[issue19783] No SSL match_hostname() in nntplib

2013-12-10 Thread Jakub Wilk
Changes by Jakub Wilk jw...@jwilk.net: -- nosy: +jwilk ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19783 ___ ___ Python-bugs-list mailing list

[issue19407] PEP 453: update the Installing Python Modules documentation

2013-12-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset a9f91a38a265 by Nick Coghlan in branch '2.7': Issue #19407: add Python Packaging User Guide notes http://hg.python.org/cpython/rev/a9f91a38a265 -- nosy: +python-dev ___ Python tracker

[issue19693] make altinstall make install behaviour differs from make install

2013-12-10 Thread Donald Stufft
Donald Stufft added the comment: Making this happen is a non trivial change to pip. Is this *required* for PEP453? The problem is the pip dependency is already being seen as fulfilled so it's not reinstalling pip again with the new options picked. Likely the actual answer is a command in pip

[issue19728] PEP 453: enable pip by default in the Windows binary installers

2013-12-10 Thread Donald Stufft
Donald Stufft added the comment: Is there anything left in this ticket to be done? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19728 ___ ___

  1   2   3   >