473,387 Members | 1,575 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,387 software developers and data experts.

Sending an event from a python COM server to a VB COM client

Hello
I am trying to send an event from a Python COM server to a VB (or VB.NET)
COM client.
I am a newbie both in VB and in python.
Can anyone give me a simple (but complete) code example both of the Python
server side and the VB client side for raising a single event.

Any answer would be highly appreciated.
Regards
Gary
Nov 22 '05 #1
6 2547
Gary Kshepitzki wrote:
Hello
I am trying to send an event from a Python COM server to a VB (or VB.NET)
COM client.
I am a newbie both in VB and in python.
Can anyone give me a simple (but complete) code example both of the Python
server side and the VB client side for raising a single event.

Any answer would be highly appreciated.
Regards
Gary


I suggest the book _Python Programming on Win32_ by Mark Hammond and
Andy Robinson. There is a chapter online and I believe it even includes
the example you need.

http://www.oreilly.com/catalog/pytho...pter/ch12.html

Steve P.
Nov 22 '05 #2
Gary Kshepitzki wrote:
Hello
I am trying to send an event from a Python COM server to a VB (or VB.NET)
COM client.
I am a newbie both in VB and in python.
Can anyone give me a simple (but complete) code example both of the Python
server side and the VB client side for raising a single event.

Any answer would be highly appreciated.
Regards
Gary


I suggest the book _Python Programming on Win32_ by Mark Hammond and
Andy Robinson. There is a chapter online and I believe it even includes
the example you need.

http://www.oreilly.com/catalog/pytho...pter/ch12.html

Steve P.
Nov 22 '05 #3
Thank you Steve.
I have already went over that book, I didn't find there an example of
sending events from a python server to a VB client (just direct function
calls from the VB client to the Python server, which is trivial). And in any
case, since I am a newbie both in VB and in Python, I am really looking for
an example that will spell things out for me. There's a lot of 'wrapping'
happening under the hood in this technology and I am kind of lost between
what is done for me on each side and what I should explicitly do my self.
Thanks again for taking the time to answer.
Gary
"Stephen Prinster" <pr******@mail.com> wrote in message
news:wQ*******************@newssvr25.news.prodigy. net...
Gary Kshepitzki wrote:
Hello
I am trying to send an event from a Python COM server to a VB (or VB.NET)
COM client.
I am a newbie both in VB and in python.
Can anyone give me a simple (but complete) code example both of the
Python
server side and the VB client side for raising a single event.

Any answer would be highly appreciated.
Regards
Gary


I suggest the book _Python Programming on Win32_ by Mark Hammond and
Andy Robinson. There is a chapter online and I believe it even includes
the example you need.

http://www.oreilly.com/catalog/pytho...pter/ch12.html

Steve P.

Nov 22 '05 #4
Thank you Steve.
I have already went over that book, I didn't find there an example of
sending events from a python server to a VB client (just direct function
calls from the VB client to the Python server, which is trivial). And in any
case, since I am a newbie both in VB and in Python, I am really looking for
an example that will spell things out for me. There's a lot of 'wrapping'
happening under the hood in this technology and I am kind of lost between
what is done for me on each side and what I should explicitly do my self.
Thanks again for taking the time to answer.
Gary
"Stephen Prinster" <pr******@mail.com> wrote in message
news:wQ*******************@newssvr25.news.prodigy. net...
Gary Kshepitzki wrote:
Hello
I am trying to send an event from a Python COM server to a VB (or VB.NET)
COM client.
I am a newbie both in VB and in python.
Can anyone give me a simple (but complete) code example both of the
Python
server side and the VB client side for raising a single event.

Any answer would be highly appreciated.
Regards
Gary


I suggest the book _Python Programming on Win32_ by Mark Hammond and
Andy Robinson. There is a chapter online and I believe it even includes
the example you need.

http://www.oreilly.com/catalog/pytho...pter/ch12.html

Steve P.

Nov 22 '05 #5
Hi Gary,
I am trying to send an event from a Python COM server to a VB (or VB.NET)
COM client.
I am a newbie both in VB and in python.
Can anyone give me a simple (but complete) code example both of the Python
server side and the VB client side for raising a single event.

Do you mean interprocess communication? If so, then you could use the
WM_CopyData message from the Windows API. However, this will only work
if the two applications are running in the same machine and if at least
one of them (the receiver) has a Window were to send the messages.

I have been used the following application to comunicate two C#
applications:

* Simple Interprocess Communications using WM_COPYDATA
http://www.vbaccelerator.com/home/NE...on/article.asp

However, the zip contains a VB.Net example as well. I haven't ever done
this with python, so, I don't know how it works. However, you could take
a look at the following thread, which discuss how to implement this
with python:

* PyWin SendMessage
http://groups.google.ch/group/comp.l...62e88d9e5d7e80

I have also tried other approaches, but they didn't work on my case, or
they require you to have additional hardware (ie: a network card), or to
install additional software (ie: Microsoft Windwos Message Queuing).
However, they might work for you:

