可以在Python中使用Cocoa API吗? [英] Is it possible to use Cocoa API with Python?

查看:52
本文介绍了可以在Python中使用Cocoa API吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以在Python中使用Cocoa(苹果公司的API),因此能够像这样

I was wondering if it is possible to use Cocoa (Apple's API) with Python, so being able to run any code like in this link, so NSWorkspace functions and so on, this might be a super stupid question, but I was still wondering if it was possible...

推荐答案

是.

有一些Python程序包,一种用于Objective-C的包装程序,安装方式如下:

There are Python packages, kind of wrappers around Objective-C, install them like:

$ pip install pyobjc-core
$ pip pyobjc-framework-Cocoa
$ pip pyobjc-framework-Quartz

https://pypi.org/project/pyobjc-framework-Cocoa/

这篇关于可以在Python中使用Cocoa API吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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