PyCocoa


NamePyCocoa JSON
Version 23.12.28 PyPI version JSON
download
home_pagehttps://GitHub.com/mrJean1/PyCocoa
SummaryBasic Python binding to macOS' Objective-C Cocoa
upload_time2023-12-27 19:04:48
maintainerJean M. Brouwers
docs_urlNone
authorJean M. Brouwers
requires_python
licenseMIT
keywords apple-silicon cocoa cocoa-python cocoavlc ctypes fault faults faulthandler macos macosx objective-c pycocoa python-vlc transparent vlc vlcplayer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =======
PyCocoa
=======

A basic, ctypes_-based Python binding to the macOS_ Objective-C Cocoa runtime and
several other macOS_ libraries.

This is package `cocoa-python`_ by *Phillip Nguyen (C) 2011*, modified, extended,
tested, documented and published with permission under both the `MIT License`_ and
the original `New BSD License`_.

Installation
============

To install PyCocoa, type ``pip install PyCocoa`` or ``easy_install PyCocoa`` in a
terminal window.  Alternatively, download ``PyCocoa-y.m.d.zip`` from PyPI_ or
GitHub_, ``unzip`` the downloaded file, ``cd`` to directory ``PyCocoa-y.m.d`` and
type ``python setup.py install``.  To run all PyCocoa tests, type
``python setup.py test`` or ``python test/run.py`` before or after installation.

Examples `cocoavlc.py`_ and *simple_VLCplayer.py* require installation of the
`VLC App`_ and the corresponding `Python-VLC`_ binding.

Documentation
=============

In addition to the pycocoa_ package, the distribution files contain several tests,
some examples and the documentation_ (generated by Epydoc_ using command line
``epydoc --html --no-private --no-source --name=PyCocoa --url=... -v pycocoa``).

Tests
=====

The tests and examples have only been run with 64-bit Python 3.12.0, 3.11.5, 3.8.10
and 2.7.18 using `Python-VLC`_ 3.0.18, 3.0.12, 3.0.11, 3.0.10, 3.0.8, 3.0.6, 3.0.4
and 2.2.8 (with the compatible `VLC App`_ and 3.0.16) on macOS 14.1.2 Sonoma, 13.2
Ventura, 12.0.1 Monterey, 11.6.1 and 11.5.2 Big Sur (aka 10.16), 10.15.7 Catalina,
10.14.6 Mojave or 10.13.6 High Sierra.  The tests run *with and without*
``lazy import`` in Python 3.

Python 3.12.0 and 3.11.5 run on Apple Silicon (``arm64`` *natively*), other Python
versions run on Intel (``x86_64``) or Intel *emulation* (``arm64_x86_64``, see
function ``pycocoa.machine``).

Previously, PyCocoa was tested with 64-bit Python 3.10.0, 3.9.6, 3.8.6, 3.8.3, 3.8.1,
3.7.4-6, 3.6.5, 2.7.17 and macOS\' 2.7.16.  PyCocoa has *not been tested* on iOS nor
with 32-bit Python and *does not work* with PyPy_ nor with `Intel(R) Python`_.

Notes
=====

All PyCocoa source code has been statically checked_ with PyChecker_, PyFlakes_,
PyCodeStyle_ (formerly Pep8) and McCabe_ using 64-bit Python 2.7.18 and with
Flake8_ using 64-bit Python 3.12.0 on macOS 14.1.2 Sonoma.

Some alternatives to PyCocoa are (a) PyObjC_, the most comprehensive Python to
Objective-C bridge (no longer included in `macOS\' Python`_), (b) `Rubicon-ObjC`_
for Python 3.5+, taking advantage of Python\'s typing_ annotations, (c) PyGUI_
for macOS_ and (d) wxPython_.


*Last updated: Dec 28, 2023.*

.. image:: https://Img.Shields.io/pypi/pyversions/PyCocoa.svg?label=Python
  :target: https://PyPI.org/project/PyCocoa
.. image:: https://Img.Shields.io/pypi/v/PyCocoa.svg?label=PyPI
  :target: https://PyPI.org/project/PyCocoa
