Re: logging from time critical tasks -- QueueListener().stop() takes the whole CPU

2018-07-16 Thread Cameron Simpson
On 16Jul2018 08:33, Thomas Jollans wrote: On 16/07/18 08:24, Gerlando Falauto wrote: On Monday, July 16, 2018 at 8:13:46 AM UTC+2, Thomas Jollans wrote: On 16/07/18 07:39, Gerlando Falauto wrote: On Monday, July 16, 2018 at 6:56:19 AM UTC+2, dieter wrote: ... Why is the main thread taking up

IDLE Python won't run or open, neither will it state the error for behaving this way

2018-07-16 Thread Clarence Chanda
HI, I downloaded python 3.7.0 from your python website and it was installed successfully and I was able to run/open python but when I try to run/open IDLE python, it just wont open or run, it wont even state the error causing this... Please help me, how do I fix this? -- https://mail.python.org/ma

Re: Reading EmailMessage from file

2018-07-16 Thread Paul Moore
On 16 July 2018 at 02:31, Skip Montanaro wrote: >> What are you actually trying to do? You're talking like you're trying >> to read an existing RFC822 email-with-headers from a file, but you're >> showing code that creates a new email with body content set from >> a file, which is a completely dif

Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Sun, 15 Jul 2018 17:39:55 -0700, Jim Lee wrote: > On 07/15/18 17:18, Steven D'Aprano wrote: >> On Sun, 15 Jul 2018 16:08:15 -0700, Jim Lee wrote: >> >>> Python3 is intrinsically tied to Unicode for string handling. >>> Therefore, the Python programmer is forced to deal with it (in all but >>> t

Re: Reading EmailMessage from file

2018-07-16 Thread Jon Ribbens
On 2018-07-16, Skip Montanaro wrote: >> What are you actually trying to do? You're talking like you're trying >> to read an existing RFC822 email-with-headers from a file, but you're >> showing code that creates a new email with body content set from >> a file, which is a completely different thin

Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Sun, 15 Jul 2018 18:02:51 -0700, Jim Lee wrote: > On 07/15/18 17:17, MRAB wrote: >> On 2018-07-16 00:10, Jim Lee wrote: [...] >>> Have you never heard of programming BEFORE Unicode existed? >>> >>> How ever did we get along? Mostly by not exchanging data with anyone else using a different lang

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Antoon Pardon
On 15-07-18 09:33, Marko Rauhamaa wrote: > Paul Rubin : >> Py3's unicode picture is described here and it isn't pretty: >> http://secure-web.cisco.com/1IcToGhkZqGKNSVqMv5ljEo0GVPh0uuAPgKzSBMCkoNElVbHgu4uHpyfdyIj8PrqISD2JssJJnw1yWSFp13DBGOiCdp_Mk9wI4ph_RJ63PeRB_HErunPFzgNvsDR5SDgVe66MmpAG7A4O1NO-NKK

Getting process details on an operating system process/question answer by vouce

2018-07-16 Thread John T. Haggerty
So, it's early for me---and I'm not sure if these things can be done but I'd like to know the following: 1. How can Python connect to a running operating system process on a host operating system to see what part of the execution is like?---ie keep track of health stats like it's stuck on disk acc

Re: Kindness

2018-07-16 Thread Rhodri James
On 13/07/18 20:46, Ethan Furman wrote: On 07/13/2018 11:52 AM, Rhodri James wrote: I should point out that the number of people I have killfiled in all my > Internet dealings can be counted on the fingers of one hand. Your left one? * -- ~Ethan~ * Bonus points for getting the reference. 

Re: send PIL.Image to django server side and get it back

2018-07-16 Thread Christos Georgiou - ΤΖΩΤΖΙΟΥ
On Monday, July 16, 2018 at 3:52:09 PM UTC+3, iMath wrote: > I also posted the question here > https://stackoverflow.com/questions/51355926/send-pil-image-to-django-server-side-and-get-it-back > > I don't know what's under the hood of sending an image from client side to > server side, so stuck b

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Dan Sommers
On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: > ... people who think that if ISO-8859-7 was good enough for Jesus ... It may have been good enough for his disciples, but Jesus spoke Aramaic. Also, ISO-8859-7 doesn't cover ancient polytonic Greek; it only covers modern monotonic Gree

