From taleinat at gmail.com Sun Dec 6 06:04:08 2015 From: taleinat at gmail.com (Tal Einat) Date: Sun, 6 Dec 2015 13:04:08 +0200 Subject: [Idle-dev] StackOverflow question about typing certain characters into IDLE Message-ID: Maybe someone here can help with this? http://stackoverflow.com/questions/34116195/why-some-characters-can-not-be-typed-in-pythons-idle -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjreedy at udel.edu Mon Dec 7 13:14:04 2015 From: tjreedy at udel.edu (Terry Reedy) Date: Mon, 7 Dec 2015 13:14:04 -0500 Subject: [Idle-dev] StackOverflow question about typing certain characters into IDLE In-Reply-To: References: Message-ID: On 12/6/2015 6:04 AM, Tal Einat wrote: > Maybe someone here can help with this? > > http://stackoverflow.com/questions/34116195/why-some-characters-can-not-be-typed-in-pythons-idle I left a comment several hours before you posted this. I routinely watch IDLE question on SO. Someone else gave an answer later -- this is a known bug in tcl/tk interaction with Windows. I plan to open an issue to say something about this in the IDLE doc. -- Terry Jan Reedy From tjreedy at udel.edu Mon Dec 21 02:01:01 2015 From: tjreedy at udel.edu (Terry Reedy) Date: Mon, 21 Dec 2015 02:01:01 -0500 Subject: [Idle-dev] Running beginner Pythons In-Reply-To: References: Message-ID: On 10/12/2015 1:35 AM, Serhiy Storchaka wrote: > On 10.10.15 05:29, Terry Reedy wrote: >> Reconceptualizing for beginners... >> >> Many people working with kids have asked for various changes to Python >> in order to make it easier for kids, sometimes very young. Some >> variations have been requested more than once. >> >> 1. Simple looping: 'repeat/do/loop/for n [times]:' (take your pick of >> keyword) versus 'for i in range(n):'. >> >> The latest request is by Andre Roberge, today on python-ideas, in >> "Simpler syntax for basic iterations". This inspired me to write this >> post. The education hook he offered is that the variation eliminates >> the need for a loop variable in a context where variables are not >> otherwise used. He has worked on robot programming for kids. >> >> 2. Simple function call: 'move 3', 'turn 90' (Logo, I believe) versus >> 'move(3)' 'turn(90)' (Turtle). >> >> 3. Simple Native language keywords. String-within-code translation is >> not suited for this. >> >> These are all things I think are wrong for Python itself but possibly >> right for various learning situations. For 18 years I have watched >> people try to change Python in ways like the above, when I think the >> energy would be better directed to writing good quality translation >> functions. Part of my motivation for the idea is that Mark and I are working on rewriting and substantially improving IDLE. If and when we succeed, it would make even more sense to reuse it for related jobs than it does now. > Please don't touch IDLE. At least while it is a part of Python. IDLE is > *Python's* Integrated Development and Learning Environment, not Logo's, > and shouldn't learn non-Python syntax. I was not and am not proposing to deliver IDLE with anything non-standard. I was only suggesting the possibility of slightly simplifying the current ability to customize IDLE. Python already comes with sys.displayhook, which can be used to arbitrarily change output. IDLE already comes with an extension hook that can be used to manipulate input. Reformatting string and comment paragraphs is one example (ReformatParagraph.py). Running the code in the editor is another (ScriptBinding.py). A modified version of ScriptBinding could do any of the above. My specific idea was to add a hook to the ScriptBinding to optionally call a translation function just before compiling. Thinking about it now, there is hardly any need to do so. A Stackoverflow question prompted me to think about this more. https://stackoverflow.com/questions/34382144/changing-number-representation-in-idle The OP wants to use interactive python, in particular IDLE's Shell, as a calculator that can change the number base. The output part can be done with sys.displayhook and an extension to install menu items. The input part could be done by re-writing ScriptBinding or writing a separate extension that re-writes on demand. In the course of working this out, I realized that if I wrote a patch to make use of a translator easier, I would disable translation when running a .py, .pyw, or .pyo file or when the interactive prompt is '>>>'. If I hear of anyone else doing something like this, I would request following the same restriction. I agree that code marked as 'python' should be standard Python syntax and interpreted with standard semantics. -- Terry Jan Reedy From grey at cqu.edu.cn Sat Dec 19 05:39:49 2015 From: grey at cqu.edu.cn (Grey) Date: Sat, 19 Dec 2015 10:39:49 -0000 Subject: [Idle-dev] Bug Report on float number calculation in IDLE Message-ID: <4745da2a.5009.151b9c0eb62.Coremail.grey@cqu.edu.cn> Hi there: I have found a strange issue on float number calculation in IDEL of Python 2.7X? 1?When I tried to calculate the sum of a bunch of float numbers in IDLE of Python 2.7.6 I found that the result was not accurate(well, I have knew that it is up to the storage format of data by searching the information on Internet). However, when I try to use print statement to print the result it gave me the right answer. That means the calculation in IDLE may be not the same with that in print statement for a script.The records can be found in attachment named P1_2.7.6.JPG and T1_2.7.6. 2,I tried to update my Python to 2.7.11, the result is same as that in Python 2.7.6. The records can be found in attachment name P2_XXX and T2_XXX? 3? Once again, I tried Python 3.5.1. The result is the same, but both of them was not accurate. I know the reason may be the same as I wrote in description 1. The good news is that the result keeps the same with each other. In summary of all above, I think that the calculation of float numbers in IDLE of Python 2.7X is not the same with the result of that in Print statement or that in a script. Thanks and regards! Grey from China, a beginner of Python. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: P1_2.7.6.JPG Type: image/jpeg Size: 37772 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: P2_2.7.11.JPG Type: image/jpeg Size: 33675 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: P3_3.5.1.JPG Type: image/jpeg Size: 31760 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: T1_2.7.6.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: T2_2.7.11.txt URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: T3_3.5.1.txt URL: