Sending data from one application to another

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • William Manley
    New Member
    • Mar 2007
    • 56

    #1

    Sending data from one application to another

    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
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    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.

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #3
      Originally posted by bartonc
      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.

      Comment

      • William Manley
        New Member
        • Mar 2007
        • 56

        #4
        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.

        Comment

        • bartonc
          Recognized Expert Expert
          • Sep 2006
          • 6478

          #5
          Originally posted by William Manley
          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.

          Comment

          Working...