Re: Kindness

2018-07-16 Thread Ethan Furman
On 07/16/2018 06:22 AM, Rhodri James wrote: On 13/07/18 20:46, Ethan Furman wrote: On 07/13/2018 11:52 AM, Rhodri James wrote: I should point out that the number of people I have killfiled in all my > Internet dealings can be counted on the fingers of one hand. Your left one? * * Bonus po

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Marko Rauhamaa
Antoon Pardon : > I really don't understand why the author of that article didn't just > copy his python2 program but used sys.stdin.buffer and > sys.sydout.buffer instead of plain sys.stdin and stdout. Yes, it would be nice if you could simply restrict yourself to bytes everywhere when your appl

Re: Getting process details on an operating system process/question answer by vouce

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 06:47:53 -0600, John T. Haggerty wrote: > So, it's early for me---and I'm not sure if these things can be done but > I'd like to know the following: > > 1. How can Python connect to a running operating system process on a > host operating system to see what part of the executi

Re: Kindness

2018-07-16 Thread Rhodri James
On 16/07/18 15:20, Ethan Furman wrote: On 07/16/2018 06:22 AM, Rhodri James wrote: On 13/07/18 20:46, Ethan Furman wrote: On 07/13/2018 11:52 AM, Rhodri James wrote: I should point out that the number of people I have killfiled in all my  > Internet dealings can be counted on the fingers of

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 14:17:35 +, Dan Sommers wrote: > On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: > >> ... people who think that if ISO-8859-7 was good enough for Jesus ... > > It may have been good enough for his disciples, but Jesus spoke Aramaic. The buzzing noise you just

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Antoon Pardon
On 16-07-18 16:24, Marko Rauhamaa wrote: > Antoon Pardon : > >> I really don't understand why the author of that article didn't just >> copy his python2 program but used sys.stdin.buffer and >> sys.sydout.buffer instead of plain sys.stdin and stdout. > Yes, it would be nice if you could simply rest

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Gene Heskett
On Monday 16 July 2018 10:24:28 Marko Rauhamaa wrote: > Antoon Pardon : > > I really don't understand why the author of that article didn't just > > copy his python2 program but used sys.stdin.buffer and > > sys.sydout.buffer instead of plain sys.stdin and stdout. > > Yes, it would be nice if you

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 12:54 AM, Gene Heskett wrote: > On Monday 16 July 2018 10:24:28 Marko Rauhamaa wrote: > >> Antoon Pardon : >> > I really don't understand why the author of that article didn't just >> > copy his python2 program but used sys.stdin.buffer and >> > sys.sydout.buffer instead of

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Anders Wegge Keller
> The buzzing noise you just heard was the joke whizzing past your head > *wink* I have twins aged four. They also like to yell "I cheated!", whenever they are called out. In general, you need to get rid of tat teenage brat persona you practice. The "ranting rick" charade was especially toe-

send PIL.Image to django server side and get it back

2018-07-16 Thread iMath
I also posted the question here https://stackoverflow.com/questions/51355926/send-pil-image-to-django-server-side-and-get-it-back I don't know what's under the hood of sending an image from client side to server side, so stuck by the following scenario. I want to send a PIL.Image object to djang

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Gene Heskett
On Sunday 15 July 2018 16:09:21 Chris Angelico wrote: > On Mon, Jul 16, 2018 at 4:22 AM, James Lee wrote: > > On 7/15/2018 3:43 AM, Steven D'Aprano wrote: > >> No. The real ten billion dollar question is how people in 2018 can > >> stick their head in the sand and take seriously the position that

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 1:48 AM, Gene Heskett wrote: > On Sunday 15 July 2018 16:09:21 Chris Angelico wrote: > >> On Mon, Jul 16, 2018 at 4:22 AM, James Lee wrote: >> > On 7/15/2018 3:43 AM, Steven D'Aprano wrote: >> >> No. The real ten billion dollar question is how people in 2018 can >> >> stic

Re: Python 2.7 can find cairo libs but not Python 3.6

