All Projects → apple → Ccs Pyosxframeworks

apple / Ccs Pyosxframeworks

Licence: apache-2.0
Python Framework for macOS APIs used by CalendarServer

Programming Languages

python
139335 projects - #7 most used programming language

Getting Started

This is a python library that wraps a number of useful OS X frameworks.

Develop

cffi wrappers for various frameworks live in the osx.frameworks modules. Run the osx._corefoundation_cffi_build module to create the osx._corefoundation.so module. That contains the cffi extension module for the wrappers. Each time changes are made to the wrapper modules, re-run the cffi build.

The other modules in osx are Python objects that wrap various CoreFoundation objects to provide implicit CFRetain/CFRelease behavior and also simple data conversion APIs between the CF types and Python types. For example to turn a Python string "s" into a CFStringRef:

cfstr = CFStringRef.fromString(s)

The base Python CFObjectRef class assumes ownership of the underlying CF object and will always release it. If the CF object being passed in has not already been retained, then set the "owned" argument to False.

Install

python setup.py build

Copyright and License

Copyright (c) 2015-2017 Apple Inc. All rights reserved.

This software is licensed under the Apache License, Version 2.0. The Apache License is a well-established open source license, enabling collaborative open source software development.

See the "LICENSE" file for the full text of the license terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].