Mac 上的 Pywin32(com 对象)

Pywin32 (com objects) on Mac(Mac 上的 Pywin32(com 对象))
本文介绍了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 行为(例如 Linux/Solaris 上的 MainWin),但我不知道有哪一种适用于 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 对象)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

convert big yml data(转换大 yml 数据)
View aligned to top of keyboard appears in wrong place in iOS 9 Shortcut Bar only mode(在 iOS 9 Shortcut Bar only 模式下,与键盘顶部对齐的视图出现在错误的位置)
Changing the iOS keyboard animation time(更改 iOS 键盘动画时间)
How to show keyboard without touching the UISearchbar?(如何在不触摸 UISearchbar 的情况下显示键盘?)
Add a done button to the top of the keyboard(在键盘顶部添加完成按钮)
Is there a way to disable transparency on the keyboard in iOS 7?(有没有办法在 iOS 7 中禁用键盘上的透明度?)