2018-07-16 Thread D'Arcy Cain
I just realized that my subject was backwards. It's 2.7 that can find the libs and 3.6 than cannot. Just in case that makes a difference. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP: sip:da...@vybenetworks.com -- https://mail.python.org/mailman/lis

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 15:17, Dan Sommers wrote: On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: ... people who think that if ISO-8859-7 was good enough for Jesus ... It may have been good enough for his disciples, but Jesus spoke Aramaic. Also, ISO-8859-7 doesn't cover ancient polytonic Gre

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 2:05 AM, Mark Lawrence wrote: > On 16/07/18 15:17, Dan Sommers wrote: >> >> On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: >> >>> ... people who think that if ISO-8859-7 was good enough for Jesus ... >> >> >> It may have been good enough for his disciples, but J

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Gene Heskett
On Monday 16 July 2018 11:57:25 Chris Angelico wrote: > On Tue, Jul 17, 2018 at 1:48 AM, Gene Heskett wrote: > > On Sunday 15 July 2018 16:09:21 Chris Angelico wrote: > >> On Mon, Jul 16, 2018 at 4:22 AM, James Lee wrote: > >> > On 7/15/2018 3:43 AM, Steven D'Aprano wrote: > >> >> No. The real

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Larry Martell
On Mon, Jul 16, 2018 at 12:05 PM, Mark Lawrence wrote: > On 16/07/18 15:17, Dan Sommers wrote: >> >> On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: >> >>> ... people who think that if ISO-8859-7 was good enough for Jesus ... >> >> >> It may have been good enough for his disciples, but

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Steven D'Aprano
On Sun, 15 Jul 2018 16:38:41 -0700, Jim Lee wrote: > As I said, there are programming situations where the programmer only > needs to deal with a single language - his own. This might come as a shock to you, but just because Python's native string type supports (for example) the Devanagari alpha

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 17:22, Chris Angelico wrote: What characters does it use? Mostly Latin letters? Basic Latin plus U+0174 (LATIN CAPITAL LETTER W WITH CIRCUMFLEX) through to U+0177 (LATIN SMALL LETTER Y WITH CIRCUMFLEX) I think. -- Rhodri James *-* Kynesim Ltd -- https://mail.python.org/mailman/li

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 17:05, Mark Lawrence wrote: On 16/07/18 15:17, Dan Sommers wrote: On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: ... people who think that if ISO-8859-7 was good enough for Jesus ... It may have been good enough for his disciples, but Jesus spoke Aramaic. Also, ISO-8

I18N and Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Sun, 15 Jul 2018 17:28:15 -0700, Jim Lee wrote: > Unicode is an attempt to solve at least one I18N issue If you're going to insist on digging your heels in and using definitions which nobody else does, this discussion is going to go nowhere fast. Unicode is (ideally) a universal character se

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 17:26, Larry Martell wrote: On Mon, Jul 16, 2018 at 12:05 PM, Mark Lawrence wrote: On 16/07/18 15:17, Dan Sommers wrote: On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: ... people who think that if ISO-8859-7 was good enough for Jesus ... It may have been good enou

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 17:22, Chris Angelico wrote: On Tue, Jul 17, 2018 at 2:05 AM, Mark Lawrence wrote: On 16/07/18 15:17, Dan Sommers wrote: On Mon, 16 Jul 2018 10:39:49 +, Steven D'Aprano wrote: ... people who think that if ISO-8859-7 was good enough for Jesus ... It may have been good enou

Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 00:28:39 +0300, Marko Rauhamaa wrote: > if your new system used Python3's UTF-32 strings as a foundation, that > would be an equally naïve misstep. You'd need to reach a notch higher > and use glyphs or other "semiotic atoms" as building blocks. UTF-32, > after all, is a variab

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Richard Damon
> On Jul 16, 2018, at 12:51 PM, Steven D'Aprano > wrote: > >> On Mon, 16 Jul 2018 00:28:39 +0300, Marko Rauhamaa wrote: >> >> if your new system used Python3's UTF-32 strings as a foundation, that >> would be an equally naïve misstep. You'd need to reach a notch higher >> and use glyphs or othe

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Tue, 17 Jul 2018 02:22:59 +1000, Chris Angelico wrote: > On Tue, Jul 17, 2018 at 2:05 AM, Mark Lawrence > wrote: >> Out of curiosity where does my mum's Welsh come into the equation as I >> believe that it is not recognised by the EU as a language? >> >> > What characters does it use? Mostly L

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Jim Lee
On 07/16/18 03:26, Steven D'Aprano wrote: But the thing is, that complexity is *inherent in the domain*. You can try to deal with it without Unicode, and as soon as you have users expecting to use more than one code page, you're doomed. No, I'm not doomed, because there *are* no other users

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Jim Lee
On 07/16/18 03:39, Steven D'Aprano wrote: Good for you. But Python is not a programming language written to satisfy the needs of people like you, and ONLY people like you. It is a language written to satisfy the needs of people from Uzbekistan, and China, and Japan, and India, and Brazil, and

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread MRAB
On 2018-07-16 17:31, Steven D'Aprano wrote: On Sun, 15 Jul 2018 16:38:41 -0700, Jim Lee wrote: As I said, there are programming situations where the programmer only needs to deal with a single language - his own. This might come as a shock to you, but just because Python's native string type