* Windows Sockets may be the easiest solution and you can find several
examples of this with google. In my case, I didn't use them 'cause
they require my users to have a network card and my system is just
a single user application with several processes running on the same
machine.

* Named Pipes, which are a feature of windows:
- Inter-Process Communication in .NET Using Named Pipes, Part 1
http://ivanweb.com/articles/namedpipes/index.cfm

- How to use named pipes for interprocess communication in Visual
Basic .NET
http://support.microsoft.com/?kbid=871044

* Microsoft Windows Message Queuing (MSMQ) -> I don't have a VB/VB.NET
example for this; only a C# example, but it may work in VB/VB.NET
as well since if I'm not wrong, it also uses the Windows Api. Again,
I didn't used it because it requires my users to install the MSMQ
software from Microsoft, which is included with Windows.

- Using MSMQ from C#
http://www.codeproject.com/csharp/mgpMyQueue.asp

Unfortunatelly, I don't have python examples, but since they use the
Windows Api it may be possible to implement with the windows extensions
for python. You just have to look for them in the python list.

Regards,
Josef

Nov 22 '05 #6
Hi Gary,
I am trying to send an event from a Python COM server to a VB (or VB.NET)
COM client.
I am a newbie both in VB and in python.
Can anyone give me a simple (but complete) code example both of the Python
server side and the VB client side for raising a single event.

Do you mean interprocess communication? If so, then you could use the
WM_CopyData message from the Windows API. However, this will only work
if the two applications are running in the same machine and if at least
one of them (the receiver) has a Window were to send the messages.

I have been used the following application to comunicate two C#
applications:

* Simple Interprocess Communications using WM_COPYDATA
http://www.vbaccelerator.com/home/NE...on/article.asp

However, the zip contains a VB.Net example as well. I haven't ever done
this with python, so, I don't know how it works. However, you could take
a look at the following thread, which discuss how to implement this
with python:

* PyWin SendMessage
http://groups.google.ch/group/comp.l...62e88d9e5d7e80

I have also tried other approaches, but they didn't work on my case, or
they require you to have additional hardware (ie: a network card), or to
install additional software (ie: Microsoft Windwos Message Queuing).
However, they might work for you:

* Windows Sockets may be the easiest solution and you can find several
examples of this with google. In my case, I didn't use them 'cause
they require my users to have a network card and my system is just
a single user application with several processes running on the same
machine.

* Named Pipes, which are a feature of windows:
- Inter-Process Communication in .NET Using Named Pipes, Part 1
http://ivanweb.com/articles/namedpipes/index.cfm

- How to use named pipes for interprocess communication in Visual
Basic .NET
http://support.microsoft.com/?kbid=871044

* Microsoft Windows Message Queuing (MSMQ) -> I don't have a VB/VB.NET
example for this; only a C# example, but it may work in VB/VB.NET
as well since if I'm not wrong, it also uses the Windows Api. Again,
I didn't used it because it requires my users to install the MSMQ
software from Microsoft, which is included with Windows.

- Using MSMQ from C#
http://www.codeproject.com/csharp/mgpMyQueue.asp

Unfortunatelly, I don't have python examples, but since they use the
Windows Api it may be possible to implement with the windows extensions
for python. You just have to look for them in the python list.

Regards,
Josef

Nov 22 '05 #7

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

Similar topics

1
by: praba kar | last post by:
Dear All, I have doubt regarding mail sending smtplib module. The below code is I used to send a mail. ########################################## import email.Message import email.Utils...
12
by: johnny.karlsson | last post by:
Hi, I'm working on a project were a need to be able to upload firmware to a microcontroller based Ethernet device. But because of the memory constraints the controller can only handle packages of...
4
by: Trollpower | last post by:
Greetings, im totally new to ASP.Net, so i hope you can help me out here. Ive got some ActiveX Controls, which work great with Windows Forms. Now i have to do some work with ASP.Net, where i...
6
by: rekaeps | last post by:
We are developing an ASP.NET 2.0 (C#) application, and I'm having troubles sending e-mail from the server when accessing the web site from a separate client computer. Also, in the same scenario,...
14
by: sridhar | last post by:
iam having user account on an exchangeserver. with that can i send an email using python? if iam using the following code iam getting error fromAddress = 'sridhar_kasturi@satyam.com'...
0
by: danishce | last post by:
Hello All: I am developing a client/server application using vb.net winsock programming. I am sending data to Server and at the same time receive the incoming data from the server. My application...
4
by: david | last post by:
hello, I have a client/server application. the server capture picture from webcam and send it to every client connected to it.the network part works good and the capture from webcam too. I...
8
by: Frank Millman | last post by:
Hi all This is not strictly a Python question, but as the system to which relates is written in Python, hopefully it is not too off-topic. I have an accounting/business application, written in...
1
by: =?utf-8?q?C=C3=A9dric_Lucantis?= | last post by:
Le Tuesday 24 June 2008 08:59:40 Piyush Anonymous, vous avez écrit : One way is to transmit the code as a string and compile it on server-side with the 'compile' builtin function. Another is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.