473,761 Members | 9,477 Online
Bytes | Software Development & Data Engineering Community
+ 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 7313
>>>>> "john" == John <jo*******@redi ffmail.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*******@redi ffmail.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*******@redi ffmail.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.go ogle.com>...
Ville Vainio <vi***@spammers .com> wrote in message news:<du******* ******@lehtori. cc.tut.fi>...
>>>> "john" == John <jo*******@redi ffmail.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*******@redi ffmail.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*******@redi ffmail.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.o rg --
-- 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*******@redi ffmail.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

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

Similar topics

3
12317
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 running the exe: I:\Program Files\Python22\dist\comtest>comtest --register Traceback (most recent call last): File "<string>", line 37, in ? File "win32com\server\register.pyc", line 468, in UseCommandLine
0
1557
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 servers require pythoncom.Missing. According to this article: http://mailman.pythonpros.com/pipermail/pycom-dev/1999q2/000127.html compatibility with Microsoft products requires pythoncom.Empty. I'm wondering if anyone knows how I can change my...
2
6148
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 well-designed COM like Excel.) When I called my COM module which was derived from IDispatch interface, the pythoncom.connect() issued error like com_error: (-2147221021, 'Operation unavailable', None, None).
5
3981
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 problems. I want to be able to distribute this program using py2exe, but I am having some problems. I am using a simple setup.py like in the documentation for the py2exe tool and everything compiles ok, except that when I run the exe, I get an...
0
2355
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 code: # start of sample code from win32com.client import *
0
2109
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 Obviously Python knows to which DLL to load, but the DLL has a different name (pythoncom versus pythoncom32.dll). So how does this
1
3739
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 this is a bug in mshtml). So, I tried to get the 'onchange' event handler and call it myself. According to the docs, this is a simple IDispatch implementation and calling Invoke() should do the trick; I actually have a working example of this in...
6
2758
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 a small window opens at the postion x0 y0 (like I want) but then IE thinks "Hey lets open a other main window too". And that window opens the url 'http://www.google.nl'
0
1714
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 complex task, it must ensure that the *right* pywintypes25.dll (or pythoncom25.dll) is loaded, even when it's implicitely loaded.
0
9376
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9923
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9811
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8813
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3911
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 we have to send another system
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.