469,949 Members | 2,699 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,949 developers. It's quick & easy.

terminate exectutioin in PythonWin

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
8 3345
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
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
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
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
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
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

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
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.

Similar topics

7 posts views Thread by Martin Bless | last post: by
3 posts views Thread by Alberto Mantovani | last post: by
14 posts views Thread by Jive | last post: by
2 posts views Thread by accolades | last post: by
17 posts views Thread by Dave Benjamin | last post: by
3 posts views Thread by archaegeo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.