473,657 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Stepping through a multithreaded program

Hi,

I was trying to step through a first attemp of multithreaded script (see
below), with PythonWin, but I'm gettign a very strange error:

---------------------------------------------------------------------------------
import threading

times = 100
delay = 10000

class egoistThread(th reading.Thread) :
def __init__(self, id, times, delay):
threading.Threa d.__init__(self )
self.id = id
self.times = times
self.delay = delay
def run(self):
for i in xrange(self.tim es):
print self.id,
for j in xrange(self.del ay):
pass

egoists = []
for elt in 'abc':
egoists.append( egoistThread(el t, times, delay))

"""
When I reach this point, I get a weird error see below
"""
for ego in egoists:
ego.start()
for ego in egoists:
ego.join()
------------------------------------------------------------------------------

The error is:
Traceback (most recent call last):
File
"C:\ARCHIV~1\py thon23\lib\site-packages\Python win\pywin\frame work\dbgcommand s.py",
line 65, in OnStepOver
self._DoOrStart ("do_set_nex t", scriptutils.RS_ DEBUGGER_STEP)
File
"C:\ARCHIV~1\py thon23\lib\site-packages\Python win\pywin\frame work\dbgcommand s.py",
line 57, in _DoOrStart
method()
File
"C:\ARCHIV~1\py thon23\lib\site-packages\Python win\pywin\debug ger\debugger.py ",
line 629, in do_set_next
if self.GUIAboutTo Run():
File
"C:\ARCHIV~1\py thon23\lib\site-packages\Python win\pywin\debug ger\debugger.py ",
line 788, in GUIAboutToRun
if not self.StopDebugg erPump():
File
"C:\ARCHIV~1\py thon23\lib\site-packages\Python win\pywin\debug ger\debugger.py ",
line 484, in StopDebuggerPum p
assert self.pumping, "Can't stop the debugger pump if Im not pumping!"
AssertionError: Can't stop the debugger pump if Im not pumping!

Any ideas? O:-)
Jul 18 '05 #1
0 1533

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

Similar topics

1
2980
by: Elbert Lev | last post by:
I started with Python two weeks ago and already saved some time and efforts while writing 2 programs: 1. database extraction and backup tool, which runs once a month and creates a snapshot of important data, compresses and saves it. 2. pop3 "watchdog", which reads e-mail from a pop3 mailbox and in the case there is no mail sends e-mail messages to technicians. (the presence of e-mail in the mailbox tells that the system I'm monitoring...
3
5314
by: Anthony | last post by:
Hi, How does (Can?) the stream mechanism work in multithreaded programs? I want to implement cout in my multithreaded program.
2
6634
by: pradyumna | last post by:
In Project settins - C/C++ - Code Generation, what is the difference between the option "Multithreaded" and "Multithreaded DLL". I understand that on selecting multithreaded option, single and multithreaded applications can both use that dll, but what about multithreaded DLL option. Thanks
1
1785
by: ravinder | last post by:
I wanted to develop a multithreaded program using OO concepts on windows platform. Problem: I have to simulate two layers(similar to TCP/IP stack layers), and the layer functionality is of finite state machine type i.e after receiving any event(either after receiving message or any timer expiry), state change happens internal to layer. And there will be message transfer between two layers. My idea is to put layer specific data in the class and...
7
5314
by: Sidd | last post by:
Hi, I tried finding and example of multithreaded client-serve program in python. Can any one please tell me how to write a multithreaded client-server programn in python such that 1.It can handle multiple connections 2.It uses actual threads and not select() or some other function
5
368
by: pinaki_m77 | last post by:
Hi, I am trying to debug a C++ program using Microsoft VC++ IDE. The program loads a dynamic link library (dll) and later makes calls to functions inside this dll. I want to step inside the code of this dll. Is that possible to do? Because currently what is happening is, even if I try to step inside the function in the dll (by F11 key), it is stepping over the whole function (like F10 does). How can I step inside the dll code? Am I doing...
5
2650
by: David C | last post by:
This is very strange. Say I have code like this. I am simply looping through a collection object in a foreach loop. Course course = new Course(); foreach(Student s in course.Students) { Console.WriteLine(s.StudentID); }
3
1654
by: | last post by:
Is it possible to have just a multithreaded sub procedure? What I need is a timer time_elapsed event (2 sec interval) send params to a sub that is multithreaded. I have a COM component used to send messages,faxes, etc.. The COM com component is licensed for 6 ports. I have an app that need to send messages/faxes very frequently (seconds) and to many, many people. What I want to do is have a sub that has 6 threads to send thse messages...
0
1830
by: fabian.conrad | last post by:
Hi,. I am trying to build a multithreaded dll file, as I am new to that sort of things I've followed a tutorial step by step but still can't get things to work. I am using Visual C++ 2005 Express Edition and have installed the Microsoft Platform SDK for Windows Server 2003 SP1. When I am building my project I am getting the following error log: 1>------ Build started: Project: my_array, Configuration: Release Win32 ------ 1>Compiling......
0
8316
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
8833
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
8610
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...
0
7345
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...
1
6174
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
5636
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
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2735
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
2
1967
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.