基本python绑定到macos的objective-c cocoa
PyCocoa的Python项目详细描述
一个基于ctypes的基本python绑定到macOSobjective-c cocoa 运行时和其他几个macOS库。
这是由phillip nguyen(c)2011修改的cocoa-python包, 扩展、测试、记录和发布 原来的MIT License和New BSD License。
除了pycocoa包之外,分发文件还包含几个 测试、一些示例和documentation(由Epydoc使用命令行生成 epydoc --html--no-private--no-source--name=PyCocoa--url=...-v pycocoa)。
示例cocoavlc.py和simple_vlcplayer.py需要安装 VLC App和相应的Python-VLC绑定。
这些测试和示例只在64位Python2.7.16和 3.7.3使用Python-VLC2.2.8、3.0.2、3.0.4和3.0.6(与 VLC App)并且仅在10.13.6 High Sierra或10.14.0 Mojave上。 pycocoa没有在ios或32位python和 不能与PyPy或Intel(R) Python一起工作。
所有pycocoa源代码都是用PyChecker静态地checked, PyFlakes、PyCodeStyle(以前是pep8)和McCabe使用64位python 2.7.16和使用64位python 3.7.3的Flake8。
要安装pycocoa,请键入pip install PyCocoa或easy_install PyCocoa 在终端窗口。或者,从PyCocoa-y.m.d.zip下载 PyPI或GitHub,unzip下载的文件,cd到目录 PyCocoa-并键入python setup.py install。运行所有pycocoa 测试,在安装之前键入python setup.py test。
pycocoa的一些替代品是(a)PyObjC,最全面的python 到objective-c桥(包含在macOS’ Python),(b)Rubicon-ObjC 对于python 3.5+,利用python新的typing注释和 (c)PyGUI对于macOS。
上次更新时间:2019年3月31日。
Copyright (C) 2017-2019-- mrJean1 at Gmail dot com
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.