Re: IDLE Python won't run or open, neither will it state the error for behaving this way

2018-07-16 Thread Terry Reedy
On 7/16/2018 5:22 AM, Clarence Chanda wrote: HI, I downloaded python 3.7.0 from your python website Which installer for what OS? and it was installed successfully and I was able to run/open python How did you run it? but when I try to run/open IDLE python, How? it just wont open or ru

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 13:11:23 -0400, Richard Damon wrote: >> On Jul 16, 2018, at 12:51 PM, Steven D'Aprano >> wrote: >> >>> On Mon, 16 Jul 2018 00:28:39 +0300, Marko Rauhamaa wrote: >>> >>> if your new system used Python3's UTF-32 strings as a foundation, that >>> would be an equally naïve misst

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 18:27, Jim Lee wrote: Obviously, the most vocal representatives of the Python community are too sensitive about their language to enable rational discussion. Please moderators ban this person as he's going down the same line as bartc and similar, it is completely unacceptable, he's

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Mark Lawrence
On 16/07/18 18:13, Jim Lee wrote: I just think that a language should allow one to bypass Unicode handling easily *when it's not needed*. I have no idea what this is meant to mean. I've written loads of code for my own purposes and I've never had to think about Unicode, so why should an

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: if your new system used Python3's UTF-32 strings as a foundation, Since 3.3, Python's strings are not (always) UFT-32 strings. Nor are they always UCS-2 (or partly UTF-16) strings. Nor are the always Latin-1 or Ascii strings. Python's Flexible S

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 2:24 AM, Gene Heskett wrote: > On Monday 16 July 2018 11:57:25 Chris Angelico wrote: > >> On Tue, Jul 17, 2018 at 1:48 AM, Gene Heskett > wrote: >> > On Sunday 15 July 2018 16:09:21 Chris Angelico wrote: >> >> On Mon, Jul 16, 2018 at 4:22 AM, James Lee wrote: >> >> > On 7

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 18:27, Jim Lee wrote: 90% of the world *is* "beneath my notice" when it comes to programming for myself.   I really don't care if that's not PC enough for you. Had you actually read my words with *intent* rather than *reaction*, you would notice that I suggested the *option* of tur

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Ian Kelly
On Mon, Jul 16, 2018 at 12:02 PM Terry Reedy wrote: > > On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: > > > if your new system used Python3's UTF-32 strings as a foundation, > > Since 3.3, Python's strings are not (always) UFT-32 strings. Nor are > they always UCS-2 (or partly UTF-16) strings. Nor

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Richard Damon
> On Jul 16, 2018, at 1:36 PM, Steven D'Aprano > wrote: > > On Mon, 16 Jul 2018 13:11:23 -0400, Richard Damon wrote: > >>> On Jul 16, 2018, at 12:51 PM, Steven D'Aprano >>> wrote: >>> On Mon, 16 Jul 2018 00:28:39 +0300, Marko Rauhamaa wrote: if your new system used Python3's

doubling the number of tests, but not taking twice as long

