On Jul 9, 7:28 pm, Miles Kaufmann wrote:
> On Jul 9, 2009, at 9:20 AM, Lie Ryan wrote:
>
> > Michael Mossey wrote:
> >> I want to understand better what the "secret" is to responding to a
> >> ctrl-C in any shape or form.
>
> > Are you asking: "when would the python interpreter process
> > Keyboar
On Jul 9, 2009, at 9:20 AM, Lie Ryan wrote:
Michael Mossey wrote:
I want to understand better what the "secret" is to responding to a
ctrl-C in any shape or form.
Are you asking: "when would the python interpreter process
KeyboardInterrupt?"
...
In single threaded python program, the currentl
Michael Mossey wrote:
> On Jul 6, 2:47 pm, Philip Semanchuk wrote:
>> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>>
>>> What is required in a python program to make sure it catches a
>>> control-
>>> c on the command-line? Do some i/o? The OS here is Linux.
>> You can use a try/except to
Steven D'Aprano wrote:
> On Mon, 06 Jul 2009 15:02:26 -0700, Michael Mossey wrote:
>
> > On Jul 6, 2:47 pm, Philip Semanchuk wrote:
> >> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
> >>
> >> > What is required in a python program to make sure it catches a
> >> > control-
> >> > c on the c
On Jul 6, 6:02 pm, Michael Mossey wrote:
> On Jul 6, 2:47 pm, Philip Semanchuk wrote:
>
> > On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>
> > > What is required in a python program to make sure it catches a
> > > control-
> > > c on the command-line? Do some i/o? The OS here is Linux.
>
>
On Mon, 06 Jul 2009 15:02:26 -0700, Michael Mossey wrote:
> On Jul 6, 2:47 pm, Philip Semanchuk wrote:
>> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>>
>> > What is required in a python program to make sure it catches a
>> > control-
>> > c on the command-line? Do some i/o? The OS here is
> Philip Semanchuk (PS) wrote:
>PS> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>>> What is required in a python program to make sure it catches a control-
>>> c on the command-line? Do some i/o? The OS here is Linux.
>PS> You can use a try/except to catch a KeyboardInterrupt excepti
Michael Mossey wrote:
> On Jul 6, 2:47 pm, Philip Semanchuk wrote:
>> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>>
>>> What is required in a python program to make sure it catches a control-
>>> c on the command-line? Do some i/o? The OS here is Linux.
>> You can use a try/except to catc
On Jul 6, 2009, at 6:02 PM, Michael Mossey wrote:
On Jul 6, 2:47 pm, Philip Semanchuk wrote:
On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
What is required in a python program to make sure it catches a
control-
c on the command-line? Do some i/o? The OS here is Linux.
You can use a tr
On Jul 6, 2:47 pm, Philip Semanchuk wrote:
> On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
>
> > What is required in a python program to make sure it catches a
> > control-
> > c on the command-line? Do some i/o? The OS here is Linux.
>
> You can use a try/except to catch a KeyboardInterrupt
On Jul 6, 2009, at 5:37 PM, Michael Mossey wrote:
What is required in a python program to make sure it catches a
control-
c on the command-line? Do some i/o? The OS here is Linux.
You can use a try/except to catch a KeyboardInterrupt exception, or
you can trap it using the signal module:
On Mon, Jul 6, 2009 at 2:37 PM, Michael Mossey wrote:
> What is required in a python program to make sure it catches a control-
> c on the command-line? Do some i/o? The OS here is Linux.
try:
#code that reads input
except KeyboardInterrupt:
#Ctrl-C was pressed
Cheers,
Chris
--
http://bl
What is required in a python program to make sure it catches a control-
c on the command-line? Do some i/o? The OS here is Linux.
Thanks,
Mike
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo