From tjreedy at udel.edu Sat Aug 3 11:27:48 2019 From: tjreedy at udel.edu (Terry Reedy) Date: Sat, 3 Aug 2019 11:27:48 -0400 Subject: [Idle-dev] Problem with the latest version of Python on macOS In-Reply-To: <8f6ade1e-d16f-b0d1-5e3a-5c526aba69de@udel.edu> References: <8f6ade1e-d16f-b0d1-5e3a-5c526aba69de@udel.edu> Message-ID: On 7/31/2019 3:16 PM, Terry Reedy wrote: > On 7/30/2019 10:24 PM, Sara Mistral wrote: > >> I downloaded Python recently on my computer and I have some troubles >> making it work. It doesn?t allow me to make and if function and elif >> without the good indentation. I have the latest version of Python >> (3.7.4) and my mac is updated (macOS Mojave 10.14.5). >> As you can see in the picture, > > Most python mail lists do not allow binary attachments.? idledev > currently does, but attachments do not follow responses.? It is also > impossible to copy from images to determine what you entered.? Please > copy and paste instead of attaching screenshots. > > >>> if a > 0: > ????print('positive') > if a < 0: > > SyntaxError: invalid syntax To show that the error has nothing to do with the the somewhat wacky indents in IDLE's shell, here is the same code in interactive python (no IDLE) in Windows. C:\Users\Terry>python Python 3.7.4 >>> if a: ... b ... if c: File "", line 3 if c: ^ SyntaxError: invalid syntax >>> -- Terry Jan Reedy From saramsrl at hotmail.com Fri Aug 2 23:04:46 2019 From: saramsrl at hotmail.com (Sara Mistral) Date: Sat, 3 Aug 2019 03:04:46 +0000 Subject: [Idle-dev] Problem with the latest version of Python on macOS In-Reply-To: References: , Message-ID: Thank you so much for your help, I will tell my dad. Have a good day Obtenez Outlook pour iOS ________________________________ De : Beni Cherniavsky-Paskin Envoy? : Wednesday, July 31, 2019 2:50:04 PM ? : Sara Mistral Cc : idle-dev at python.org Objet : Re: [Idle-dev] Problem with the latest version of Python on macOS It's not bad indentation. If that were the problem, you'd get `IndentationErrror`. (The indention is good despite looking weird because the `>>> ` is not part of the code - imagine your first `if` starting at colunn 0.) The problem is that IDLE Shell window expects a single expression/statement per prompt, and you gave it 2 separate `if` statements. In many such cases python 3 will give clear "multiple statements" error, but not here. You can confirm this by changing second `if` to e.g. `elif` (which makes them one statement) - that works for me. Same syntax would be fine in a .py file editor window - most python scripts contain many statements It's just limitation of the Shell window - you should execute each statement separately by pressing Enter (possibly twice). Tip: if you do want to paste many statements together, put them all inside an `if True:` block to turn them into 1 statement. If the copied code was not indented, select all pasted code, press Ctrl+] (aka Format -> Indent region - this menu is only visible in editor window but the shortcut works in Shell window too). On Wed, 31 Jul 2019, 20:59 Sara Mistral, > wrote: Hello, I downloaded Python recently on my computer and I have some troubles making it work. It doesn?t allow me to make and if function and elif without the good indentation. I have the latest version of Python (3.7.4) and my mac is updated (macOS Mojave 10.14.5). As you can see in the picture, the ?if? doesn?t align properly. I tried with else, elif, if, and every time I hit ?send? it sends me to the wrong indentation. My dad needs this for his work and he?s trying to learn Python but sadly he is stuck. Thank you for your help. Best wishes, Sara [Image] _______________________________________________ IDLE-dev mailing list IDLE-dev at python.org https://mail.python.org/mailman/listinfo/idle-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From taleinat at gmail.com Sun Aug 25 03:58:19 2019 From: taleinat at gmail.com (Tal Einat) Date: Sun, 25 Aug 2019 10:58:19 +0300 Subject: [Idle-dev] Have the shell mimic terminal handling of \r and \b control characters in outputs Message-ID: Hi all, I've created an issue about this, including a PR with a working implementation: bpo-37827 . At this point, I think we mostly need some feedback about whether this is a desired feature and why. Please take a look! - Tal Einat -------------- next part -------------- An HTML attachment was scrubbed... URL: