473,946 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3520
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 KeyboardInterru pt :|

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 KeyboardInterru pt :|
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1248
by: stephan | last post by:
Hi, I have python 2.2.3 + pythonwin 156 on win2k. The problem is that german chars like äöüÄÖÜß are not handled correctly. Just create a test.py file with the content äöüÄÖÜß and edit it with pythonwin. In the editor you will see only äöüÄ . I had the problem in the past, wrote it to mark and he fixed it.
7
3026
by: Martin Bless | last post by:
IMHO PythonWin is great help in developing. How can I do something like: if detect("running on PythonWin"): pass # fake arguments ... else: "proceed normal"
3
2961
by: Alberto Mantovani | last post by:
hi, how is it possible to run a python script in the pythonwin environment from dos command line? If I use the command "/run scriptname.py" and the pythonwin is already opened I get error, so someone can help me? thanks Alberto
14
2911
by: Jive | last post by:
I've un-installed Python 2.4, re-installed Python 2.3 and PythonWin for 2.3, but it's still broke. When I start PythonWin, sometimes it looks like it is going to be okay. But as soon as I open a .py file, the interactive window grabs the focus and will not let go. I am stumped. Is there something PythonWin uses that I could try re-installing? WxPython maybe?
4
2626
by: Chris P. | last post by:
I've been having a problem with PythonWin that seemed to start completely spontaneously and I don't even know where to START to find the answer. The only thing I can think of that marks the point between "PythonWin works fine" and "PythonWin hardly every works fine" was that I changed the size of my Virtual Paging file, noticing that it was too small (I currently have a P4 with 1G of RAM). I tried returning it to its original (smaller)...
2
7346
by: siggy2 | last post by:
Hi All, (sorry for my bad english) I wrote a __tiny__ and __stupid__ recursive script directly into pythonwin interactive window with a time.sleep(1) and a print before each recursion... I should have taken a closer look at the ending condition (never satisfied!), anyway I was quite confident that a control-C would have stopped the intepreter as it is (incidentally?) when this break sequence is entered
2
2475
by: accolades | last post by:
Does anyone else have a problem with Pythonwin crashing after running a python script with graphics libraries? Whenever I use Pythonwin to run a PyGame or PyOgre script, Pythonwin crashes when the script exits. I know it's probably because the Pythonwin interpreter can't read from the console once the graphics mode has been changed, but has anyone discovered a workaround? I'd like to know if this problem is specific to my machine, or if...
17
1974
by: Dave Benjamin | last post by:
Hey folks, Why is PythonWin (win32all) still a separate download from a third party? Is it legal, technical, or what? I think it's about time it be part of the standard distribution. There are many useful things that you ought to be able to do without downloading third-party libraries. Terminating a process, for example. Communicating with other applications via a standard, common protocol (COM). We demand these things from our UNIX...
3
2997
by: archaegeo | last post by:
I am getting started in Python, and I have looked on both the stackless page and python.org and cannot find the answer to what I think is a simple problem. If I start the python command line or idle, i can If I start pythonwin I get the following error ....No Module named Stackless Any help?
0
9981
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11153
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
11337
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10686
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8250
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7423
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6111
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4533
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.