Re: [Tutor] keyboard interrupt

2013-10-17 Thread Tim Golden
On 17/10/2013 16:36, Bill wrote: > > I know, way late to the party... > > Did you try Ctrl-Break? In Windows that is usually how you interrupt a > program... Take consolation from the fact that your five-month delay in replying isn't even close to the longest delay I've seen on a Python list. S

Re: [Tutor] keyboard interrupt

2013-10-17 Thread Bill
I know, way late to the party... Did you try Ctrl-Break? In Windows that is usually how you interrupt a program... ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] keyboard interrupt

2013-05-26 Thread Jim Mooney
>> Bad programming advice is bad enough, but putting up bad advice to >> edit the Windows registry is Really, Really bad. > > Did you leave a comment with the correction? Good point. I wasn't registered on that board but I should go find it. Not that the mistype in that case could possibly cause a

Re: [Tutor] keyboard interrupt

2013-05-26 Thread eryksun
On Sun, May 26, 2013 at 8:25 PM, Jim Mooney wrote: > > StackOverflow may be good but I just had an unpleasant experience > wanting to add New .py file to my Windows context menu. The first > advice I saw was missing a backslash and had me adding the string to > the wrong key. Thankfully, it didn't

Re: [Tutor] keyboard interrupt

2013-05-26 Thread Jim Mooney
On 26 May 2013 15:33, Marc Tompkins wrote: > On Sun, May 26, 2013 at 6:17 AM, eryksun wrote: StackOverflow may be good but I just had an unpleasant experience wanting to add New .py file to my Windows context menu. The first advice I saw was missing a backslash and had me adding the string to th

Re: [Tutor] keyboard interrupt

2013-05-26 Thread Marc Tompkins
On Sun, May 26, 2013 at 6:17 AM, eryksun wrote: > On Sun, May 26, 2013 at 4:34 AM, Steven D'Aprano > wrote: > > > > So these edits aren't default-deny, but default-accept? Worse and worse. > > It shows who made the edit and when they edited it, which links to the > revision history. When a quest

Re: [Tutor] keyboard interrupt

2013-05-26 Thread eryksun
On Sun, May 26, 2013 at 4:34 AM, Steven D'Aprano wrote: > > So these edits aren't default-deny, but default-accept? Worse and worse. It shows who made the edit and when they edited it, which links to the revision history. When a question is closed it shows who voted to close it. Even retagging sh

Re: [Tutor] keyboard interrupt

