Python COM called from VB/Delphi

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Larry Bates

    #1

    Python COM called from VB/Delphi

    I have a rather large Python class that I've converted to
    a COM object. I can dispatch (using either Python or VB)
    and call the methods perfectly. Now a new client wants
    to call it from Delphi. Can anyone out there give me
    any pointers on how that would be done. Are there any
    "gotchas" about the way arguments or return values
    would need to be different for Delphi. I have NO Delphi
    experience so I'm completely lost.

    Secondly, I need a callback function in VB (progress
    meter) that I can pass to Python COM object to show
    progress of https: uploads. I've tried a bunch of
    different things, but am getting nowhere. Anybody
    know how to accomplish this? I need a class that
    has start(), progress(total, count), complete()
    methods that is called from my Python COM object.
    I got one working in Python by using win32's
    win32com.server .util.wrap/unwrap functions but
    the VB one has got me stumped.

    Thanks in advance for any assistance.

    Regards,
    Larry
  • =?ISO-8859-2?Q?Micha=B3_Zaborowski?=

    #2
    Re: Python COM called from VB/Delphi

    Hi,

    Larry Bates wrote:
    I have a rather large Python class that I've converted to
    a COM object. I can dispatch (using either Python or VB)
    and call the methods perfectly. Now a new client wants
    to call it from Delphi. Can anyone out there give me
    any pointers on how that would be done. Are there any
    "gotchas" about the way arguments or return values
    would need to be different for Delphi. I have NO Delphi
    experience so I'm completely lost.
    >
    There are components - Python for Delphi.
    You can call Python functions / methods from Delphi.
    Also - it is possible to create Python class with
    underlying Delphi code.
    Secondly, I need a callback function in VB (progress
    meter) that I can pass to Python COM object to show
    progress of https: uploads. I've tried a bunch of
    different things, but am getting nowhere. Anybody
    know how to accomplish this? I need a class that
    has start(), progress(total, count), complete()
    methods that is called from my Python COM object.
    I got one working in Python by using win32's
    win32com.server .util.wrap/unwrap functions but
    the VB one has got me stumped.
    >
    Sorry - my experience with VB is rather poor.

    --
    Regards,
    Michal Zaborowski (TeXXaS)

    Comment

    • Gabriel Genellina

      #3
      Re: Python COM called from VB/Delphi

      En Wed, 14 Mar 2007 21:17:12 -0300, Larry Bates <lbates@websafe .com>
      escribió:
      I have a rather large Python class that I've converted to
      a COM object. I can dispatch (using either Python or VB)
      and call the methods perfectly. Now a new client wants
      to call it from Delphi. Can anyone out there give me
      any pointers on how that would be done. Are there any
      "gotchas" about the way arguments or return values
      would need to be different for Delphi. I have NO Delphi
      experience so I'm completely lost.
      The same as he would do for any other COM object. There are tools in
      Delphi for building automatically the needed Delphi declarations
      (interfases, classes, methods, constants... similar to what makepy does
      for Python).
      All OLE types work fine. (Variants are a bit hard to process, yes, but it
      can be done)
      Secondly, I need a callback function in VB (progress
      meter) that I can pass to Python COM object to show
      Sorry, I try to stay away of VB as far as possible :)

      --
      Gabriel Genellina

      Comment

      Working...