Re: [Tutor] how to invert tuples

2015-11-22 Thread Laura Creighton
In a message of Sun, 22 Nov 2015 21:58:35 +0100, marcus lütolf writes: >dear pythonistas > >i have written the code below for identifying tuples occurring twice or more >times in the list of tuples called "flights". >1. Question: How can i modify this code so it does not matter which string is >f

[Tutor] ascii to/from AL32UTF8 conversion

2015-11-22 Thread bruce
Hi. Doing a 'simple' test with linux command line curl, as well as pycurl to fetch a page from a server. The page has a charset of >>AL32UTF8. Anyway to conert this to straight ascii. Python is throwing a notice/error on the charset in another part of the test.. The target site is US based, so

Re: [Tutor] how to invert tuples

2015-11-22 Thread Steven D'Aprano
On Sun, Nov 22, 2015 at 09:58:35PM +0100, marcus lütolf wrote: > dear pythonistas > > i have written the code below for identifying tuples occurring twice > or more times in the list of tuples called "flights". > 1. Question: How can i modify this code so it does not matter which > string is fir

Re: [Tutor] how to invert tuples

2015-11-22 Thread Alan Gauld
On 22/11/15 20:58, marcus lütolf wrote: dear pythonistas i have written the code below for identifying tuples occurring > twice or more times in the list of tuples called "flights". First thing to point out is that flights is not a list of tuples, its a tuple of tuples. Lists must be enclosed

[Tutor] how to invert tuples

2015-11-22 Thread marcus lütolf
dear pythonistas i have written the code below for identifying tuples occurring twice or more times in the list of tuples called "flights". 1. Question: How can i modify this code so it does not matter which string is first and which is second or (h,i) == (i,h) respectively ? 2. Question: On my

Re: [Tutor] How to kill a thread

2015-11-22 Thread Laura Creighton
In a message of Sun, 22 Nov 2015 21:40:13 +0530, CMG Thrissur writes: > > > >On Sunday 22 November 2015 05:24 PM, Laura Creighton wrote: >> In a message of Sun, 22 Nov 2015 11:23:58 +0530, CMG Thrissur writes: >>> Hello, I have seen some examples of terminating a thread the safe >>> way. But is th

Re: [Tutor] How to kill a thread

2015-11-22 Thread CMG Thrissur
On Sunday 22 November 2015 05:24 PM, Laura Creighton wrote: In a message of Sun, 22 Nov 2015 11:23:58 +0530, CMG Thrissur writes: Hello, I have seen some examples of terminating a thread the safe way. But is there a way to kill a thread without worrying about what happens next. Like thread.st

Re: [Tutor] How to kill a thread

2015-11-22 Thread Laura Creighton
In a message of Sun, 22 Nov 2015 11:23:58 +0530, CMG Thrissur writes: >Hello, > >I have seen some examples of terminating a thread the safe way. But is >there a way to kill a thread without worrying about what happens next. >Like thread.stop() or something > >George import sys sys.exit(1) This

Re: [Tutor] How to kill a thread

2015-11-22 Thread Steven D'Aprano
On Sun, Nov 22, 2015 at 11:23:58AM +0530, CMG Thrissur wrote: > Hello, > > I have seen some examples of terminating a thread the safe way. But is > there a way to kill a thread without worrying about what happens next. > Like thread.stop() or something No. Threads in Python cannot be killed.

[Tutor] How to kill a thread

2015-11-22 Thread CMG Thrissur
Hello, I have seen some examples of terminating a thread the safe way. But is there a way to kill a thread without worrying about what happens next. Like thread.stop() or something George ___ Tutor maillist - Tutor@python.org To unsubscribe or c