Posted: Tue 7:18 pm Post subject: Re: Textpad Document class It'll be ctrl- something or Alt- something I'd guess (and it should show up in the Tools menu beside the launch option) Note not being a textpad user (gVim all the way on Windows) I can't tell from that link what the hot key to launch the interpreter is. Frickin' beeps from computers drive me apers. And if you are like me, I'd uncheck the Sound Alert when Complete. Sucks losing an hour of typing when testing. Note I'd click the Save All Documents First checkbox as well just in case something goes wrong in Python. There are probably other helper sites too but the second screen is worth reading through.
Posted: Tue 6:14 pm Post subject: Re: Textpad Document classĬheck this link for some instructions on how to launch python from within the editor.
Now how do I use the class? Can I run the code directly form textpad or do I need to copy it into the interpreter? It's great to feel like a noob again! (not really) I have downloaded the python add-on from the site and have successfully created a document class with it. I downloaded TextPad to type in my code with syntax coloration, as that helps me a lot. Right, I feel like learning python as a summer project. Posted: Tue 5:54 pm Post subject: Textpad Document class + Python 3.5, Python 3.6, Python 3.7, - Python 3.Wiki Blog Search Turing Chat Room Members New changeset ea7f22cf9c8c by Serhiy Storchaka in branch 'default': New changeset ea87e00a3e89 by Serhiy Storchaka in branch '3.6': New changeset d87771d1c1e6 by Serhiy Storchaka in branch '2.7': Issue #13051: Fixed recursion errors in large or resized. New changeset b446a4aab9cf by Serhiy Storchaka in branch '3.5': The main difference is that it preserves maxx and maxy attributes and support them up to date. If the second bug can't be reproducible anymore, we might need a simpler patch.Īuthor: Serhiy Storchaka (serhiy.storchaka) *
The patch doesn't apply cleanly anymore so the next step would be to provide an updated patch.īy the way, I can reproduce the first bug, but not the second one. I'm not sure what the holdup is, but it would be great to get fixed! If there's a good way to guarantee this, I'd be happy to write a testcase for it.Īny progress on this? Its Dec 2016 and this bug is still around. The other seems much harder to write a testcase for, since you have to have a terminal such that curses.LINES * curses.COLUMS > sys.getrecursionlimit(). This testcase only tests one of the two bugs this patch fixes. One possible fix is to run each testcase in curses.wrapper I'd be happy to change this patch to do that if it's more acceptable.Ģ. I couldn't figure out how to get it to run correctly after all the other tests had run, so I had to run it first. Would you be able to produce a unit test which fails before your patch is applied, but succeeds after applying your changes? That'll make your changes more likely to get accepted.Īttached is a patch which contains a testcase as well. I've verified this bug is in 2.7.1 and 3.2. The patch also changes Textpad so that instead of keeping the underlying window's size as instance attributes of this Textpad, Textpad asks the underlying window its size every time Textpad needs to know, allowing the underlying window to be resized at will. Second, when the underlying curses window was resized to be smaller than it was when the Textpad was created, pressing any key would result in infinite recursion (or with the new method, an infinite loop). The patch changes the implementation of _insert_printable_char() to be iterative, thus avoiding the infinite recursion. $LINES * $COLUMNS) > 1000 (the default max recursion limit), press any key and be greeted by a stack trace. Run that script in a terminal with area (i.e. Thus, any Textpad which had an area greater than the interpreter's maximum recursion limit would crash. First, the previous implementation of _insert_printable_char() used recursion to move characters when inserting a character. The attached patch fixes two bugs which manifest as infinite recursion in _insert_printable_char() of Textbox. Python 3.7, Python 3.6, Python 3.5, Python 2.7īerker.peksag, brian.curtin, python-dev, rxcomm, serhiy.storchaka, tycho, vstinnerĬreated on 00:47 by tycho, last changed 16:36 by dstufft.