473,611 Members | 2,242 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[PythonWin] how to stop execution in interactive window?

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
during a screen-i/o of the python interpreter in a CMD prompt...
Instead I discovered my pythonwin session no more responding even
though the output shows that it was still working correctly... and my
other
open files in pythonwin still needing to be saved - my salvation was
that
while I was searching a solution with google, after 984 nested call
~ more than a quarter later, the recursion stack was full and
an exception was raised! ;-P).
So my question is: is there a keystroke combination to stop the
interpreter
in pythonwin interactive window? Or even better
Is there a "pythonwin interactive window" keystrokes list?
(btw: I remember an old post explaining the keystroke to
reset interactive window memory without being forced to
close and open pythonwin - very usefull but I could not find it
anymore...)
TIA!
bye,
PiErre

Jul 21 '05 #1
2 7324
Right-click on the Pythonwin icon in the tray and select "Break into running
code".

HTH
Franz GEIGER
<si****@superev a.it> schrieb im Newsbeitrag
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
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
during a screen-i/o of the python interpreter in a CMD prompt...
Instead I discovered my pythonwin session no more responding even
though the output shows that it was still working correctly... and my
other
open files in pythonwin still needing to be saved - my salvation was
that
while I was searching a solution with google, after 984 nested call
~ more than a quarter later, the recursion stack was full and
an exception was raised! ;-P).
So my question is: is there a keystroke combination to stop the
interpreter
in pythonwin interactive window? Or even better
Is there a "pythonwin interactive window" keystrokes list?
(btw: I remember an old post explaining the keystroke to
reset interactive window memory without being forced to
close and open pythonwin - very usefull but I could not find it
anymore...)
TIA!
bye,
PiErre

Jul 21 '05 #2
> Right-click on the Pythonwin icon in the tray and select "Break into running
code".

[CUT]

Thanks a lot! Oddly enough I'm looking into PythonWin manual to see why

I did not find it before... and there is no mention of it!

Now if only I could find out how to free pythonwin interactive window
memory
(I'm not talking about interactive window output - cleanable with
ctrl-a + delete,
but about variable valorization, function definition etc )...
IIRC there was already a post in this newsgroup that explained how to
do this...
but yesterday google searches return me that the only way was to force
this by
closing and re-opening pythonwin...
Maybe I was wrong and there's no other way...
Again: thanks a lot for your help!
bye,
PiErre

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3010
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"
2
3498
by: Dave Reed | last post by:
I seem to remeber reading somewhere there was a statement you could put in your python program to stop its execution and start the interactive interpreter at that point (and then you could change the value of some variables and continue executing). Am I having delusions or is there a way to do this? Thanks, Dave
14
2878
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?
1
1922
by: tkpmep | last post by:
I've just downloaded and installed ActivePython and am trying to customize the PythonWin editor. Its line spacing seems to default to 2, and consequently, I cannot see many lines of code on a screen. How do I set the line spacing to 1? Thomas Philips
3
3335
by: tkpmep | last post by:
I have a Python program that collects user input using msg = "Enter the full path and name of the file to be processed: " answer = raw_input(msg) If I run it in IDLE, the question is splashed across the execution window, and if it is long, simply wraps to the next line. Most importantly, it is intelligible, because I see the entire message. I enter my answer on the next line, and once again, I can see the entire path and file name,...
1
1829
by: jean-marc | last post by:
I read that Tkinter and Python IDEs (PythonWin and Idle at least) makes for a bad mix in execution mode because they're fighting for the event loop, but this mode is usefull to use the debugger. But to the point of breaking something elsewhere than in memory ??? (Shutting down and rebooting the computer doesn't resolve the problems... PythonWin becomes impossible to use if another window is open (pdf files, winAmp music, browser et...
1
1229
by: Jive Dadson | last post by:
I like to use Pythonwin as my desktop calculator. It's bothersome to have to type in "from __future__ import division" into the interactive window every time I open it. I've tried various ways to attempt to get it to import new division at startup, but no luck. I can get it to execute a file, but apparently it does so in an environment that gets discarded, rather than in the environment of the interactive window. So the "from...
1
1598
by: rodrigostrauss | last post by:
Having the following code: ==== Module1.py ==== import logging def X(): logging.error('test') If I import it into PythonWin console and call X(), the error message is not printed. If I do the same in Python console the message is printed. Do I need to configure the logging module or it's a problem
0
1031
by: Hertha Steck | last post by:
Using Python 2.5 with pywin32 build 210 on Windows XP Home, first try with PythonWin after installation of this version. Here are the header lines from the interactive window: PythonWin 2.5 (r25:51908, Sep 19 2006, 09:52:17) on win32. Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' for further copyright information. If I try to print my script using the print button in the toolbar I get the
0
8149
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8097
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
8561
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
8240
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
7038
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5527
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
4108
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2546
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.