https://github.com/ronaldoussoren/objc_asyncio
asyncio eventloop for Cocoa GUIs
https://github.com/ronaldoussoren/objc_asyncio
asyncio cocoa pyobjc python
Last synced: 4 months ago
JSON representation
asyncio eventloop for Cocoa GUIs
- Host: GitHub
- URL: https://github.com/ronaldoussoren/objc_asyncio
- Owner: ronaldoussoren
- License: other
- Created: 2020-03-24T07:06:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-03T16:47:42.000Z (11 months ago)
- Last Synced: 2025-03-18T21:21:54.187Z (11 months ago)
- Topics: asyncio, cocoa, pyobjc, python
- Language: Python
- Size: 129 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: License.rst
Awesome Lists containing this project
README
**WARNING: This library is basically completely untested at this point**
Objc_asyncio is a library that implements an
asyncio runloop using the Cocoa CFRunLoop, which makes
it possible to integrate macOS GUIs and asyncio.
The basic usage in command-line scripts is to
call ``objc_asyncio.install`` and then use asyncio
as usual.
The more interesting use-case are GUI programs using
PyObjC, in which case you can use the ``running_loop``
context manager:
::
import sys
import Cocoa
import objc_asyncio
with objc_asyncio.running_loop():
Cocoa.NSApplicationMain(sys.argv)