.. image:: https://Img.Shields.io/pypi/wheel/PyCocoa.svg
  :target: https://PyPI.org/project/PyCocoa/#files
.. image:: https://Img.Shields.io/pypi/l/PyCocoa.svg
  :target: https://PyPI.org/project/PyCocoa

.. _checked: https://GitHub.com/ActiveState/code/tree/master/recipes/Python/546532_PyChecker_postprocessor
.. _cocoa-python: https://GitHub.com/phillip-nguyen/cocoa-python
.. _cocoavlc.py: https://GitHub.com/oaubert/python-vlc/tree/master/examples
.. _ctypes: https://Docs.Python.org/2.7/library/ctypes.html
.. _documentation: https://mrJean1.GitHub.io/PyCocoa
.. _Epydoc: https://PyPI.org/project/epydoc
.. _Flake8: https://PyPI.org/project/flake8
.. _GitHub: https://GitHub.com/mrJean1/PyCocoa
.. _Intel(R) Python: https://Software.Intel.com/en-us/distribution-for-python
.. _macOS: https://WikiPedia.org/wiki/MacOS
.. _macOS' Python: https://WikiPedia.org/wiki/PyObjC#History
.. _McCabe: https://PyPI.org/project/mccabe
.. _MIT License: https://OpenSource.org/licenses/MIT
.. _New BSD License: https://OpenSource.org/licenses/BSD-3-Clause
.. _PyChecker: https://PyPI.org/project/pychecker
.. _pycocoa: https://PyPI.org/project/PyCocoa
.. _PyCodeStyle: https://PyPI.org/project/pycodestyle
.. _PyFlakes: https://PyPI.org/project/pyflakes
.. _PyGUI: https://CoSC.Canterbury.AC.NZ/greg.ewing/python_gui
.. _PyObjC: https://PyPI.org/project/pyobjc
.. _PyPI: https://PyPI.org/project/PyCocoa
.. _PyPy: https://PyPy.org
.. _Rubicon-ObjC: https://PyPI.org/project/rubicon-objc
.. _typing: https://Docs.Python.org/3/library/typing.html
.. _Python-VLC: https://PyPI.org/project/python-vlc
.. _VLC App: https://www.VideoLan.org/vlc/download-macosx.html
.. _wxPython: https://wxPython.org/pages/overview/index.html

Licenses
========

``Copyright (C) 2017-2024 -- mrJean1 at Gmail -- All Rights Reserved.``

``Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:``

``The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.``

``THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.``


``Copyright (C) 2011 -- Phillip Nguyen -- All Rights Reserved.``

``Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:``

``1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.``

``2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.``

``3. Neither the name of objective-ctypes nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.``

``THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.``
            

