473,387 Members | 1,925 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.

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
Mar 15 '07 #1
2 1853
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)
Mar 16 '07 #2
En Wed, 14 Mar 2007 21:17:12 -0300, Larry Bates <lb****@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

Mar 16 '07 #3

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

Similar topics

9
by: Edilmar | last post by:
Hi, First of all, I'm new in Python... I have worked with manu langs and IDEs, like Delphi, VB, JBuilder, Eclipse, Borland C++, Perl, etc... Then, today I think IDEs like Delphi have a...
0
by: Gandalf | last post by:
Hi All! I have an interesting problem here. I have written a Delphi program that should connect to a server written in Python. I'm using a package called DCP for encryption in Delphi and the...
81
by: julio | last post by:
Sorry but there is no another way, c# .net and mono are going to rip python, not because python is a bad lenguage, but because is to darn old and it refuses to innovate things, to fix wrong things,...
18
by: spiffo | last post by:
The Main Issue in a nutshell I am a corporate developer, working for a single company. Got a new project coming up and wondering if I should stay with Python for this new, fairly large project,...
23
by: gord | last post by:
As a complete novice in the study of Python, I am asking myself where this language is superior or better suited than others. For example, all I see in the tutorials are lots of examples of list...
38
by: flifus | last post by:
Hi all. I'm learning python these days. I'm going to use this thread to post, from time to time, my annoyances with python. I hope someone will clarify things to me where I have misunderstood them....
0
by: Larry Bates | last post by:
I have a Python COM object working. I want to pass to it a Delphi callback function (showing progress) that I can call periodically. I've Googled until I'm cross-eyed and I'm getting nowhere. ...
46
by: Chris Stewart | last post by:
I've always had an interest in Python and would like to dabble in it further. I've worked on a few very small command line programs but nothing of any complexity. I'd like to build a really...
19
by: Dotan Cohen | last post by:
I often see mention of SMBs that either want to upgrade their Windows installations, or move to Linux, but cannot because of inhouse VB apps. Are there any Python experts who I can reference them...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.