473,397 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

create user message for wxPython

Hi,

There are 2 wxPython application, A and B and need to exchange msg.
Sending WM_CLOSE, wxEVT_MOUSEWHEEL to B is OK, and sending user message
like 1225 from A to B is also OK.

But B didn't catch this message, note, B is running before A sends msg
and can receive "WM_CLOSE".

Do I have to make my own msg loop by using win32api, win32gui? I used
win32gui to post Message to other windows.

Using wx.Frame:

wx.EVT_START_MSG= 1225
EVT_START_MSG_EVENT= wx.PyEventBinder(wx.EVT_START_MSG, 0)
EVT_START_MSG_EVENT(self, self.OnStart)
Or
Self.Bind(EVT_START_MSG_EVENT,self.OnStart)

def OnStart(self, event):
print 'got start message'

Thanks a lot in advance!

James
Oct 20 '05 #1
1 1796

"James Hu" <jh*@metrigenix.com> wrote in message
news:ma*************************************@pytho n.org...
Hi,
There are 2 wxPython application, A and B and need to exchange msg.


I do not think that wx even has a mechanism for sending events between
applications.?

You need some other tool, like a socket, a named pibe, some windows specific
event queue library (gack!), or maybe a toolkit like PYRO, SPREAD e.t.c.
depending on your *reason* for needing this in the first place.

I am partial to PYRO myself.

.... and you do need an event loop in any case to map from:

"remote event" <-> "message protocol" <-> "local event"

.... at least that makes it easier to test than "raw" event's which are
harder to control.
Oct 24 '05 #2

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

Similar topics

4
by: Frank Millman | last post by:
Hi all I need to generate potentially large reports from a database, and I want to offer the option of print preview before actually printing (using wxPython). I figure that the best way to...
2
by: Adam Endicott | last post by:
I've got a wxPython based windows GUI application that takes some input and creates a PDF file output. At the end, I need to create an email message with this pdf file attached ready for the user...
3
by: John Salerno | last post by:
I'm using the sample code of the file 'simple.py' and trying to make a single window with a panel in it, but I keep getting an error. Here's my code: (I know I might need something else, like a...
9
by: k04jg02 | last post by:
I want to make a Python app that runs in the background, and when a user hits a key combination, for a function to run. This sounds simple enough, but all of the keypress detecting libraries I can...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...
0
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,...
0
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...
0
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...

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.