Jules
Jules

Reputation: 55

Python Pyro running on Linux to open a COM object on a remote windows machine, is it possible?

I have a project that requires the usage of COM objects running on a windows machine. The machine running the Python Django project is on a Linux box. I want to use Pyro and the django App to call COM objects on the remote windows machine. Is it possible? Any suggestion is appreciated?

Upvotes: 1

Views: 549

Answers (1)

Irmen de Jong
Irmen de Jong

Reputation: 2847

Yes this is a perfect use case for Pyro, to create a platform independent wrapper around your COM access code.

At least I assume you have some existing Python code (using ctypes or pywin32?) that is able to invoke the COM object locally? You wrap that in a Pyro interface class and expose that to your linux box.

I think the only gotcha is that you have to make sure you pythoncom.CoInitialize() things properly in your Pyro server class to be able to deal with the multithreading in the server, or use the non-threaded multiplex server.

Upvotes: 0

Related Questions