在Mac上的Pywin32(com对象) [英] Pywin32 (com objects) on Mac

查看:1610
本文介绍了在Mac上的Pywin32(com对象)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个快速问题,希望有人能帮助我。

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

我正在创建/规划需要运行的应用程序跨平台并使用Windows的com库。在过去,我已经使用win32py在python应用程序中运行这些COM对象,我一直在做一些研究在Mac上找到一个解决方案,但我没有运气。理想情况下,我想留在Python,因为我已经有工作代码为Python 2.7使用这个库。如果有另一种语言的解决方案,我想听听它。

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.

我意识到这听起来几乎倒退,但是为了做一个长的故事短必须使这个com库工作在Mac上。我将使用iOS SDK模拟器对一些iOS程序进行一些自动测试。

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.

推荐答案

COM仅适用于Windows。 COM需要大量使用Windows注册表和WinAPI。我看到一些框架模拟或模拟COM行为在其他操作系统(例如MainWin在Linux / Solaris),但我不知道一个为Mac。

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.

win32py模块只是一个WinAPI调用的包装。所以如果WinAPI不可用,win32py将无法工作。

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

是否需要一些你可以包装服务的逻辑?换句话说,你可以在Windows框中托管服务,并让Mac应用程序调用该服务吗?

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?

这篇关于在Mac上的Pywin32(com对象)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