Pywin32 (com objects) on Mac(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 对象)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Mac 上的 Pywin32(com 对象)
基础教程推荐
- NSString intValue 不能用于检索电话号码 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
