By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,525 Members | 1,623 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,525 IT Pros & Developers. It's quick & easy.

terminate exectutioin in PythonWin

P: n/a
Jim
Hi all

1.Could someone tell me how to terminate execution in PythonWin?

2.Can anyone recommend a free development environment in which you can
save your workspace (e.g. open files, debugging breakpoints etc.)

Jim
Jul 18 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
1) To exit any application:

import sys
sys.exit(0)

2) I'm not familiar with any of these development systems. I use
what comes with ActiveState's PythonWin. It does have debugging
breakpoints, etc.

Larry Bates

Jim wrote:
Hi all

1.Could someone tell me how to terminate execution in PythonWin?

2.Can anyone recommend a free development environment in which you can
save your workspace (e.g. open files, debugging breakpoints etc.)

Jim

Jul 18 '05 #2

P: n/a
Jim
Larry Bates wrote:
1) To exit any application:

import sys
sys.exit(0)


....

Thanks Larry.

Actually I meant how do I stop a program running that I have started in
the interpreter. If I get into an infinite loop I can't stop it without
qutting PythonWin.

Then I have to open all the files and re-insert breakpoints etc. :(

Jim
Jul 18 '05 #3

P: n/a
Jim,
1.Could someone tell me how to terminate execution in PythonWin?


Use the "Break into running code" command on the context menu of the
PythonWin icon in the bottom right of the taskbar.

Neil
Jul 18 '05 #4

P: n/a
Jim
Neil Hodgson wrote:
Jim,

1.Could someone tell me how to terminate execution in PythonWin?

Use the "Break into running code" command on the context menu of the
PythonWin icon in the bottom right of the taskbar.

Neil


Great thanks! PythonWin isn't hot on keyboard shortcuts but ironically
calls this a KeyboardInterrupt :|

Know any keyboard shortcuts for debug view? e.g. open it, run(debug),
step etc.

Jim
Jul 18 '05 #5

P: n/a
Jim wrote:
[...]

Actually I meant how do I stop a program running that I have started in
the interpreter. If I get into an infinite loop I can't stop it without
qutting PythonWin.

Then I have to open all the files and re-insert breakpoints etc. :(

Jim


Look in the system tray! Right-mouse on the Python and select "break
into running program".

regards
Steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/

Jul 18 '05 #6

P: n/a
Jim
Steve Holden wrote:
Jim wrote:
[...]

Actually I meant how do I stop a program running that I have started
in the interpreter. If I get into an infinite loop I can't stop it
without qutting PythonWin.

Then I have to open all the files and re-insert breakpoints etc. :(

Jim

Look in the system tray! Right-mouse on the Python and select "break
into running program".

regards
Steve

D'oh. I didn't think of that.

Thanks

Jim
Jul 18 '05 #7

P: n/a

D'oh. I didn't think of that.

Thanks

Jim


A little off-topic, but here's a little more fun with pythonwin. You
can spawn the debugging environment from a normal python script running
outside of pythonwin with:

import pywin.debugger;pywin.debugger.set_trace()

Also note that 'pywin.debugger.set_trace()' can be used anywhere if
you're trying to 'keep' breakpoints in the code without relying an an
IDE or project tracking them for you.

Jul 18 '05 #8

P: n/a
Jim:
Great thanks! PythonWin isn't hot on keyboard shortcuts but ironically
calls this a KeyboardInterrupt :|
I don't think the keyboard can be accessed in this situation so the
icon is provided.
Know any keyboard shortcuts for debug view? e.g. open it, run(debug),
step etc.


No, I use PythonWin just as a console and prefer HAP Debugger
although it hasn't been updated for Python 2.4.
http://hapdebugger.sourceforge.net/

Neil
Jul 18 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.