Re: Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Steven D'Aprano
On Friday 20 March 2015 14:47, Rustom Mody wrote: > On Friday, March 20, 2015 at 9:05:19 AM UTC+5:30, Chris Angelico wrote: >> On Fri, Mar 20, 2015 at 2:27 PM, Rustom Mody wrote: >> > Numbers (not complex) satisfy the trichotomy law: ie for any 2 numbers >> > x,y: x < y or x > y o x = y >> >> Re

Re: Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Chris Angelico
On Fri, Mar 20, 2015 at 4:09 PM, Ben Finney wrote: > Chris Angelico writes: > >> Real numbers, yes […] but not IEEE floating point. Be careful of that >> distinction; we're talking about computers here, not mythical numbers. > > So real numbers are mythical? IEEE floating point values are more re

Re: Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Ben Finney
Chris Angelico writes: > Real numbers, yes […] but not IEEE floating point. Be careful of that > distinction; we're talking about computers here, not mythical numbers. So real numbers are mythical? IEEE floating point values are more real than real numbers? Just what are you saying, man? -- \

Re: Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Chris Angelico
On Fri, Mar 20, 2015 at 2:47 PM, Rustom Mody wrote: > IOW: float is a poor approximation to ℝ. Of course it's a poor approximation. That's because real numbers are uncountably infinite, so it's rather tricky to represent and manipulate them efficiently. IEEE 754 gives us practicality rather than

beautifulSoup 4.1

