473,491 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Tk eventloop

Hi
I try/struggle to use an ActiveX component in a Tk app. When i execute
it i can catch the first event and then when i try to change the value
of the w widget everything blocks and nothing is updated anymore.

Does someone have an idea of what is wrong and how to smartly integrate
these events with the Tk event loop.

Thx
Manu

import win32com.client
import pythoncom
import MyComponent
from Tkinter import *

class Event1(MyComponent.IEvents):
def OnUpdate(self, ItemName, UserTag):
global w
v = ptrAx.getV(ItemName)
print "%s" % v
w.configure(text='a')

root = Tk()
w = Label(root,text="test")
w.pack()

ptrAx = win32com.client.DispatchWithEvents(r'MyComponent', Event1)
ptrAx.StartUpdates()

root.mainloop()

Sep 21 '06 #1
0 800

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

Similar topics

0
2689
by: Michael Welsh | last post by:
In order to learn sockets in Python I am trying to write a simple group chat server and client. I need a little nudge, please. My question contains some GUI but only as decoration. The root...
4
2851
by: Kylotan | last post by:
I'm writing a wxPython telnet-like application that needs to be able to send and receive data independently of each other. The asyncore library comes close to what I want, but still requires I have...
0
923
by: Anand K Raydu | last post by:
Hi all, I have some problems with callback mechanisms, I have embedded python into my application and want to customize my application through python. It is great with respect to calling the my...
6
1807
by: S. David Rose | last post by:
Hello All! I am new to Python, and wanted to know if I might ask you a question regarding timing. I want a main loop which takes photos from 8 different web-cams, each can be addressed by...
2
1499
by: Ajay | last post by:
hi! i have some code with a gui that does some processing in another thread, say t2. when t2 needs to display something on the gui, it generates an event (which i have binded earlier). the code...
61
5123
by: Steven T. Hatton | last post by:
Stroustrup's view on classes, for the most part, seems to be centered around the notion of invariants. After a bit of adjusting to the use of yamt (yet another math term) in computer science, I...
9
3243
by: perchef | last post by:
Hi, I have several files to download and a GUI to update. I know this is a frequently asked question but i can't find an appropriate solution. My Downloader extends threading.Thread and update a...
3
2669
by: kalyani1031 | last post by:
hi, my problem is linking my cli module with XORP modules. I am calling my cli_main() in the XORP router manager module rtrmgr. It takes the files and compiles the files that are in the router...
7
11127
by: luca72 | last post by:
hello i have this problem: UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 8: ordinal not in range(128) Generally i solve the problem inserting : # -*- coding:...
0
7115
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,...
0
7154
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,...
1
6858
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...
0
5451
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,...
1
4881
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...
0
4578
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...
0
3086
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...
0
3076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
280
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...

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.