Re: Sorting list alphabetically

2014-04-27 Thread Kev Dwyer
Terry Reedy wrote: > On 4/27/2014 6:40 AM, Kev Dwyer wrote: >> Igor Korot wrote: >> >>> Hi, ALL, >>> I need to perform a subj. >>> Looking at the Google I found following thread with explanation: >>> >>> http://stackoverflow.com/questions/36139/how-do-i-sort-a-list-of- strings- >> in-python >>> >>

Inconsistent viewkeys behaviour

2014-04-27 Thread Joshua Landau
Is there any reference for this strange behaviour on Python 2: >>> set() < dict().viewkeys() Traceback (most recent call last): File "", line 1, in TypeError: can only compare to a set >>> dict().viewkeys() > set() False ? -- https://mail.python.org/mailman/listinfo/py

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-27 Thread Chris Angelico
On Mon, Apr 28, 2014 at 12:11 PM, Steven D'Aprano wrote: > Suppose we could pass variables directly to the constructor, like this: > > a = b = 2 > L = [1, 2, 3] > dctA = dict(a, b, L[1], 2, 1+1) > > Obviously all five values are 2, but what are the keys? > > The dict construct > receives five argu

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-27 Thread Steven D'Aprano
On Sun, 27 Apr 2014 21:51:54 +, Andrew Konstantaras wrote: > I guess I am missing something big as I am looking for a shorthand way > of doing the following: > >dctA = dict(x=x, y=y, ... n=n) > > This is, as I understand it a very natural way of using a dictionary. Would you pr

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-27 Thread Chris Angelico
On Mon, Apr 28, 2014 at 7:51 AM, Andrew Konstantaras wrote: > I will give the locals approach a try, it seems a little more clumsy than > simply passing the variables to the function. This is your fundamental misunderstanding that's led to all of this. You do not "pass variables to a function"; y

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-27 Thread Andrew Konstantaras
I guess I am missing something big as I am looking for a shorthand way of doing the following: dctA = dict(x=x, y=y, ... n=n) This is, as I understand it a very natural way of using a dictionary. It seems that this syntax is unnecessarily redundant and hence my goal of writing someth

Re: Sorting list alphabetically

2014-04-27 Thread Terry Reedy
On 4/27/2014 6:40 AM, Kev Dwyer wrote: Igor Korot wrote: Hi, ALL, I need to perform a subj. Looking at the Google I found following thread with explanation: http://stackoverflow.com/questions/36139/how-do-i-sort-a-list-of-strings- in-python However, doing this in my python shell produces an

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-27 Thread Chris Angelico
On Mon, Apr 28, 2014 at 4:56 AM, Andrew Konstantaras wrote: > Thanks for the response and I can certainly see that this old code can be > improved, but I respectfully disagree on the utility of this function. The > flexibility of passing any number of arguments to the function and returning > a d

Re: Help with changes in traceback stack from Python 2.7 to Python 3.x

2014-04-27 Thread Andrew Konstantaras
Thanks for the response and I can certainly see that this old code can be improved, but I respectfully disagree on the utility of this function. The flexibility of passing any number of arguments to the function and returning a dictionary is much easier than writing out dict(x=x, y=y, ...n=n).

Re: Disaster Mitigation Program - Apr. 27, 2014

2014-04-27 Thread E.D.G.
"E.D.G." wrote in message news:9jydndajlf5n1sdonz2dnuvz_oqdn...@earthlink.com... A PROPOSED INTERNET-BASED DISASTER ANTICIPATION AND RESPONSE COMPUTER PROGRAM Posted by E.D.G. on April 27, 2014 http://www.freewebs.com/eq-forecasting/Disaster_Response_System.html http://www.freewebs.com/eq-

Re: How to get final URL after redirection

2014-04-27 Thread Denis McMahon
On Sun, 27 Apr 2014 22:41:57 +0500, Rana Muhammad Usman wrote: > On Sun, Apr 27, 2014 at 8:55 PM, Joel Goldstick > wrote: >> wrote: >>> Hi Nsihant, I need your help, can I get your email address? >> Huh? His email is in his post On Apr 27, 2014 11:45 AM, > Not visible to me, can you tell me p

Re: How to get final URL after redirection

2014-04-27 Thread Rana Muhammad Usman
Not visible to me, can you tell me please? On Sun, Apr 27, 2014 at 8:55 PM, Joel Goldstick wrote: > Huh? His email is in his post > On Apr 27, 2014 11:45 AM, wrote: > >> Hi Nsihant, I need your help, can I get your email address? >> -- >> https://mail.python.org/mailman/listinfo/python-list >

