473,480 Members | 3,098 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

PythonCom equivalent on Linux!

Is there an equivalent of COM on Linux that I can get through Python.
My need is to have some sort of language independent component
framework. I can think of CORBA but I have to have a server running. I
prefer not to. I just need Python components for local consumption in
other languages. I remember Gnome libs having some thing like this.
Any thoughts?
Jul 18 '05 #1
14 7210
>>>>> "john" == John <jo*******@rediffmail.com> writes:

john> Is there an equivalent of COM on Linux that I can get
john> through Python.

Mono appears to be the future of COM equivalent technologies on
Linux. Python support just isn't stable/mature there yet.

There is also xpcom.

john> My need is to have some sort of language independent
john> component framework. I can think of CORBA but I have to have
john> a server running. I

How critical is this criterion? I would definitely go with CORBA.

--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #2
Ville Vainio <vi***@spammers.com> wrote in message news:<du*************@lehtori.cc.tut.fi>...
>> "john" == John <jo*******@rediffmail.com> writes:

john> Is there an equivalent of COM on Linux that I can get
john> through Python.

Mono appears to be the future of COM equivalent technologies on
Linux. Python support just isn't stable/mature there yet.


It depends what everyone means by "COM equivalent". If you mean it as
some kind of distributed object technology, then there are a lot of
CORBA-related solutions out there: ORBit (PyORBit vs. ORBit-python),
Fnorb, omniORB (omniORBpy), and so on. In addition, you have a
selection of unstandardised technologies to choose from, too.
There is also xpcom.
As well as UNO (PyUNO), but that is arguably in the realm of the other
principal interpretation of "COM equivalent": the application
automation technology. On that front, there's ORBit and Bonobo for
GNOME-based applications (I believe) and DCOP for KDE-based
applications. Eventually, there'll be standardisation of such
technologies, and I imagine that D-BUS fits in somewhere here.
john> My need is to have some sort of language independent
john> component framework. I can think of CORBA but I have to have
john> a server running. I

How critical is this criterion? I would definitely go with CORBA.