2018-07-16 Thread Larry Martell
I had some code that did this: meas_regex = '_M\d+_' meas_re = re.compile(meas_regex) if meas_re.search(filename): stuff1() else: stuff2() I then had to change it to this: if meas_re.search(filename): if 'MeasDisplay' in filename: stuff1a() else: stuff1() else:

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 10:27:18 -0700, Jim Lee wrote: > Had you actually read my words with *intent* rather than *reaction*, you > would notice that I suggested the *option* of turning off Unicode. Yes, I know what you wrote, and I read it with intent. Jim, you seem to be labouring under the misapp

Re: doubling the number of tests, but not taking twice as long

2018-07-16 Thread Stephan Houben
Op 2018-07-16, Larry Martell schreef : > I had some code that did this: > > meas_regex = '_M\d+_' > meas_re = re.compile(meas_regex) > > if meas_re.search(filename): > stuff1() > else: > stuff2() > > I then had to change it to this: > > if meas_re.search(filename): > if 'MeasDisplay' in

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 4:15 AM, Ian Kelly wrote: > On Mon, Jul 16, 2018 at 12:02 PM Terry Reedy wrote: >> >> On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: >> >> > if your new system used Python3's UTF-32 strings as a foundation, >> >> Since 3.3, Python's strings are not (always) UFT-32 strings. N

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/15/2018 4:09 PM, Jim Lee wrote: On 07/15/18 12:37, MRAB wrote: To me, Unicode and UTF-8 aren't things to be reserved for I18N. I use them as a matter of course because I find it a lot easier to stick with just one encoding, one that will work with _any_ text I have. Which is exactly th

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 4:22 AM, Richard Damon wrote: > > But I am not talking about those sort of characters or ligatures, but > ‘characters’ that are built up of a combining diacritical marks (like > accents) and a base character. Unicode define many code points for the more > common of these

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Steven D'Aprano
On Mon, 16 Jul 2018 14:22:27 -0400, Richard Damon wrote: [...] > But I am not talking about those sort of characters or ligatures, So what? I am. You don't get to say "only non-standard definitions I approve of count". There is the industry standard definition of what it means to be a fixed-

Re: Users banned

2018-07-16 Thread Steve Simmons
On 16/07/2018 03:13, Devin Jeanpierre wrote: On Sun, Jul 15, 2018 at 5:09 PM Jim Lee wrote: That is, of course, the decision of the moderators - but I happen to agree with both Christian and Ethan. Banning for the simple reason of a dissenting opinion is censorship, pure and simple. While Bar

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/16/2018 10:54 AM, Gene Heskett wrote: On Monday 16 July 2018 10:24:28 Marko Rauhamaa wrote: Plus the bytes syntax is really ugly. I wish Python3 had reserved '...' for byte strings and "..." for UTF-32 strings. Aside from the fact that Python3 strings are not UTF-32 strings, this would

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/16/2018 11:50 AM, Dennis Lee Bieber wrote: For Python 4000 maybe Please don't give people the idea that there is any current intention to have a 'Python 4000' similar to 'Python 3000'. Call it 'a mythical Python 4000', if you must use such a term. -- Terry Jan Reedy -- https

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Gene Heskett
On Monday 16 July 2018 14:01:54 Chris Angelico wrote: > On Tue, Jul 17, 2018 at 2:24 AM, Gene Heskett wrote: > > On Monday 16 July 2018 11:57:25 Chris Angelico wrote: > >> On Tue, Jul 17, 2018 at 1:48 AM, Gene Heskett > >> > > > > wrote: > >> > On Sunday 15 July 2018 16:09:21 Chris Angelico wro

Re: [SUSPICIOUS MESSAGE] Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Gene Heskett
On Monday 16 July 2018 15:04:53 Terry Reedy wrote: > On 7/16/2018 10:54 AM, Gene Heskett wrote: > > On Monday 16 July 2018 10:24:28 Marko Rauhamaa wrote: > >> Plus the bytes syntax is really ugly. I wish Python3 had reserved > >> '...' for byte strings and "..." for UTF-32 strings. > > Aside from

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 1:11 PM, Richard Damon wrote: Many consider that UTF-32 is a variable-width encoding because of the combining characters. It can take multiple ‘codepoints’ to define what should be a single ‘character’ for display. I hope you realize that this is not the standard meaning of 'va

