By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,285 Members | 1,691 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,285 IT Pros & Developers. It's quick & easy.

Sending data from one application to another

P: 56
Hello,

I'm trying to figure out how I would send data (most likely a string) from a script (written in python) to a program on windows xp.

I posted this here instead of the python forum because its not really to do with python, more to do with windows. How do two completely unrelated applications talk to eachother? What would I need to know in one application to find the other application? Does anyone have a link to where I could learn more about the mechanics of what I'm asking?

(Also, I tried searching google, but without knowing what im trying to do is actually called, its kinda hard.)

Thanks

EDIT:
some information in case it helps:
Python version: 2.5.1
Windows XP service pack 2, pro
target program: http://www.icechat.net
Nov 12 '07 #1
Share this Question
Share on Google+
4 Replies


bartonc
Expert 5K+
P: 6,596
What you need to know about the target application is:
Does this application expose a COM interface?

Many Windows applications register a COM (Component Object Model) server which your Python program may become a "client" of. This is the most common technique for intra-app communications. If you have Windows development tools installed on your machine, the OLE-COM Object Viewer comes in very handy for finding the needed info. The PyhtonWin (not sure if that's installed by default when you install Python) program also has a COM Browser and MakePy utility that may shed some light on the subject.

There is also a shared memory interface used by some. I'll try to dig up the name of that one.
Nov 12 '07 #2

bartonc
Expert 5K+
P: 6,596
What you need to know about the target application is:
Does this application expose a COM interface?

Many Windows applications register a COM (Component Object Model) server which your Python program may become a "client" of. This is the most common technique for intra-app communications. If you have Windows development tools installed on your machine, the OLE-COM Object Viewer comes in very handy for finding the needed info. The PyhtonWin (not sure if that's installed by default when you install Python) program also has a COM Browser and MakePy utility that may shed some light on the subject.

There is also a shared memory interface used by some. I'll try to dig up the name of that one.
Other IPC methods are list in Microsoft's Interprocess Communications.
Nov 12 '07 #3

P: 56
Thanks for your help,

I went and asked the developer of icechat about COM and he told me I could use DDE to connect to it, and now I have access to the scripting engine within it via the python dde module.
Nov 12 '07 #4

bartonc
Expert 5K+
P: 6,596
Thanks for your help,

I went and asked the developer of icechat about COM and he told me I could use DDE to connect to it, and now I have access to the scripting engine within it via the python dde module.
That module is in the PythonWin installation. If you don't already have that, it's on sourceforge. The DDE docs are very limited. You'll need to rely on Microsoft docs and translate by experimentation. ActivePython has some, but the installed help is easier to search.

Hope that helps.
Nov 12 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.