Yes. Years ago I had a lot of fun with ILU, but I imagine that any of
the more mature/supported Python-compatible ORBs would be suitable.
Certainly, omniORB (http://omniorb.sourceforge.net/) would be my first
consideration.

Meanwhile, beware of suggestions that you use SOAP or XML-RPC! If
remote method calling is what interests you, such technologies are not
*directly* applicable (unless, in the case of SOAP, XML documents are
the primary representation of data in your system).

Paul
Jul 18 '05 #3
John <jo*******@rediffmail.com> pisze:
Is there an equivalent of COM on Linux that I can get through Python.
My need is to have some sort of language independent component
framework. I can think of CORBA but I have to have a server running. I
prefer not to. I just need Python components for local consumption in
other languages. I remember Gnome libs having some thing like this.
Any thoughts?


Don't you think that Windows with all its stuff is more "serverish" that
running separate CORBA server process? Anyways, who runs RPC server on
client machine...

--
Jarek Zgoda
http://jpa.berlios.de/ | http://www.zgodowie.org/
Jul 18 '05 #4
Ville Vainio <vi***@spammers.com> pisze:
john> Is there an equivalent of COM on Linux that I can get
john> through Python.

Mono appears to be the future of COM equivalent technologies on
Linux. Python support just isn't stable/mature there yet.


From my point of view, DCOP is perfect equivalent of COM. Mono (and
other dotnet implementations) may become some day.

--
Jarek Zgoda
http://jpa.berlios.de/ | http://www.zgodowie.org/
Jul 18 '05 #5
pa**@boddie.org.uk (Paul Boddie) wrote in message news:<53**************************@posting.google. com>...
Ville Vainio <vi***@spammers.com> wrote in message news:<du*************@lehtori.cc.tut.fi>...
>>>> "john" == John <jo*******@rediffmail.com> writes:


john> Is there an equivalent of COM on Linux that I can get
john> through Python.

Mono appears to be the future of COM equivalent technologies on
Linux. Python support just isn't stable/mature there yet.


It depends what everyone means by "COM equivalent". If you mean it as
some kind of distributed object technology, then there are a lot of
CORBA-related solutions out there: ORBit (PyORBit vs. ORBit-python),
Fnorb, omniORB (omniORBpy), and so on. In addition, you have a
selection of unstandardised technologies to choose from, too.
There is also xpcom.


As well as UNO (PyUNO), but that is arguably in the realm of the other
principal interpretation of "COM equivalent": the application
automation technology. On that front, there's ORBit and Bonobo for
GNOME-based applications (I believe) and DCOP for KDE-based
applications. Eventually, there'll be standardisation of such
technologies, and I imagine that D-BUS fits in somewhere here.
john> My need is to have some sort of language independent
john> component framework. I can think of CORBA but I have to have
john> a server running. I

How critical is this criterion? I would definitely go with CORBA.


Yes. Years ago I had a lot of fun with ILU, but I imagine that any of
the more mature/supported Python-compatible ORBs would be suitable.
Certainly, omniORB (http://omniorb.sourceforge.net/) would be my first
consideration.

Meanwhile, beware of suggestions that you use SOAP or XML-RPC! If
remote method calling is what interests you, such technologies are not
*directly* applicable (unless, in the case of SOAP, XML documents are
the primary representation of data in your system).


Thanks. I think DCOP and Bonobo are what I am looking for. I use
omniORB. I dropped SOAP for most part after I found that CORBA
complexity was just a myth. I just did not think CORBA was what I
needed for this particular project.
Jul 18 '05 #6
>>>>> "john" == John <jo*******@rediffmail.com> writes:

john> use omniORB. I dropped SOAP for most part after I found that
john> CORBA complexity was just a myth. I just did not think CORBA

Tell me about it! CORBA is perceived as complex because of the
low-levelish and painful C++ binding, but the Python binding proves
that it's actually a pretty simple way of doing the complex thing.

Duncan Grisby (of omniORB fame) debunks lots of CORBA myths in his
presentations that are available online:

http://www.grisby.org/presentations/

Mark my words, CORBA's day will come ;-).

--
Ville Vainio http://tinyurl.com/2prnb
Jul 18 '05 #7
In article <ba**************************@posting.google.com >,
John <jo*******@rediffmail.com> wrote:
Is there an equivalent of COM on Linux that I can get through Python.
My need is to have some sort of language independent component
framework. I can think of CORBA but I have to have a server running. I
prefer not to. I just need Python components for local consumption in
other languages. I remember Gnome libs having some thing like this.
Any thoughts?


Other people have already mentioned that CORBA may be a good choice
for you, and pointed you to some of my presentations about the
issues.

One thing nobody has mentioned yet is your statement that for CORBA
you "have to have a server running". That is one of the common myths
about CORBA. For CORBA to work, there is no need for some kind of
separate server. Processes using CORBA talk to each other directly,
not through some other server.

Cheers,

Duncan.

--
-- Duncan Grisby --
-- du****@grisby.org --
-- http://www.grisby.org --
Jul 18 '05 #8
> One thing nobody has mentioned yet is your statement that for CORBA
you "have to have a server running". That is one of the common myths
about CORBA. For CORBA to work, there is no need for some kind of
separate server. Processes using CORBA talk to each other directly,
not through some other server.


Hi Duncan,
I found out about the pleasure of CORBA for the first time with your
omniORBPy. That said, I am thinking of my components not to be
seperate processes (OK! I won't call them servers :-) ) running all
the time. Take an ActiveX control for example. It is an in-process
component, comes to life only when a client application creates it and
consumes zero memory otherwise. Deployment is simpler than deploying a
daemon. This was what I wanted. I did not need to preserve state
across clients. I think you are pointing to something akin to IPC like
DDE. If you think CORBA can be used like an ActiveX in-process
control, please let me know how.

Thanks.
Jul 18 '05 #9
John <jo*******@rediffmail.com> wrote:
...
across clients. I think you are pointing to something akin to IPC like
DDE. If you think CORBA can be used like an ActiveX in-process
control, please let me know how.


CORBA itself allows every activation model one typically wants:
in-process, external-process, remote-host. Just choose a CORBA
implementation ("broker") that provides a support you like for your
preferred activation models. PyORBit, for example (which you can find
at <http://ftp.gnome.org/pub/GNOME/sources/pyorbit/2.0/>), working
together with the ORBit2 object broker, should be fully capable of both
using and being used by in-process servers and clients, as normally
required for the application it's optimized for (Gnome). Other object
brokers might also be suitable for your needs.

Different Corba object brokers can interoperate, but might not be able
to fully utilize each other's components with in-process activation
(communication at the in-process level may be more efficient, but is
typically more intrusive and less standardized, than clean communication
via the standardized Corba inter-brokers protocol, IIOP). If your main
thrust is building the equivalent of ActiveX "controls" (components with
a visual interface), and GTK/Gnome is acceptable to you, PyORBit and
ORBit2 might suit you best, for example.

I have used COM extensively in the past, and Corba more modestly. It
appears to me on the basis of this experience that Corba is technically
superior to COM. Undoubtedly, on Windows, COM has the advantage of
being widespread; particularly for the purpose of automating
("scripting") applications, being able to rely on just about every
application of note being forced by market demand to provide _some_
level of COM "scripting" interface is quite enabling (even though many
of those interfaces are badly designed, sprawling, ungainly hulks --
mostly not due to COM problems, but to defects inherent in the
architecture and internal design of the applications in question --
nevertheless being able to get at them SOMEhow is still better than not
getting any access to them).

Neither Corba nor any other standard (XPCOM, UNO, etc, etc) is likely to
gain total ascendancy comparable to what COM gained in Windows, in my
opinion. The very existence of many good standards competing in good
part for the same set of niches, and each enjoying significant support,
precludes that ascendancy. Moreover, there are objections to the whole
concept in some sectors of the Unix community; Eric Raymond's excellent
book, "The Art of Unix Programming", has a short section which
summarizes those objections, albeit a bit tersely (IMHO, the book is
well worth reading even if you think you'll never program for anything
but Windows, BTW: it has many important lessons to teach).
Alex
Jul 18 '05 #10
> CORBA itself allows every activation model one typically wants:
in-process, external-process, remote-host.
That I did not know. Thanks for the info. I will check PyOrbit. I
currently use omniORBPy and occationally Fnorb.
If your main
thrust is building the equivalent of ActiveX "controls" (components with
a visual interface), and GTK/Gnome is acceptable to you, PyORBit and
ORBit2 might suit you best, for example.


My main interest is not GUI controls. Just being able to make code in
any language available to any other language on the same machine
regardless of the types of languages (static/dynamic, bytecode/native)
since all languages are good in something than others. Also, I am
frequently frustrated as my language choices seem to be based on
availablity of libraries and tools rather than languages due to the
nature of my projects. So I would like to be able to write part of the
code in Python, part of it in Pascal and maybe some in Java and have
all talk to each other easily through some sort of interface.
Something like a DLL/SO or COM. CORBA seems to be the best bet so far.
Jul 18 '05 #11
John <jo*******@rediffmail.com> wrote:
...
My main interest is not GUI controls. Just being able to make code in
any language available to any other language on the same machine
regardless of the types of languages (static/dynamic, bytecode/native)


Ah, yes, that was originally the holy grail of ILU, which, if I recall
correctly, did evolve basically into a CORBA solution eventually. At
any rate, Corba surely has the potential to help (better than COM does
on Windows, for this purpose), assuming you can find acceptable brokers
for your purposes (Corba specifies language bindings for a bazillion
languages, but any given broker may not offer _all_, I believe...).
Alex
Jul 18 '05 #12
Alex Martelli wrote:
[snip]
(Corba specifies language bindings for a bazillion
languages, but any given broker may not offer _all_, I believe...).


Just a precision to be sure no-one will be misunderstanding this: nothing
prevents you to use different CORBA ORBs for your different languages. Since all
ORBs use the same protocols and architecture, they interoperate quite gracefully.

I used once fnorb for Python (http://www.fnorb.org/) and JacORB for Java
(http://www.jacorb.org/) and everything worked OK.

But of course, you may get some functions implemented in some ORBs, but not in
other ones (e.g activation models...)

The OMG site has a good list of ORBs, free or commercial:
http://www.omg.org/technology/corba/corbadownloads.htm

HTH
--
- Eric Brunel <eric (underscore) brunel (at) despammed (dot) com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com
Jul 18 '05 #13
Eric Brunel <er*********@despammed.com> wrote:
Alex Martelli wrote:
[snip]
(Corba specifies language bindings for a bazillion
languages, but any given broker may not offer _all_, I believe...).
Just a precision to be sure no-one will be misunderstanding this: nothing
prevents you to use different CORBA ORBs for your different languages.
Since all ORBs use the same protocols and architecture, they interoperate
quite gracefully.


Absolutely, as long as typical inter-ORB mechanisms (IIOP first and
foremost, I believe that's the only standardized one, right?) are
acceptable for your purposes. The OP seemed to think that this couldn't
possibly be the case for _his_ purposes and I didn't challenge that
assumption.

I used once fnorb for Python (http://www.fnorb.org/) and JacORB for Java
(http://www.jacorb.org/) and everything worked OK.

But of course, you may get some functions implemented in some ORBs, but
not in other ones (e.g activation models...)
Right. A fully standard compliant ORB need not talk to other ORBs by
anything else except IIOP (if it does more, swell, but it don't hafta).

The OMG site has a good list of ORBs, free or commercial:
http://www.omg.org/technology/corba/corbadownloads.htm


Very good site to check for anything CORBA, btw, so tx for posting the
URL! I should have dome that myself but didn't think of it, sorry.
Alex
Jul 18 '05 #14
In article <1g*****************************@yahoo.com>,
Alex Martelli <al*****@yahoo.com> wrote:
Eric Brunel <er*********@despammed.com> wrote:


[...]
Just a precision to be sure no-one will be misunderstanding this: nothing
prevents you to use different CORBA ORBs for your different languages.
Since all ORBs use the same protocols and architecture, they interoperate
quite gracefully.


Absolutely, as long as typical inter-ORB mechanisms (IIOP first and
foremost, I believe that's the only standardized one, right?) are
acceptable for your purposes. The OP seemed to think that this couldn't
possibly be the case for _his_ purposes and I didn't challenge that
assumption.


Going further, if you want CORBA communication between different
languages in a single process, you basically have to use the same ORB
for all of them. There is no CORBA standard for binary linking between
languages as there is in COM. In theory, in some circumstances you
could do it, but they would still end up talking IIOP through the TCP
loopback interface. In practice, C level symbols often clash between
ORBs, making it fundamentally impossible. You certainly can't have two
different C++ ORBs running in one process, for example.

CORBA is just not intended for that kind of in-process
interoperability. If you absolutely have to have that, you have to
stick with just one ORB. omniORB allows efficient communication
between C++ and Python in one process, and I assume ORBit does too.
Unfortunately, ORBit has historically not been too bothered about
sticking to the CORBA specs, but it might be better now.

[...]
The OMG site has a good list of ORBs, free or commercial:
http://www.omg.org/technology/corba/corbadownloads.htm


Very good site to check for anything CORBA, btw, so tx for posting the
URL! I should have dome that myself but didn't think of it, sorry.


Good, but that page is hopelessly out of date. I don't think anyone at
the OMG maintains it. If they do, they're doing an awful job...

This page has some useful information about the ORBs out there and
what they support:

http://www.puder.org/corba/matrix/

Cheers,

Duncan.

--
-- Duncan Grisby --
-- du****@grisby.org --
-- http://www.grisby.org --
Jul 18 '05 #15

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

Similar topics

3
12279
by: Paul | last post by:
Hi I'm trying to build a standalone COM exe server using Python 2.2 + Mark Hammond's windows extensions + Py2Exe. I've built the example linked on the Py2Exe homepage and get this error when...
0
1529
by: Ashley | last post by:
I have quite a few COM servers implemented using Visual C++ 6.0 and I'm having trouble accessing all of them via Python. The problem is with the default being set to pythoncom.Empty while my...
2
5961
by: John J. Lee | last post by:
Dear, I have problems when I get the IDispatch with pythoncom.connect(). When I called the 'Excel.Application' with it, it worked. (At least I can see the pythoncom.connect() is working for the...
5
3942
by: Brian Hlubocky | last post by:
I'm have a fairly simple (in terms of COM) python program that pulls info from an Access database and creates Outlook contacts from that information. It uses wxPython for gui and works without...
0
2333
by: gloom | last post by:
Hey, I'm programming something with NeroSDK COM module, and I bumped into a problem: why doesn't python releases and uninitializes COM objects that are no longer referenced? Here is a sample...
0
2083
by: Olaf Meding | last post by:
How does Python (version 23 on Windows) know what to import? I could not find a file or directory named "pythoncom". import pythoncom help(pythoncom) FILE c:\windows\system32\pythoncom23.dll...
1
3713
by: fraca7 | last post by:
Hello. I got a little problem while using pythoncom to automate IE; for some reason, changing the 'selectedIndex' on an instance of IHTMLSelectElement doesn't fire the 'onchange' event (I guess...
6
2727
by: gcmartijn | last post by:
H! I using a script that opens a internet page in a small window (what I can control) In XP everything was working fine, but now I'm using Vista with IE7 and this is what happends now: First...
0
1688
by: Gabriel Genellina | last post by:
En Wed, 27 Aug 2008 21:17:22 -0300, Vistro <vistro@vistro.netescribi�: Reinstalling the pywin32 package should fix that, I presume. In fact that __import_whatever function does a rather...
0
7055
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
7110
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...
1
6763
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3015
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
574
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
210
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.