Re: Users banned

2018-07-16 Thread Grant Edwards
On 2018-07-16, Steve Simmons wrote: > +1  Seems to me Bart is being banned for "being a dick" and "talking > rubbish" (my words/interpretation) with irritating persistence. Wonder > how many of the non-banned members have been guilty of the same thing in > one way or another. I'm sure many of

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 19:31, Steven D'Aprano wrote: I'm simply not seeing the advantage of: from __future__ import no_unicode print("Hello World!") # stand in for any string handling on ASCII Sure this should be "from __past__ import no_unicode"? gd&r -- Rhodri James *-* Kynesim Ltd -- http

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Jim Lee
On 07/16/18 10:40, Mark Lawrence wrote: On 16/07/18 18:27, Jim Lee wrote: Obviously, the most vocal representatives of the Python community are too sensitive about their language to enable rational discussion. Please moderators ban this person as he's going down the same line as bartc and s

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Marko Rauhamaa
Terry Reedy : > On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: >> if your new system used Python3's UTF-32 strings as a foundation, > > Since 3.3, Python's strings are not (always) UFT-32 strings. You are right. Python's strings are a superset of UTF-32. More accurately, Python's strings are UTF-32

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Jim Lee
On 07/16/18 11:31, Steven D'Aprano wrote: On Mon, 16 Jul 2018 10:27:18 -0700, Jim Lee wrote: Had you actually read my words with *intent* rather than *reaction*, you would notice that I suggested the *option* of turning off Unicode. Yes, I know what you wrote, and I read it with intent. Ji

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 18:38, Rhodri James wrote: Actually having an option of turning off Unicode *does* make it harder to use, because you end up coming across programs that have Unicode and surprise you when they misbehave.  And yes I saw that 90% of your programs aren't intended to get out into the wo

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 1:13 PM, Jim Lee wrote: I just think that a language should allow one to bypass Unicode handling easily *when it's not needed*. Both for patching IDLE and for my currently private work, I usually only use Ascii, and no unicode escapes. When I do, it does not matter whether edit

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Steven D'Aprano : > Under that standard definition, UTF-8 and UTF-16 are variable-width, > and UTF-32 is fixed-width. > > But I'll accept that UTF-32 is variable-width if Marko accepts that > ASCII is too. If that makes you happy, fine. The point is, UTF-32 has no advantages over UTF-8. And I'm re

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 5:16 AM, Gene Heskett wrote: > On Monday 16 July 2018 14:01:54 Chris Angelico wrote: > >> On Tue, Jul 17, 2018 at 2:24 AM, Gene Heskett > wrote: >> > On Monday 16 July 2018 11:57:25 Chris Angelico wrote: >> >> On Tue, Jul 17, 2018 at 1:48 AM, Gene Heskett >> >> >> > >> >

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Rhodri James
On 16/07/18 20:40, Marko Rauhamaa wrote: Terry Reedy: On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: if your new system used Python3's UTF-32 strings as a foundation, Since 3.3, Python's strings are not (always) UFT-32 strings. You are right. Python's strings are a superset of UTF-32. More accu

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Terry Reedy
On 7/16/2018 1:27 PM, Jim Lee wrote: 90% of the world *is* "beneath my notice" when it comes to programming for myself.   I really don't care if that's not PC enough for you. Had you actually read my words with *intent* rather than *reaction*, you would notice that I suggested the *option* of

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Anders Wegge Keller
På Mon, 16 Jul 2018 11:33:46 -0700 Jim Lee skrev: > Go right ahead.  I find it surprising that Stephen isn't banned, > considering the fact that he ridicules anyone he doesn't agree with.  > But I guess he's one of the 'good 'ol boys', and so exempt from the code > of conduct. Well said! --

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 20:58, Terry Reedy wrote: On 7/16/2018 1:27 PM, Jim Lee wrote: 90% of the world *is* "beneath my notice" when it comes to programming for myself.   I really don't care if that's not PC enough for you. Had you actually read my words with *intent* rather than *reaction*, you would

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 5:40 AM, Marko Rauhamaa wrote: > Terry Reedy : > >> On 7/15/2018 5:28 PM, Marko Rauhamaa wrote: >>> if your new system used Python3's UTF-32 strings as a foundation, >> >> Since 3.3, Python's strings are not (always) UFT-32 strings. > > You are right. Python's strings are a

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:16 AM, Rhodri James wrote: > On 16/07/18 20:58, Terry Reedy wrote: >> >> On 7/16/2018 1:27 PM, Jim Lee wrote: >> >>> 90% of the world *is* "beneath my notice" when it comes to programming >>> for myself. I really don't care if that's not PC enough for you. >>> >>> Had y

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Rhodri James
On 16/07/18 20:51, Marko Rauhamaa wrote: I use UTF-8 in my C programs and sense no disadvantage. I have never felt a need for wchar_t. That's not a good comparison, though, because wchar_t in C really doesn't give you much (if any) advantage over rolling your own UTF-8 support, even when that

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 5:51 AM, Marko Rauhamaa wrote: > Steven D'Aprano : >> Under that standard definition, UTF-8 and UTF-16 are variable-width, >> and UTF-32 is fixed-width. >> >> But I'll accept that UTF-32 is variable-width if Marko accepts that >> ASCII is too. > > If that makes you happy, f

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Marko Rauhamaa
Rhodri James : > On 16/07/18 20:40, Marko Rauhamaa wrote: >> You mean each code point is one code point wide. But that's rather an >> irrelevant thing to state. The main point is that UTF-32 (aka Unicode) >> uses one or more code points to represent what people would consider an >> individual char

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Terry Reedy
On 7/16/2018 2:01 PM, Chris Angelico wrote: 🌱【 Stardew Valley Fanart 】🌱*:・゚✧【 800 Subpoints = NEW EMOTE 】#devicat #anime #stardewvalley #fantasy Just to be clear, 🌱【 】🌱・゚✧【 】, \U0001f331, \u3010, \u3011, \uff65, \uff9f, \u2727 are the non-ascii chars in the above. for c in """🌱【 Stardew Val

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 4:55 AM, Steven D'Aprano wrote: > There is nothing special about diacritics such that we ought to treat > some combinations like "Ch" (two code points = one character) as "fixed > width" while others like "â" (two code points = one character) as > "variable width". When yo

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Jul 17, 2018 at 5:40 AM, Marko Rauhamaa wrote: >> You mean each code point is one code point wide. But that's rather an >> irrelevant thing to state. The main point is that UTF-32 (aka >> Unicode) uses one or more code points to represent what people would >> consider a

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Tim Chase
On 2018-07-16 18:31, Steven D'Aprano wrote: > You say that all you want is a switch to turn off Unicode (and > replace it with what? Kanji strings? Cyrillic? Shift_JS? no of > course not, I'm being absurd -- replace it with ASCII, what else > could any right-thinking person want, right?). But we a

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Chris Angelico : > Challenge: Reverse a string in UTF-8. Counter-challenge: Reverse a Unicode string: >>> s = "a\u0304e" >>> s 'āe' >>> L = list(s) >>> L.reverse() >>> "".join(L) 'ēa' > Challenge: Center text in UTF-8. Counter-challenge: Center a Unicode string: >>> t

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Tim Chase : > While the python world has moved its efforts into improving Python3, > Python2 hasn't suddenly stopped working. The sword of Damocles is hanging on its head. Unless a consortium is erected to support Python2, no vendor will be able to use it in the medium term. Given the recent even

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:36 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Tue, Jul 17, 2018 at 5:40 AM, Marko Rauhamaa wrote: >>> You mean each code point is one code point wide. But that's rather an >>> irrelevant thing to state. The main point is that UTF-32 (aka >>> Unicode) uses one o

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Ethan Furman
On 07/16/2018 01:15 PM, Chris Angelico wrote: On Tue, Jul 17, 2018 at 4:55 AM, Steven D'Aprano wrote: There is nothing special about diacritics such that we ought to treat some combinations like "Ch" (two code points = one character) as "fixed width" while others like "â" (two code points = on

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:27 AM, Marko Rauhamaa wrote: > Rhodri James : > >> On 16/07/18 20:40, Marko Rauhamaa wrote: >>> You mean each code point is one code point wide. But that's rather an >>> irrelevant thing to state. The main point is that UTF-32 (aka Unicode) >>> uses one or more code point

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:54 AM, Marko Rauhamaa wrote: > Chris Angelico : >> Challenge: Reverse a string in UTF-8. > > Counter-challenge: Reverse a Unicode string: > >>>> s = "a\u0304e" >>>> s >'āe' >>>> L = list(s) >>>> L.reverse() >>>> "".join(L) >'ēa' > >> Challeng