Raw data

            {
    "_id": null,
    "home_page": "https://GitHub.com/mrJean1/PyCocoa",
    "name": "PyCocoa",
    "maintainer": "Jean M. Brouwers",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "mrJean1@Gmail.com",
    "keywords": "Apple-Silicon Cocoa cocoa-python cocoavlc ctypes fault faults faulthandler macOS MacOSX Objective-C PyCocoa Python-VLC transparent VLC VLCplayer",
    "author": "Jean M. Brouwers",
    "author_email": "mrJean1@Gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/22/14/5960eea78f160c56ccf16bf90300cf21bfd56e2580d5415478a430256e9a/PyCocoa-23.12.28.zip",
    "platform": null,
    "description": "=======\nPyCocoa\n=======\n\nA basic, ctypes_-based Python binding to the macOS_ Objective-C Cocoa runtime and\nseveral other macOS_ libraries.\n\nThis is package `cocoa-python`_ by *Phillip Nguyen (C) 2011*, modified, extended,\ntested, documented and published with permission under both the `MIT License`_ and\nthe original `New BSD License`_.\n\nInstallation\n============\n\nTo install PyCocoa, type ``pip install PyCocoa`` or ``easy_install PyCocoa`` in a\nterminal window.  Alternatively, download ``PyCocoa-y.m.d.zip`` from PyPI_ or\nGitHub_, ``unzip`` the downloaded file, ``cd`` to directory ``PyCocoa-y.m.d`` and\ntype ``python setup.py install``.  To run all PyCocoa tests, type\n``python setup.py test`` or ``python test/run.py`` before or after installation.\n\nExamples `cocoavlc.py`_ and *simple_VLCplayer.py* require installation of the\n`VLC App`_ and the corresponding `Python-VLC`_ binding.\n\nDocumentation\n=============\n\nIn addition to the pycocoa_ package, the distribution files contain several tests,\nsome examples and the documentation_ (generated by Epydoc_ using command line\n``epydoc --html --no-private --no-source --name=PyCocoa --url=... -v pycocoa``).\n\nTests\n=====\n\nThe tests and examples have only been run with 64-bit Python 3.12.0, 3.11.5, 3.8.10\nand 2.7.18 using `Python-VLC`_ 3.0.18, 3.0.12, 3.0.11, 3.0.10, 3.0.8, 3.0.6, 3.0.4\nand 2.2.8 (with the compatible `VLC App`_ and 3.0.16) on macOS 14.1.2 Sonoma, 13.2\nVentura, 12.0.1 Monterey, 11.6.1 and 11.5.2 Big Sur (aka 10.16), 10.15.7 Catalina,\n10.14.6 Mojave or 10.13.6 High Sierra.  The tests run *with and without*\n``lazy import`` in Python 3.\n\nPython 3.12.0 and 3.11.5 run on Apple Silicon (``arm64`` *natively*), other Python\nversions run on Intel (``x86_64``) or Intel *emulation* (``arm64_x86_64``, see\nfunction ``pycocoa.machine``).\n\nPreviously, PyCocoa was tested with 64-bit Python 3.10.0, 3.9.6, 3.8.6, 3.8.3, 3.8.1,\n3.7.4-6, 3.6.5, 2.7.17 and macOS\\' 2.7.16.  PyCocoa has *not been tested* on iOS nor\nwith 32-bit Python and *does not work* with PyPy_ nor with `Intel(R) Python`_.\n\nNotes\n=====\n\nAll PyCocoa source code has been statically checked_ with PyChecker_, PyFlakes_,\nPyCodeStyle_ (formerly Pep8) and McCabe_ using 64-bit Python 2.7.18 and with\nFlake8_ using 64-bit Python 3.12.0 on macOS 14.1.2 Sonoma.\n\nSome alternatives to PyCocoa are (a) PyObjC_, the most comprehensive Python to\nObjective-C bridge (no longer included in `macOS\\' Python`_), (b) `Rubicon-ObjC`_\nfor Python 3.5+, taking advantage of Python\\'s typing_ annotations, (c) PyGUI_\nfor macOS_ and (d) wxPython_.\n\n\n*Last updated: Dec 28, 2023.*\n\n.. image:: https://Img.Shields.io/pypi/pyversions/PyCocoa.svg?label=Python\n  :target: https://PyPI.org/project/PyCocoa\n.. image:: https://Img.Shields.io/pypi/v/PyCocoa.svg?label=PyPI\n  :target: https://PyPI.org/project/PyCocoa\n.. image:: https://Img.Shields.io/pypi/wheel/PyCocoa.svg\n  :target: https://PyPI.org/project/PyCocoa/#files\n.. image:: https://Img.Shields.io/pypi/l/PyCocoa.svg\n  :target: https://PyPI.org/project/PyCocoa\n\n.. _checked: https://GitHub.com/ActiveState/code/tree/master/recipes/Python/546532_PyChecker_postprocessor\n.. _cocoa-python: https://GitHub.com/phillip-nguyen/cocoa-python\n.. _cocoavlc.py: https://GitHub.com/oaubert/python-vlc/tree/master/examples\n.. _ctypes: https://Docs.Python.org/2.7/library/ctypes.html\n.. _documentation: https://mrJean1.GitHub.io/PyCocoa\n.. _Epydoc: https://PyPI.org/project/epydoc\n.. _Flake8: https://PyPI.org/project/flake8\n.. _GitHub: https://GitHub.com/mrJean1/PyCocoa\n.. _Intel(R) Python: https://Software.Intel.com/en-us/distribution-for-python\n.. _macOS: https://WikiPedia.org/wiki/MacOS\n.. _macOS' Python: https://WikiPedia.org/wiki/PyObjC#History\n.. _McCabe: https://PyPI.org/project/mccabe\n.. _MIT License: https://OpenSource.org/licenses/MIT\n.. _New BSD License: https://OpenSource.org/licenses/BSD-3-Clause\n.. _PyChecker: https://PyPI.org/project/pychecker\n.. _pycocoa: https://PyPI.org/project/PyCocoa\n.. _PyCodeStyle: https://PyPI.org/project/pycodestyle\n.. _PyFlakes: https://PyPI.org/project/pyflakes\n.. _PyGUI: https://CoSC.Canterbury.AC.NZ/greg.ewing/python_gui\n.. _PyObjC: https://PyPI.org/project/pyobjc\n.. _PyPI: https://PyPI.org/project/PyCocoa\n.. _PyPy: https://PyPy.org\n.. _Rubicon-ObjC: https://PyPI.org/project/rubicon-objc\n.. _typing: https://Docs.Python.org/3/library/typing.html\n.. _Python-VLC: https://PyPI.org/project/python-vlc\n.. _VLC App: https://www.VideoLan.org/vlc/download-macosx.html\n.. _wxPython: https://wxPython.org/pages/overview/index.html\n\nLicenses\n========\n\n``Copyright (C) 2017-2024 -- mrJean1 at Gmail -- All Rights Reserved.``\n\n``Permission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nthe rights to use, copy, modify, merge, publish, distribute, sublicense,\nand/or sell copies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following conditions:``\n\n``The above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.``\n\n``THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.``\n\n\n``Copyright (C) 2011 -- Phillip Nguyen -- All Rights Reserved.``\n\n``Redistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:``\n\n``1. Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.``\n\n``2. Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.``\n\n``3. Neither the name of objective-ctypes nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.``\n\n``THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\nFOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\nCOPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\nINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\nBUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\nLIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\nANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.``",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Basic Python binding to macOS' Objective-C Cocoa",
    "version": "23.12.28",
    "project_urls": {
        "Homepage": "https://GitHub.com/mrJean1/PyCocoa"
    },
    "split_keywords": [
        "apple-silicon",
        "cocoa",
        "cocoa-python",
        "cocoavlc",
        "ctypes",
        "fault",
        "faults",
        "faulthandler",
        "macos",
        "macosx",
        "objective-c",
        "pycocoa",
        "python-vlc",
        "transparent",
        "vlc",
        "vlcplayer"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c1bfab0c6e29824f17d5b54dc95ee98d4dcf84777f4dd353d3e90925ae539152",
                "md5": "a7d0ceb84ff2f511fd251676e7779734",
                "sha256": "326dca8c0560ac9b57581153586ae5020190acf5ca1e08a26f7e93365e467078"
            },
            "downloads": -1,
            "filename": "PyCocoa-23.12.28-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a7d0ceb84ff2f511fd251676e7779734",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 206101,
            "upload_time": "2023-12-27T19:04:51",
            "upload_time_iso_8601": "2023-12-27T19:04:51.564772Z",
            "url": "https://files.pythonhosted.org/packages/c1/bf/ab0c6e29824f17d5b54dc95ee98d4dcf84777f4dd353d3e90925ae539152/PyCocoa-23.12.28-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22145960eea78f160c56ccf16bf90300cf21bfd56e2580d5415478a430256e9a",
                "md5": "23ed0c68fd88bc8e9a8f213df597e2a2",
                "sha256": "4804f9005159e5b3c5ba774eaa6d22746da95ce4faeccd5882cdb154fa5033b3"
            },
            "downloads": -1,
            "filename": "PyCocoa-23.12.28.zip",
            "has_sig": false,
            "md5_digest": "23ed0c68fd88bc8e9a8f213df597e2a2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 841433,
            "upload_time": "2023-12-27T19:04:48",
            "upload_time_iso_8601": "2023-12-27T19:04:48.779351Z",
            "url": "https://files.pythonhosted.org/packages/22/14/5960eea78f160c56ccf16bf90300cf21bfd56e2580d5415478a430256e9a/PyCocoa-23.12.28.zip",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-27 19:04:48",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pycocoa"
}
        
Elapsed time: 0.16947s