2013-05-26 Thread Steven D'Aprano
On 26/05/13 17:57, Marc Tompkins wrote: On Fri, May 24, 2013 at 7:19 PM, Steven D'Aprano wrote: You can edit *other* people's questions and answers??!??!?? What. The. Hell. The idea is to build an authoritative information resource (in particular, the goal is that the accepted answer to any

Re: [Tutor] keyboard interrupt

2013-05-26 Thread Marc Tompkins
On Fri, May 24, 2013 at 7:19 PM, Steven D'Aprano wrote: You can edit *other* people's questions and answers??!??!?? > > What. The. Hell. The idea is to build an authoritative information resource (in particular, the goal is that the accepted answer to any given question will become the primary r

Re: [Tutor] keyboard interrupt

2013-05-24 Thread eryksun
On Fri, May 24, 2013 at 10:19 PM, Steven D'Aprano wrote: > > You can edit *other* people's questions and answers??!??!?? > > What. The. Hell. This should be done sparingly for answers. But it's very common for questions since inexperienced users almost always get the markdown wrong. _

Re: [Tutor] keyboard interrupt

2013-05-24 Thread Robert Sjoblom
On 25 May 2013 04:19, Steven D'Aprano wrote: > You can edit *other* people's questions and answers??!??!?? > > What. The. Hell. Yes; I think that the idea is that it allows people to fix spelling errors and/or reference mistakes, or maybe add things to clarify something that the answer glossed ov

Re: [Tutor] keyboard interrupt

2013-05-24 Thread Steven D'Aprano
On 25/05/13 01:11, Marc Tompkins wrote: I love, love, love StackOverflow (and the whole StackExchange ecosystem), but it's unfortunately susceptible to being gamed. Anyone can edit a question (or an answer), and if the edit is allowed to stand the editor gets 2 points. You can edit *other* p

Re: [Tutor] keyboard interrupt

2013-05-24 Thread Marc Tompkins
On Thu, May 23, 2013 at 3:52 PM, Steven D'Aprano wrote: > On 24/05/13 06:37, Jim Mooney wrote: > >> Apparently Wing isn't as savvy as IDLE when it comes to communicating >>> with the subprocess. I've only searched for about a minute, but >>> apparently the way this works in Wing is to "Restart She

Re: [Tutor] keyboard interrupt

2013-05-23 Thread Steven D'Aprano
On 24/05/13 06:37, Jim Mooney wrote: Apparently Wing isn't as savvy as IDLE when it comes to communicating with the subprocess. I've only searched for about a minute, but apparently the way this works in Wing is to "Restart Shell": http://stackoverflow.com/a/10360503/205580 http://www.wingware.c

Re: [Tutor] keyboard interrupt

2013-05-23 Thread Jim Mooney
> Apparently Wing isn't as savvy as IDLE when it comes to communicating > with the subprocess. I've only searched for about a minute, but > apparently the way this works in Wing is to "Restart Shell": > > http://stackoverflow.com/a/10360503/205580 > http://www.wingware.com/doc/debug/interactive-pyt

Re: [Tutor] keyboard interrupt

2013-05-23 Thread Jerry Hill
On Wed, May 22, 2013 at 9:25 PM, Dave Angel wrote: > On 05/22/2013 04:11 PM, Jerry Hill wrote: > >> The KeyboardInterrupt ​exception is raised when someone presses Ctrl-C. >> If >> you catch it, and ignore it (which is what your code above is doing), then >> pressing Ctrl-C doesn't do anything.

Re: [Tutor] keyboard interrupt

2013-05-22 Thread eryksun
On Wed, May 22, 2013 at 8:56 PM, Jim Mooney wrote: > On 22 May 2013 15:05, eryksun wrote: >> On Wed, May 22, 2013 at 4:30 PM, Jim Mooney wrote: >>> >>> Figured it out. Ctrl-C only works in the Windows Command window, not >>> in an editor. >> >> Which IDE? > > Wing. But not being able to abort ou

Re: [Tutor] keyboard interrupt

2013-05-22 Thread Dave Angel
On 05/22/2013 09:46 PM, Jim Mooney wrote: What do you mean "doesn't do anything" ? It certainly terminates the loop, which was the intent. Provided of course that something else isn't trapping the Ctrl-C first. It doesn't in Windows proper, using Wing 101. Then Wing is changing the behavior

Re: [Tutor] keyboard interrupt

2013-05-22 Thread Jim Mooney
> What do you mean "doesn't do anything" ? It certainly terminates the loop, > which was the intent. Provided of course that something else isn't trapping > the Ctrl-C first. It doesn't in Windows proper, using Wing 101. It does exit in the Windows command console. For some reason I forgot ctrl-

Re: [Tutor] keyboard interrupt

2013-05-22 Thread Dave Angel
On 05/22/2013 04:11 PM, Jerry Hill wrote: On Wed, May 22, 2013 at 3:47 PM, Jim Mooney wrote: I made a simple ear frequency-tester, but I don't want it to go on forever, so I tried stopping it when I pressed a key, as below, but that doesn't work. I did check out keyboard interrupts but they se

Re: [Tutor] keyboard interrupt

2013-05-22 Thread Jim Mooney
On 22 May 2013 15:05, eryksun wrote: > On Wed, May 22, 2013 at 4:30 PM, Jim Mooney wrote: >> >> Figured it out. Ctrl-C only works in the Windows Command window, not >> in an editor. > > Which IDE? Wing. But not being able to abort out of a Windows program is a feature. You don't want to lose sev

Re: [Tutor] keyboard interrupt

2013-05-22 Thread eryksun
On Wed, May 22, 2013 at 4:30 PM, Jim Mooney wrote: > > Figured it out. Ctrl-C only works in the Windows Command window, not > in an editor. Which IDE? In IDLE, your code runs in the main thread of a subprocess (unless IDLE is started with the -n option). A second thread ("SockThread") is started

Re: [Tutor] keyboard interrupt

2013-05-22 Thread Marc Tompkins
On Wed, May 22, 2013 at 1:30 PM, Jim Mooney wrote: > On 22 May 2013 13:24, Jim Mooney wrote: > >> I've not used it myself, but I believe the KeyboadInterrupt is only > >> generated by one _specific_ keypress. You mentioned that you pressed a > key > >> - did you try Control-C? > > > > Actually,

Re: [Tutor] keyboard interrupt

2013-05-22 Thread Jim Mooney
On 22 May 2013 13:24, Jim Mooney wrote: >> I've not used it myself, but I believe the KeyboadInterrupt is only >> generated by one _specific_ keypress. You mentioned that you pressed a key >> - did you try Control-C? > > Actually, I did, using Win 7 - and I put exit() in place of pass. I > tried

Re: [Tutor] keyboard interrupt

2013-05-22 Thread Jim Mooney
> I've not used it myself, but I believe the KeyboadInterrupt is only > generated by one _specific_ keypress. You mentioned that you pressed a key > - did you try Control-C? Actually, I did, using Win 7 - and I put exit() in place of pass. I tried ctrl-c, ctrl-x, esc, and del. Windows doesn't see

Re: [Tutor] keyboard interrupt

2013-05-22 Thread Jerry Hill
On Wed, May 22, 2013 at 3:47 PM, Jim Mooney wrote: > I made a simple ear frequency-tester, but I don't want it to go on > forever, so I tried stopping it when I pressed a key, as below, but > that doesn't work. I did check out keyboard interrupts but they seem > unnecessarily complex just to stop

Re: [Tutor] keyboard interrupt

2013-05-22 Thread Marc Tompkins
On Wed, May 22, 2013 at 12:47 PM, Jim Mooney wrote: > I made a simple ear frequency-tester, but I don't want it to go on > forever, so I tried stopping it when I pressed a key, as below, but > that doesn't work. I did check out keyboard interrupts but they seem > unnecessarily complex just to sto