2015-03-19 Thread Sayth Renshaw
HI Probably very easy question. If I have a section of html. App Approaching D/N Did nothing DGO Didn't go on DRO Didn't run on H/In Hung in H/Out Hung out I can easily get the class values out. In [69]: soup.find_all("td", class_="abbreviation") Out[69]: [App, D/N, DGO, DRO, H/In, H/Ou

Re: Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Rustom Mody
On Friday, March 20, 2015 at 9:05:19 AM UTC+5:30, Chris Angelico wrote: > On Fri, Mar 20, 2015 at 2:27 PM, Rustom Mody wrote: > > Numbers (not complex) satisfy the trichotomy law: ie for any 2 numbers x,y: > > x < y or x > y o x = y > > Real numbers, yes, and integers in most computer representat

Re: Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Chris Angelico
On Fri, Mar 20, 2015 at 2:27 PM, Rustom Mody wrote: > Numbers (not complex) satisfy the trichotomy law: ie for any 2 numbers x,y: > x < y or x > y o x = y Real numbers, yes, and integers in most computer representations, but not IEEE floating point. Be careful of that distinction; we're talking a

Re: Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Rustom Mody
On Friday, March 20, 2015 at 8:27:26 AM UTC+5:30, Victor Hooi wrote: > Hi Ben, > > When I said "deep", I meant, as in, to an arbitrary level of nesting (i.e. > dicts, containing dicts, containing dicts etc) - sorry if I got the > terminology wrong. > > The two dicts weren't equal by intention -

PyCon Mexico

2015-03-19 Thread Pythonízame MX
Hello, my Name is Alex Dzul. Python /Django Programmer and actively support the Python community in Spanish. - http://pythoniza.me - https://www.youtube.com/user/pythonizame - https://www.youtube.com/user/alexexc2 I wonder about the possibility of doing an event here in Mexico (PyCon Mexico).

Re: Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Victor Hooi
Hi Ben, When I said "deep", I meant, as in, to an arbitrary level of nesting (i.e. dicts, containing dicts, containing dicts etc) - sorry if I got the terminology wrong. The two dicts weren't equal by intention - the idea was that a comparison operator would return "False" for those two. I wa

Re: Python 2 to 3 conversion - embrace the pain

2015-03-19 Thread Mario Figueiredo
On Thu, 19 Mar 2015 22:03:02 -0400, Dennis Lee Bieber wrote: >On Thu, 19 Mar 2015 16:23:04 -0700, Paul Rubin >declaimed the following: > >>Steven D'Aprano writes: >> >>> Anyone remember the big backwards incompatible changes made to Visual >>> Basic? How long did that take to settle down after

Re: Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Ben Finney
Victor Hooi writes: > What is the currently most Pythonic way for doing deep comparisons > between dicts? What distinction do you intend by saying “deep comparison”? As contrasted with what? > For example, say you have the following two dictionaries > > a = { > 'bob': { 'full_name': 'bo

Deep comparison of dicts - cmp() versus ==?

2015-03-19 Thread Victor Hooi
Hi, What is the currently most Pythonic way for doing deep comparisons between dicts? For example, say you have the following two dictionaries a = { 'bob': { 'full_name': 'bob jones', 'age': 4, 'hobbies': ['hockey', 'tennis'], 'parents': { 'mother': 'mary', 'father', 'mike'}},

Re: [PyQt] win32api.LoadKeyboardLayout; any solutions for OSX?

2015-03-19 Thread michael h
Did you see this: https://bitbucket.org/ronaldoussoren/pyobjc/issue/95/attributeerror-in-some-cases-when-checking On Thu, Mar 19, 2015 at 12:20 PM, Timothy W. Grove wrote: > A personal reply to my question sent me to the following link: > http://stackoverflow.com/questions/23729704/change-os

Re: Monotheism - One God

2015-03-19 Thread hamilton
On 3/19/2015 3:57 PM, bv4bv4...@gmail.com wrote: Monotheism - One God The religion of Islam is based on one core belief, that there is no god worthy of worship but Allah. Man has invented many GODs, in their image. Pick One: http://www.godchecker.com/ -- https://mail.python.org/mailman/l

Re: Python 2 to 3 conversion - embrace the pain

2015-03-19 Thread Paul Rubin
Steven D'Aprano writes: >> better to make a fork of the language > You mean like Python 3? No I mean like C to C++, or Lisp to Clojure, etc. Or if you prefer, C to OpenCL or maybe even C++ to Java or C to Go. If you're going to break old code, go big or go home ;-). > There are still people us

Re: Python 2 to 3 conversion - embrace the pain

2015-03-19 Thread Steven D'Aprano
On Thu, 19 Mar 2015 03:35 am, Paul Rubin wrote: > Steven D'Aprano writes: >> The two weeks we lost upgrading from Python 2.6 to 2.7 is just the >> normal upgrade pains you always have to expect from any major project, > > Wait, what happened between 2.6 and 2.7 that took you two weeks of > upgra

Re: [OT] Weaknesses of distro package managers - was Re: Python 2 to 3 conversion - embrace the pain

2015-03-19 Thread Michael Torrie
On 03/19/2015 04:16 PM, John Nagle wrote: > On 3/16/2015 6:46 PM, Michael Torrie wrote: >> Since Python 3's adoption is directly impacted by package managers and >> curated repos (or lack thereof), I feel justified in continuing this >> thread just a bit farther. > >Since denying the problem d

Re: PSF Python Job Board relaunched !

2015-03-19 Thread Ben Finney
"M.-A. Lemburg" writes: >Announcing: the brand new PSF Python Job Board > *** https://www.python.org/jobs/ *** > > We are happy to announce that we have successfully relaunched the PSF > Python Job Board. Thank you to everyone involved with re-launching this important

Re: Windows service in production?

2015-03-19 Thread Michiel Overtoom
On Mar 19, 2015, at 08:00, jyothi.n...@gmail.com wrote: > file_path = "D:\Tarang\Project\form1.py" Use either slashes (/), raw strings, or double backslashes: file_path = "D:/Tarang/Project/form1.py" file_path = r"D:\Tarang\Project\form1.py"

Re: win32api.LoadKeyboardLayout; any solutions for OSX?

2015-03-19 Thread Timothy W. Grove
A personal reply to my question sent me to the following link: http://stackoverflow.com/questions/23729704/change-osx-keyboard-layoutinput-source-programmatically-via-terminal-or-appl. I seem to have found a solution that worked using PyObjC. I'm currently using Python 3.3 installed via macport

Re: Windows service in production?

2015-03-19 Thread CHIN Dihedral
Please check wxpython and there was an example. -- https://mail.python.org/mailman/listinfo/python-list

Enthought Canopy

2015-03-19 Thread subhabrata . banerji
Hi, I was trying to download Python2.7 in a new machine. I found Python2.7.9. I tried to install few libraries like Numpy, Sympy, Scipy, NLTK etc. I was trying to use http://www.lfd.uci.edu/~gohlke/pythonlibs/ to download the libraries. Initially there were some problems to download Numpy. So

Re: Root logger sanity

2015-03-19 Thread Peter Otten
Antoon Pardon wrote: > On 03/19/2015 10:35 AM, martin.spa...@gmail.com wrote: >> The following code is challenging my sanity, in my understanding of the >> documentation this should pass, given that getLogger is supposed to >> return the root logger and the root logger should be called 'root'. >

Re: Root logger sanity

2015-03-19 Thread Antoon Pardon
On 03/19/2015 10:35 AM, martin.spa...@gmail.com wrote: > The following code is challenging my sanity, in my understanding of the > documentation this should pass, given that getLogger is supposed to return > the root logger and the root logger should be called 'root'. Where do you get the idea t

Re: UnboundLocalError in TKinter, SQLAlchemy script.

2015-03-19 Thread Terry Reedy
On 3/19/2015 4:23 AM, Chris Kavanagh wrote: On Wednesday, March 18, 2015 at 5:37:53 PM UTC-4, Terry Reedy wrote: You comment out apparently irrelevant lines and see if you still have the same problem, and if you do, delete. Repeat until you have a Minimal Complete Verifiable Example. Thank

Root logger sanity

2015-03-19 Thread martin . spamer
The following code is challenging my sanity, in my understanding of the documentation this should pass, given that getLogger is supposed to return the root logger and the root logger should be called 'root'. https://docs.python.org/2/library/logging.html#logger-objects What am I missing? f

Re: Georeferencing Image with GDAL

2015-03-19 Thread Fabien
On 19.03.2015 09:00, Sumesh K.C. wrote: I've been trying to georeference image with GDAL. (...) I'm trying to do everything for the beginning. Can anyone guide me, how i should start? Hi, first I would try to do some tutorials about GDAL and read some documentation and examples. Then I would

PSF Python Job Board relaunched !

2015-03-19 Thread M.-A. Lemburg
Announcing: the brand new PSF Python Job Board *** https://www.python.org/jobs/ *** We are happy to announce that we have successfully relaunched the PSF Python Job Board. After almost one year of development and lots of work by our volunteers and contractors, we are

What does it mean when io.TextIOBase.encoding is None

2015-03-19 Thread Rocco
When using nose to run unittests, i discovered that depending on nose' command line parameters, sys.stdout.encoding can be None. I wonder what that means for an io.TextIOBase object. Is None a valid value for 'encoding'? Is None equivalent to 'ascii' in this case? If None is a valid value for io.

Re: UnboundLocalError in TKinter, SQLAlchemy script.

2015-03-19 Thread Chris Kavanagh
On Wednesday, March 18, 2015 at 5:37:53 PM UTC-4, Terry Reedy wrote: > On 3/18/2015 3:42 PM, Chris Kavanagh wrote: > > > 2nd, you say you "don't want to play guessing games", yet complain > > about "300 lines of irrelevant code", lol. Which way is it? Do you > > want the code, or not? How do I kno

Re: UnboundLocalError in TKinter, SQLAlchemy script.

2015-03-19 Thread Chris Kavanagh
On Wednesday, March 18, 2015 at 5:50:49 PM UTC-4, Mark Lawrence wrote: > On 18/03/2015 19:42, Chris Kavanagh wrote: > > > > 2nd, you say you "don't want to play guessing games", yet complain about > > "300 lines of irrelevant code", lol. Which way is it? Do you want the code, > > or not? How do

Re: UnboundLocalError in TKinter, SQLAlchemy script.

2015-03-19 Thread Chris Kavanagh
On Wednesday, March 18, 2015 at 6:38:48 PM UTC-4, Steven D'Aprano wrote: > On Thu, 19 Mar 2015 06:42 am, Chris Kavanagh wrote: > > > While I appreciate the help greatly I thought I had put the entire > > traceback of the error. I was posting here and on StackOverflow, and > > suppose I got confuse

Georeferencing Image with GDAL

2015-03-19 Thread Sumesh K.C.
Hello Everyone, I've been trying to georeference image with GDAL. I've a number of GCPs (Ground Control Points) that can be easily identified on the image. And what I'm trying is to create a program to georeference image by entering the GCP value on the corresponding point on the image (in term

Re: Howtocreateaserviceinwindowsforpythonfiles

2015-03-19 Thread Mark Lawrence
On 19/03/2015 07:40, Chris Angelico wrote: On Thu, Mar 19, 2015 at 6:34 PM, Jyothi Naidu wrote: HelloIhavecreatedapythonFilesandnowiwanttocreateaserviceforthisfileshowtodo?cananyonehelpmeonthisplease This is your third post on this subject within the hour. The other two were necro'ing a threa

Re: Howtocreateaserviceinwindowsforpythonfiles

2015-03-19 Thread Chris Angelico
On Thu, Mar 19, 2015 at 6:34 PM, Jyothi Naidu wrote: > HelloIhavecreatedapythonFilesandnowiwanttocreateaserviceforthisfileshowtodo?cananyonehelpmeonthisplease This is your third post on this subject within the hour. The other two were necro'ing a thread from 2011. Might I suggest that you wait an

Howtocreateaserviceinwindowsforpythonfiles

2015-03-19 Thread Jyothi Naidu
HelloIhavecreatedapythonFilesandnowiwanttocreateaserviceforthisfileshowtodo?cananyonehelpmeonthisplease -- https://mail.python.org/mailman/listinfo/python-list

Re: Windows service in production?

2015-03-19 Thread jyothi . nadu
On Tuesday, August 16, 2011 at 1:22:37 PM UTC+5:30, Tim Golden wrote: > On 16/08/2011 05:32, snorble wrote: > > Anyone know of a Python application running as a Windows service in > > production? I'm planning a network monitoring application that runs as > > a service and reports back to the centra

Re: Windows service in production?

2015-03-19 Thread jyothi . nadu
On Tuesday, August 16, 2011 at 10:02:02 AM UTC+5:30, snorble wrote: > Anyone know of a Python application running as a Windows service in > production? I'm planning a network monitoring application that runs as > a service and reports back to the central server. Sort of a heartbeat > type agent to