简体   繁体   中英

Python interacting with OS X - is it possible?

I'll explain my question: is it possible to write a Python script which interacts with OS X architecture in a high-level way? For example, can I gain control on Mac OS X windows resizing from a Python script? Are there modules for that? I'm not finding any.

To push things even further, would I be able to control keyboard shortcuts too? I mean, with Python, could I write a script that opens a terminal window everytime I type cmd + Enter from wherever I am in that moment, as if it was a system shortcut ( Awesome WM style, if you know what I'm talking about)?

Hope I've been clear.

The 2nd one you can't do for sure, since the events are grabbed by other processes. You should look for a osx specific library for doing that and then write a python wrapper around it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM