Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pywin32 (com objects) on Mac

I've got a quick question that I hope someone can help me with.

I'm in the process of creating/planning an app that needs to run cross platform and use a com library from Windows. In the past I've used win32py to run these com objects in a python app, I've been doing a bunch of research finding a solution on Mac but I've had no luck. Ideally I'd like to stay in Python as I already have working code for Python 2.7 working with this library. If there is a solution in another language however, I would like to hear it.

I realize that this sounds almost sort of backwards, but to make a long story short I have to make this com library work on Mac. I'm going to be doing some automated testing of some iOS stuff with the iOS SDK simulator.

like image 940
Wuzseen Avatar asked Feb 10 '12 19:02

Wuzseen


People also ask

Can pywin32 be used on Mac?

pywin32 wraps the Windows API libraries. Mac OS X is not Windows; it does not implement the Windows API. Thus, there is nothing for pywin32 to wrap on a Mac.

Does win32api work on Mac?

win32api is just a wrapper around the Windows low-level win32 API, there is no chance of running that on Mac without some sort of OS emulator or VM.

Is pywin32 the same as win32com?

win32com is a "Component Object Model" part of pywin32. pywin32 works with python3. pywin32 doesn't works with python3 after installing from pip.


1 Answers

COM is Windows only. COM requires extensive use of the Windows registry and WinAPI. I've seen some frameworks emulate or mock COM behavior on other operating systems (e.g. MainWin on Linux/Solaris), but I don't know of one for Mac.

The win32py module is just a wrapper around WinAPI calls. So if the WinAPI isn't available, win32py won't work.

Is the logic you need something you can wrap a service around? In other words, can you host a service on a Windows box and have the Mac application invoke the service?

like image 173
Jordan Parmer Avatar answered Sep 24 '22 00:09

Jordan Parmer