Python COM called from VB/Delphi

L

Larry Bates

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?=

Hi,

Larry said:
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.
 
G

Gabriel Genellina

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top