Re: Unicode [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 6:32 AM, Tim Chase wrote: > On 2018-07-16 18:31, Steven D'Aprano wrote: >> You say that all you want is a switch to turn off Unicode (and >> replace it with what? Kanji strings? Cyrillic? Shift_JS? no of >> course not, I'm being absurd -- replace it with ASCII, what else >>

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Marko Rauhamaa
Ethan Furman : > Depends on the language: in Spanish, "ch" is it's own letter (at least > it was when I grew up), so any word containing it should still contain > it when reversed: "chica" would be "acich". The Royal Academy broke "ch" and "ll" up into separate letters a decade or so back. It had

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Roel Schroeven
Steven D'Aprano schreef op 16/07/2018 2:18: On Sun, 15 Jul 2018 16:08:15 -0700, Jim Lee wrote: Python3 is intrinsically tied to Unicode for string handling. Therefore, the Python programmer is forced to deal with it (in all but trivial cases), rather than given a choice. So I don't understand

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 7:50 AM, Roel Schroeven wrote: > Steven D'Aprano schreef op 16/07/2018 2:18: >> >> On Sun, 15 Jul 2018 16:08:15 -0700, Jim Lee wrote: >> >>> Python3 is intrinsically tied to Unicode for string handling. Therefore, >>> the Python programmer is forced to deal with it (in all

Re: Users banned

2018-07-16 Thread Terry Reedy
On 7/16/2018 3:27 PM, Grant Edwards wrote: On 2018-07-16, Steve Simmons wrote: +1  Seems to me Bart is being banned for "being a dick" and "talking rubbish" (my words/interpretation) with irritating persistence. Wonder how many of the non-banned members have been guilty of the same thing in on

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Grant Edwards
On 2018-07-16, Roel Schroeven wrote: > There are times (encoding/decoding network protocols and other data > formats) when I have a byte string and I want/need to process it like > Python 2 does, and that is the one area where I feel Python 3 make > things a bit more difficult. I use Python t

Re: Reading EmailMessage from file

2018-07-16 Thread Roel Schroeven
Skip Montanaro schreef op 16/07/2018 3:31: So, problem solved. The example I originally referred to clearly requires the caller know the encoding of the input file. When you don't know the encoding, you need bytes. The BytesParser gave me that. Also, I must admit to having not completely read th

Re: Glyphs and graphemes [was Re: Cult-like behaviour]

2018-07-16 Thread Chris Angelico
On Tue, Jul 17, 2018 at 7:02 AM, Ethan Furman wrote: > On 07/16/2018 01:15 PM, Chris Angelico wrote: >> >> On Tue, Jul 17, 2018 at 4:55 AM, Steven D'Aprano wrote: > > >>> There is nothing special about diacritics such that we ought to treat >>> some combinations like "Ch" (two code points = one ch

Re: doubling the number of tests, but not taking twice as long

2018-07-16 Thread Larry Martell
On Mon, Jul 16, 2018 at 6:01 PM, Gilmeh Serda wrote: > On Mon, 16 Jul 2018 14:17:57 -0400, Larry Martell wrote: > >> This code needs to process many tens of 1000's of files, and it runs >> often, so it needs to run very fast. Needless to say, my change has made >> it take 2x as long. Can anyone se

Re: Cult-like behaviour [was Re: Kindness]

2018-07-16 Thread Roel Schroeven
Chris Angelico schreef op 16/07/2018 23:57: On Tue, Jul 17, 2018 at 7:50 AM, Roel Schroeven wrote: Steven D'Aprano schreef op 16/07/2018 2:18: On Sun, 15 Jul 2018 16:08:15 -0700, Jim Lee wrote: Python3 is intrinsically tied to Unicode for string handling. Therefore, the Python programmer is

  1   2   >