Re: Unicode in Python

2014-04-27 Thread Rustom Mody
On Wednesday, April 23, 2014 11:29:13 PM UTC+5:30, Rustom Mody wrote: > On Wednesday, April 23, 2014 1:23:00 PM UTC+5:30, Steven D'Aprano wrote: > > On Tue, 22 Apr 2014 23:57:46 -0700, Rustom Mody wrote: > > > On the other hand when/if a keyboard mapping is defined in which the > > > characters th

Re: How to get final URL after redirection

2014-04-27 Thread Joel Goldstick
Huh? His email is in his post On Apr 27, 2014 11:45 AM, wrote: > Hi Nsihant, I need your help, can I get your email address? > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: How to get final URL after redirection

2014-04-27 Thread ranasaani
Hi Nsihant, I need your help, can I get your email address? -- https://mail.python.org/mailman/listinfo/python-list

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-27 Thread Chris Angelico
On Mon, Apr 28, 2014 at 12:16 AM, Matthew Pounsett wrote: > On Friday, 25 April 2014 10:05:03 UTC-4, Chris Angelico wrote: >> First culprit I'd look at is the mixing of subprocess and threading. >> It's entirely possible that something goes messy when you fork from a >> thread. > > I liked the th

Re: Unicode in Python

2014-04-27 Thread wxjmfauth
Le samedi 26 avril 2014 15:38:29 UTC+2, Ian a écrit : > On Apr 26, 2014 3:46 AM, "Frank Millman" wrote: > > > > > > > > > wrote in message > > > news:03bb12d8-93be-4ef6-94ae-4a02789ae...@googlegroups.com... > > > > == > > > > > > > > I wrote once 90 % of Python 2 apps (a generic te

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-27 Thread Matthew Pounsett
On Friday, 25 April 2014 14:58:56 UTC-4, Ned Deily wrote: > FWIW, the Python 2 version of subprocess is known to be thread-unsafe. > There is a Py2 backport available on PyPI of the improved Python 3 > subprocess module: Since that't the only thread that calls anything in subprocess, and I'm o

Re: MacOS 10.9.2: threading error using python.org 2.7.6 distribution

2014-04-27 Thread Matthew Pounsett
On Friday, 25 April 2014 10:05:03 UTC-4, Chris Angelico wrote: > First culprit I'd look at is the mixing of subprocess and threading. > It's entirely possible that something goes messy when you fork from a > thread. I liked the theory, but I've run some tests and can't reproduce the error that w

Re: Sorting list alphabetically

2014-04-27 Thread Peter Otten
Igor Korot wrote: > Hi, ALL, > I need to perform a subj. > Looking at the Google I found following thread with explanation: > > http://stackoverflow.com/questions/36139/how-do-i-sort-a-list-of-strings-in-python > > However, doing this in my python shell produces an error: > > C:\Documents and S

Re: Sorting list alphabetically

2014-04-27 Thread Kev Dwyer
Igor Korot wrote: > Hi, ALL, > I need to perform a subj. > Looking at the Google I found following thread with explanation: > > http://stackoverflow.com/questions/36139/how-do-i-sort-a-list-of-strings- in-python > > However, doing this in my python shell produces an error: > > C:\Documents and

Sorting list alphabetically

2014-04-27 Thread Igor Korot
Hi, ALL, I need to perform a subj. Looking at the Google I found following thread with explanation: http://stackoverflow.com/questions/36139/how-do-i-sort-a-list-of-strings-in-python However, doing this in my python shell produces an error: C:\Documents and Settings\Igor.FORDANWORK\My Documents\

Re: need help in adding xlrd file to the dictionary.

2014-04-27 Thread Steven D'Aprano
On Sun, 27 Apr 2014 00:16:41 -0700, uma mahesh wrote: > Hello guys, > > I am new to python scripting. I am trying to take data from excel sheet. > > To do this I understand that xlrd need to add to the dictionary. I was > unable to do this. I have downloaded the file and stuck there. > > Please

need help in adding xlrd file to the dictionary.

2014-04-27 Thread uma mahesh
Hello guys, I am new to python scripting. I am trying to take data from excel sheet. To do this I understand that xlrd need to add to the dictionary. I was unable to do this. I have downloaded the file and stuck there. Please let me know how can I do this. tell me the procedure. Regards Mahes