pyobjc-dev Mailing List for PyObjC (Page 24)
Brought to you by:
ronaldoussoren
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
(30) |
May
(18) |
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2002 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
(13) |
Aug
|
Sep
(23) |
Oct
(180) |
Nov
(291) |
Dec
(95) |
2003 |
Jan
(338) |
Feb
(352) |
Mar
(97) |
Apr
(46) |
May
(226) |
Jun
(184) |
Jul
(145) |
Aug
(141) |
Sep
(69) |
Oct
(161) |
Nov
(96) |
Dec
(90) |
2004 |
Jan
(66) |
Feb
(87) |
Mar
(98) |
Apr
(132) |
May
(115) |
Jun
(68) |
Jul
(150) |
Aug
(92) |
Sep
(59) |
Oct
(52) |
Nov
(17) |
Dec
(75) |
2005 |
Jan
(84) |
Feb
(191) |
Mar
(133) |
Apr
(114) |
May
(158) |
Jun
(185) |
Jul
(62) |
Aug
(28) |
Sep
(36) |
Oct
(88) |
Nov
(65) |
Dec
(43) |
2006 |
Jan
(85) |
Feb
(62) |
Mar
(92) |
Apr
(75) |
May
(68) |
Jun
(101) |
Jul
(73) |
Aug
(37) |
Sep
(91) |
Oct
(65) |
Nov
(30) |
Dec
(39) |
2007 |
Jan
(24) |
Feb
(28) |
Mar
(10) |
Apr
(2) |
May
(18) |
Jun
(16) |
Jul
(21) |
Aug
(6) |
Sep
(30) |
Oct
(31) |
Nov
(153) |
Dec
(31) |
2008 |
Jan
(63) |
Feb
(70) |
Mar
(47) |
Apr
(24) |
May
(59) |
Jun
(22) |
Jul
(12) |
Aug
(7) |
Sep
(14) |
Oct
(26) |
Nov
(5) |
Dec
(5) |
2009 |
Jan
(10) |
Feb
(41) |
Mar
(70) |
Apr
(88) |
May
(49) |
Jun
(62) |
Jul
(34) |
Aug
(15) |
Sep
(55) |
Oct
(40) |
Nov
(67) |
Dec
(21) |
2010 |
Jan
(60) |
Feb
(17) |
Mar
(26) |
Apr
(26) |
May
(29) |
Jun
(4) |
Jul
(21) |
Aug
(21) |
Sep
(10) |
Oct
(12) |
Nov
(3) |
Dec
(19) |
2011 |
Jan
(3) |
Feb
(13) |
Mar
(8) |
Apr
(8) |
May
(17) |
Jun
(20) |
Jul
(21) |
Aug
(7) |
Sep
|
Oct
|
Nov
(9) |
Dec
(11) |
2012 |
Jan
(3) |
Feb
|
Mar
|
Apr
(5) |
May
(4) |
Jun
(14) |
Jul
(5) |
Aug
(2) |
Sep
(15) |
Oct
(2) |
Nov
(23) |
Dec
(1) |
2013 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
(5) |
Jun
(1) |
Jul
(5) |
Aug
(4) |
Sep
|
Oct
(12) |
Nov
(10) |
Dec
(3) |
2014 |
Jan
(7) |
Feb
(14) |
Mar
(2) |
Apr
|
May
(2) |
Jun
(11) |
Jul
(10) |
Aug
(4) |
Sep
|
Oct
(8) |
Nov
(1) |
Dec
(2) |
2015 |
Jan
(9) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(7) |
Jun
|
Jul
(5) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(4) |
Dec
|
2016 |
Jan
(1) |
Feb
(1) |
Mar
(4) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(6) |
Aug
(8) |
Sep
(21) |
Oct
(17) |
Nov
|
Dec
(36) |
2017 |
Jan
(6) |
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(6) |
2018 |
Jan
(2) |
Feb
(3) |
Mar
(3) |
Apr
(14) |
May
(2) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(6) |
Oct
(16) |
Nov
(1) |
Dec
(6) |
2019 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
(2) |
Dec
(1) |
2021 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(5) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2025 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark S. <sie...@st...> - 2010-12-09 15:43:28
|
>> error: Could not find required distribution pyobjc-core >> >> As far as I can tell, some part of it must be missing from pypi. Any ideas? > > That's odd, pyobjc-core is on pypi and should work just fine. > > Could you try "easy_install pyobjc-core==2.3" followed running "python setup.py install" for pyobjc itself again? I did this: setenv PYTHONPATH /Users/sienkiew/py/lib/python2.7/site-packages easy_install --prefix ~/py pyobjc-core==2.3 It installed something that involved compiling a lot of C code. During the install, there were a few things that look broken, though: libtool: link: ar cru .libs/libxml2.a SAX.o entities.o encoding.o error.o parserInternals.o parser.o tree.o hash.o list.o xmlIO.o xmlmemory o uri.o valid.o xlink.o HTMLparser.o HTMLtree.o debugXML.o xpath.o xpointer.o xinclude.o nanohttp.o nanoftp.o DOCBparser.o catalog.o globals o threads.o c14n.o xmlstring.o xmlregexp.o xmlschemas.o xmlschemastypes.o xmlunicode.o xmlreader.o relaxng.o dict.o SAX2.o xmlwriter.o legac .o chvalid.o pattern.o xmlsave.o xmlmodule.o schematron.o ranlib: file: .libs/libxml2.a(SAX.o) has no symbols ranlib: file: .libs/libxml2.a(xlink.o) has no symbols ranlib: file: .libs/libxml2.a(HTMLparser.o) has no symbols ranlib: file: .libs/libxml2.a(HTMLtree.o) has no symbols ... repeats for about 20 more files ... Later, it finds the same problem again: libtool: install: ranlib /private/var/folders/1w/1wzkS8Y4H44BBu-c3gTR7k++2Ws/-Tmp-/easy_install-7MaF7K/pyobjc-core-2.3/build/libxml/lib/libx l2.a ranlib: file: /private/var/folders/1w/1wzkS8Y4H44BBu-c3gTR7k++2Ws/-Tmp-/easy_install-7MaF7K/pyobjc-core-2.3/build/libxml/lib/libxml2.a(SAX.o has no symbols ranlib: file: /private/var/folders/1w/1wzkS8Y4H44BBu-c3gTR7k++2Ws/-Tmp-/easy_install-7MaF7K/pyobjc-core-2.3/build/libxml/lib/libxml2.a(xlink o) has no symbols ... And later: Modules/objc/test/properties.m:24: warning: Mac OS X version 10.5 or later is needed for use of property Modules/objc/test/properties.m:25: warning: Mac OS X version 10.5 or later is needed for use of property Modules/objc/test/properties.m:26: warning: Mac OS X version 10.5 or later is needed for use of property Modules/objc/test/properties.m:27: warning: Mac OS X version 10.5 or later is needed for use of property Modules/objc/test/properties.m:27: warning: no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed Modules/objc/test/properties.m:27: warning: 'assign' attribute (default) not appropriate for non-gc object property 'prop4' It is 10.5. system_profiler says "System Version: Mac OS X 10.5.8 (9L31a) )" And finally: Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/__init__.py (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/arrays.so (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/block.so (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/cfsocket.so (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/clinmeth.so (namespace package) ... another 90-100 lines of this, some for .so and some for .py files Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/testclassandinst.so (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/testoutputinitializer.so (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/voidpointer.so (namespace package) Adding pyobjc-core 2.3 to easy-install.pth file Installed /Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_core-2.3-py2.7-macosx-10.4-i386.egg Processing dependencies for pyobjc-core==2.3 Finished processing dependencies for pyobjc-core==2.3 The easy_install step did not produce a working pyobjc: >>> import pyobjc Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pyobjc >>> import sys >>> sys.path ['', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_core-2.3-py2.7-macosx-10.4-i386.egg', '/usr/stsci/pyssg/2.7/distribute-0.6.10-py2.7.egg', '/usr/stsci/pyssg/2.7/Jinja2-2.2.1-py2.7.egg', '/usr/stsci/pyssg/2.7/Pygments-1.1.1-py2.7.egg', '/usr/stsci/pyssg/2.7/Sphinx-1.0.5-py2.7.egg', '/usr/stsci/pyssg/2.7/numpydoc-0.4-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages', '/usr/stsci/pyssg/2.7', '/usr/stsci/pyssg/2.7/PIL', '/usr/stsci/pyssg/Python-2.7/lib/python27.zip', '/usr/stsci/pyssg/Python-2.7/lib/python2.7', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/plat-darwin', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/plat-mac', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/lib-tk', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/lib-old', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/lib-dynload', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/site-packages', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/site-pa ckages/setuptools-0.6c11-py2.7.egg-info'] >>> So I continued with the setup.py install step: python setup.py install --prefix ~/py It also skipped a lot of files: Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/__init__.py (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/test_caanimation.py (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/test_cabase.py (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/test_cacifilteradditions.py (namespace package) Skipping installation of build/bdist.macosx-10.4-i386/egg/PyObjCTest/test_caconstraintlayoutmanager.py (namespace package) ... That also did not produce a working system, but I have a lot more on pythonpath: >>> import pyobjc Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named pyobjc >>> import sys >>> sys.path ['', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_core-2.3-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_ScriptingBridge-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_QTKit-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_PubSub-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_InterfaceBuilderKit-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_InstantMessage-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_InputMethodKit-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_DictionaryServices-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_Collaboration-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framew ork_CalendarStore-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_XgridFoundation-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_WebKit-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_SystemConfiguration-2.3-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_SyncServices-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_SearchKit-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_ScreenSaver-2.3-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_Quartz-2.3-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_PreferencePanes-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_Message-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_La unchServices-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_LatentSemanticMapping-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_InstallerPlugins-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_FSEvents-2.3-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_ExceptionHandling-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_CoreText-2.3-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_CoreData-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_Cocoa-2.3-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_CFNetwork-2.3-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_Automator-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc _framework_AppleScriptKit-2.3-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages/pyobjc_framework_AddressBook-2.3-py2.7.egg', '/usr/stsci/pyssg/2.7/distribute-0.6.10-py2.7.egg', '/usr/stsci/pyssg/2.7/Jinja2-2.2.1-py2.7.egg', '/usr/stsci/pyssg/2.7/Pygments-1.1.1-py2.7.egg', '/usr/stsci/pyssg/2.7/Sphinx-1.0.5-py2.7.egg', '/usr/stsci/pyssg/2.7/numpydoc-0.4-py2.7.egg', '/Users/sienkiew/py/lib/python2.7/site-packages', '/usr/stsci/pyssg/2.7', '/usr/stsci/pyssg/2.7/PIL', '/usr/stsci/pyssg/Python-2.7/lib/python27.zip', '/usr/stsci/pyssg/Python-2.7/lib/python2.7', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/plat-darwin', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/plat-mac', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/lib-tk', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/lib-old', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/lib-dynload', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/site-packages', '/usr/stsci/p yssg/Python-2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info'] I also tried just "easy_install --prefix ~/py pyobjc==2.2"; it also did not result in a system where I could "import pyobjc". In that instance, sys.path was: ['', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_XgridFoundation-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_WebKit-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_SystemConfiguration-2.2-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_SyncServices-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_SearchKit-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_ScreenSaver-2.2-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_Quartz-2.2-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_PreferencePanes-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_Message-2.2-py2.7.egg', '/Users/sienkie w/py2/lib/python2.7/site-packages/pyobjc_framework_LaunchServices-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_LatentSemanticMapping-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_InstallerPlugins-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_FSEvents-2.2-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_ExceptionHandling-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_CoreText-2.2-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_CoreData-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_Cocoa-2.2-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_CFNetwork-2.2-py2.7-macosx-10.4-i386.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_Automator-2.2-py2. 7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_AppleScriptKit-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_framework_AddressBook-2.2-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages/pyobjc_core-2.2-py2.7-macosx-10.4-i386.egg', '/usr/stsci/pyssg/2.7/distribute-0.6.10-py2.7.egg', '/usr/stsci/pyssg/2.7/Jinja2-2.2.1-py2.7.egg', '/usr/stsci/pyssg/2.7/Pygments-1.1.1-py2.7.egg', '/usr/stsci/pyssg/2.7/Sphinx-1.0.5-py2.7.egg', '/usr/stsci/pyssg/2.7/numpydoc-0.4-py2.7.egg', '/Users/sienkiew/py2/lib/python2.7/site-packages', '/usr/stsci/pyssg/2.7', '/usr/stsci/pyssg/2.7/PIL', '/usr/stsci/pyssg/Python-2.7/lib/python27.zip', '/usr/stsci/pyssg/Python-2.7/lib/python2.7', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/plat-darwin', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/plat-mac', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/lib-tk', '/usr/stsci/pyssg/Pytho n-2.7/lib/python2.7/lib-old', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/lib-dynload', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/site-packages', '/usr/stsci/pyssg/Python-2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info'] At this point, I'm thinking there must be something odd about my system that two different versions do not work at all, even when installed with easy_install. Unfortunately, I don't really know enough about easy_install to know what questions to ask next. Do you have any suggestions? Mark S. |
From: Ronald O. <ron...@ma...> - 2010-12-09 09:58:15
|
On 8 Dec, 2010, at 18:44, Mark Sienkiewicz wrote: > Hi, > > I downloaded pyobjc 2.3 fro http://pypi.python.org/pypi/pyobjc > > When I do "setup.py install", it apparently downloads a bunch of other stuff, ending with: > > ... > Downloading http://pypi.python.org/packages/source/p/pyobjc-framework-SystemConfiguration/pyobjc-framework-SystemConfiguration-2.3.tar.gz#md5=4c38458240a9f5ead59a041ee496e89b > Processing pyobjc-framework-SystemConfiguration-2.3.tar.gz > Running pyobjc-framework-SystemConfiguration-2.3/setup.py -q bdist_egg --dist-dir /var/folders/1w/1wzkS8Y4H44BBu-c3gTR7k++2Ws/-Tmp-/easy_install-iwKHFq/pyobjc-framework-SystemConfiguration-2.3/egg-dist-tmp-l5sSob > error: Could not find required distribution pyobjc-core > > As far as I can tell, some part of it must be missing from pypi. Any ideas? That's odd, pyobjc-core is on pypi and should work just fine. Could you try "easy_install pyobjc-core==2.3" followed running "python setup.py install" for pyobjc itself again? Ronald > > Mark S. > > > ------------------------------------------------------------------------------ > This SF Dev2Dev email is sponsored by: > > WikiLeaks The End of the Free Internet > http://p.sf.net/sfu/therealnews-com > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Mark S. <sie...@st...> - 2010-12-08 17:44:39
|
Hi, I downloaded pyobjc 2.3 fro http://pypi.python.org/pypi/pyobjc When I do "setup.py install", it apparently downloads a bunch of other stuff, ending with: ... Downloading http://pypi.python.org/packages/source/p/pyobjc-framework-SystemConfiguration/pyobjc-framework-SystemConfiguration-2.3.tar.gz#md5=4c38458240a9f5ead59a041ee496e89b Processing pyobjc-framework-SystemConfiguration-2.3.tar.gz Running pyobjc-framework-SystemConfiguration-2.3/setup.py -q bdist_egg --dist-dir /var/folders/1w/1wzkS8Y4H44BBu-c3gTR7k++2Ws/-Tmp-/easy_install-iwKHFq/pyobjc-framework-SystemConfiguration-2.3/egg-dist-tmp-l5sSob error: Could not find required distribution pyobjc-core As far as I can tell, some part of it must be missing from pypi. Any ideas? Mark S. |
From: Ben A. <be...@ar...> - 2010-12-08 03:24:15
|
A working example is attached. Props to <http://cocoawithlove.com/2009/01/demystifying-nsapplication-by.html>. |
From: Ben T. <bt...@gm...> - 2010-12-08 01:48:13
|
I am getting an error when passing NSAnyEventMask, pyobjc complains that it is the wrong magnitude. Instead passing 0xffffff, apparently works. I am using PyObjc 2.3 on OSC 10.6.8. Thanks. |
From: Ben T. <bt...@gm...> - 2010-12-07 20:25:49
|
First of all, I am a Mac OS newbie. I am trying to build PyObjC 2.0 for Python 2.6. I am doing this because I have wxPython for 2.6, but not 2.7 (the python shipped with the OS). I started by installing python 2.6 from python.org. I also installed Xcode 3.5 from Apple. I had to update my system from 10.6.2 to 10.6.8 in order to install Xcode. I then checked out the pyobj branch: svn co http://svn.red-bean.com/pyobjc/branches/pyobjc-20x-branch/ PyObjC To build, I did: cd PyObjC/pyobjc-core python2.6 setup.py install The first attempt failed with: /usr/bin/gcc-4.2 -dynamiclib ${wl}-undefined ${wl}dynamic_lookup -o .libs/libffi.5.0.9.dylib src/.libs/debug.o src/.libs/prep_cif.o src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o src/.libs/closures.o src/powerpc/.libs/ffi_darwin.o src/powerpc/.libs/darwin.o src/powerpc/.libs/darwin_closure.o -L/opt/local/lib -arch ppc -arch ppc -install_name /opt/local/lib/libffi.5.dylib -compatibility_version 6 -current_version 6.9 ld: in src/powerpc/.libs/darwin.o, unsupported encoding in FDE So I applied the patch from here: https://trac.macports.org/attachment/ticket/21401/libffi.patch I was then able to build and import pyobjc: python2.6 > import pyobjc > However, I also want Cocoa, so I did the following to build it: cd PyObjC/pyobjc-framework-Cocoa python2.6 setup.py install However, when that completed, I cannot import PyObjCTools.AppHelper: python2.6 > from PyObjCTools import AppHelper ... ValueError: Unknown typestr The error is the same as noted below. http://comments.gmane.org/gmane.comp.python.pyobjc.devel/5738 However, I am not able to find any solution to this. Any help is appreciated. |
From: Ben A. <be...@ar...> - 2010-12-07 15:55:40
|
> while running: > AppHelper.runEventsOnce() > wx.RunEvents() > > I have the wx side figured out, but I can't find any information on > how to do something similar with pyobjc-cocoa. The general idea is [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:cocoaTimeSlice]] for some small value of cocoaTimeSlice that you will need to decide on your own. -- <http://artins.org/ben>, <http://twitter.com/airbornemint> "Calling computing 'computer science' is like calling surgery 'knife science'." — Edsger Dijkstra |
From: Ben T. <bt...@gm...> - 2010-12-07 15:29:06
|
I am sorry if this is not the correct forum for questions of this nature, but I could not find anywhere else to pose this question. I am trying to integrate the cocoa event loop with the wx event loop. I basically need to be able to do this: while running: AppHelper.runEventsOnce() wx.RunEvents() I have the wx side figured out, but I can't find any information on how to do something similar with pyobjc-cocoa. To re-iterate, I don't want to enter into a loop, I simply want cocoa to process any pending events and then return. I will iteratively call said function until the program ends. |
From: Ronald O. <ron...@ma...> - 2010-11-26 17:44:00
|
On 25 Nov, 2010, at 7:39, Jair Gaxiola wrote: > Hi, > > He worked several months wiht pyobjc, now I need help for create a > app with multiviews in only window with interface builder. I searched > in internet examples and I found few but are old. > > Someone have examples most current? There are examples on http://pyobjc.sf.net/ (direct link: <http://pyobjc.sourceforge.net/examples/index.html>). I don't quite understand what you are trying to do, and can therefore not point you to a specific example. Ronald > > Greetings > > -- > SIN ETIQUETAS.[ PUNTO ] > http://flavors.me/jyr > http://pythoncocoa.com > http://opentumblr.com > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! > Tap into the largest installed PC base & get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Jair G. <jyr...@gm...> - 2010-11-25 06:39:49
|
Hi, He worked several months wiht pyobjc, now I need help for create a app with multiviews in only window with interface builder. I searched in internet examples and I found few but are old. Someone have examples most current? Greetings -- SIN ETIQUETAS.[ PUNTO ] http://flavors.me/jyr http://pythoncocoa.com http://opentumblr.com |
From: Greg E. <gre...@ca...> - 2010-11-19 08:49:12
|
PyGUI 2.3.1 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ This version incorporates a modification that I hope will improve the behaviour of ScrollableViews on Windows with pywin32 builds later than 212. (There are still problems with it, though. If the Scrollable View doesn't fill all of its containing window, the scroll bars get repositioned incorrectly when the window is resized. This appears to be entirely MFC's doing. I really will have to get away from using CView altogether.) This version also fixes a problem on Windows whereby dismissing a modal dialog with the Return key could spuriously activate a button in another window. What is PyGUI? -------------- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. -- Gregory Ewing gre...@ca... http://www.cosc.canterbury.ac.nz/greg.ewing/ |
From: Badoo <no...@ba...> - 2010-10-28 05:54:40
|
¡Tienes un nuevo mensaje en Badoo! Luis Cota te dejó un mensaje. Haz click en este enlace para verlo: http://us1.badoo.com/lcota/in/KpJAQwxuHfo/?lang_id=7 Más gente que también te está esperando: EDUARDO (New York, Estados Unidos) Gaby (New York, Estados Unidos) Wilber (New York, Estados Unidos) http://us1.badoo.com/lcota/in/KpJAQwxuHfo/?lang_id=7 Si al hacer click sobre el enlace, no funciona, copia y pega la dirección en tu barra del navegador. Este email es parte del procedimiento para que leas los mensajes de Luis Cota. Si has recibido este email por equivocación, por favor, ignóralo. Tras un corto periodo de tiempo el mensaje sera eliminado del sistema. ¡Diviértete! El Equipo de Badoo Has recibido este email porque un usuario de Badoo te ha dejado un mensaje en Badoo. Este mensaje es automático. Las respuestas a este mensaje no estan controladas y no serán contestadas. Si no quieres recibir más mensajes de Badoo, háznoslo saber: http://us1.badoo.com/impersonation.phtml?lang_id=7&mail_code=63&email=pyobjc-dev%40lists.sourceforge.net&secret=&invite_id=435238&user_id=1093354112 |
From: Colin M. <col...@ta...> - 2010-10-26 17:32:22
|
Hello! Could some kind person point me at instructions for installing PyObjC (any version, including SVN bleeding-edge) for use with Python 3.1 please? I successfully installed PyObjC 2.3 for Python 2.6 but when I tried to repeat it for 3.1 it failed: 1. Downloaded pyobjc_core-2.3-py3.1-macosx-10.6-fat.egg from the Python Package Index and installed it with easy_install-3.1 ... OK 2. Tried to install the frameworks with easy_install-3.1 pyobjc==2.3 ... installed several frameworks OK but died on SystemConfiguration with the longest traceback I've ever seen, culminating in "Exception: Oh no! I don't understand pattern WildcardPattern(None, (( ..." from a lib2to3 module. The full traceback is appended. Thanks for any pointers you can give. -- Colin ----------------------------------------------------------------------------------- Searching for pyobjc-framework-SystemConfiguration==2.3 Reading http://pypi.python.org/simple/pyobjc-framework-SystemConfiguration/ Best match: pyobjc-framework-SystemConfiguration 2.3 Downloading http://pypi.python.org/packages/source/p/pyobjc-framework-SystemConfiguration/pyobjc-framework-SystemConfiguration-2.3.tar.gz#md5=4c38458240a9f5ead59a041ee496e89b Processing pyobjc-framework-SystemConfiguration-2.3.tar.gz Running pyobjc-framework-SystemConfiguration-2.3/setup.py -q bdist_egg --dist-dir /var/folders/-L/-LE6tUAPFWOeVy4nGDUywE+++TI/-Tmp-/easy_install-F8iQAW/pyobjc-framework-SystemConfiguration-2.3/egg-dist-tmp-qoAycq Traceback (most recent call last): File "/Users/colin/bin/easy_install-3.1", line 9, in <module> load_entry_point('distribute==0.6.14', 'console_scripts', 'easy_install-3.1')() File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 1855, in main with_ei_usage(lambda: File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 1836, in with_ei_usage return f() File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 1859, in <lambda> distclass=DistributionWithoutHelpCommands, **kw File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/core.py", line 149, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py", line 919, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py", line 938, in run_command cmd_obj.run() File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 342, in run self.easy_install(spec, not self.no_deps) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 582, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 614, in install_item self.process_distribution(spec, dist, deps) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 666, in process_distribution [requirement], self.local_index, self.easy_install File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/pkg_resources.py", line 544, in resolve dist = best[req.key] = env.best_match(req, self, installer) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/pkg_resources.py", line 786, in best_match return self.obtain(req, installer) # try and download/install File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/pkg_resources.py", line 798, in obtain return installer(requirement) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 582, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 612, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 802, in install_eggs return self.build_and_install(setup_script, setup_base) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 1079, in build_and_install self.run_setup(setup_script, setup_base, args) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/easy_install.py", line 1068, in run_setup run_setup(setup_script, args) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/sandbox.py", line 30, in run_setup lambda: exec(compile(open( File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/sandbox.py", line 71, in run return func() File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/sandbox.py", line 33, in <lambda> {'__file__':setup_script, '__name__':'__main__'}) File "setup.py", line 22, in <module> File "/var/folders/-L/-LE6tUAPFWOeVy4nGDUywE+++TI/-Tmp-/easy_install-F8iQAW/pyobjc-framework-SystemConfiguration-2.3/pyobjc_setup.py", line 271, in setup File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/core.py", line 149, in setup dist.run_commands() File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py", line 919, in run_commands self.run_command(cmd) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py", line 938, in run_command cmd_obj.run() File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/bdist_egg.py", line 179, in run cmd = self.call_command('install_lib', warn_dir=0) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/bdist_egg.py", line 166, in call_command self.run_command(cmdname) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/cmd.py", line 315, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py", line 938, in run_command cmd_obj.run() File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/install_lib.py", line 20, in run self.build() File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/command/install_lib.py", line 106, in build self.run_command('build_py') File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/cmd.py", line 315, in run_command self.distribution.run_command(command) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/distutils/dist.py", line 938, in run_command cmd_obj.run() File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/build_py.py", line 81, in run self.run_2to3(self.__updated_files, True) File "/Users/colin/Library/Python/3.1/site-packages/distribute-0.6.14-py3.1.egg/setuptools/command/build_py.py", line 40, in run_2to3 r = DistutilsRefactoringTool(self.fixer_names) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/lib2to3/refactor.py", line 202, in __init__ self.pre_order_heads = _get_headnode_dict(self.pre_order) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/lib2to3/refactor.py", line 81, in _get_headnode_dict heads = _get_head_types(fixer.pattern) File "/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/lib2to3/refactor.py", line 70, in _get_head_types raise Exception("Oh no! I don't understand pattern %s" %(pat)) Exception: Oh no! I don't understand pattern WildcardPattern(None, ((NodePattern('power', [WildcardPattern(None, ((WildcardPattern(None, ((NodePattern(),),), 'base'), NodePattern('trailer', [WildcardPattern(None, ((LeafPattern(23, '.'), LeafPattern(1, 'next', 'attr')),))]), NodePattern('trailer', [WildcardPattern(None, ((LeafPattern(7, '('), LeafPattern(8, ')')),))])),))]),), (NodePattern('power', [WildcardPattern(None, ((WildcardPattern(None, ((NodePattern(),),), 'head'), NodePattern('trailer', [WildcardPattern(None, ((LeafPattern(23, '.'), LeafPattern(1, 'next', 'attr')),))]), NegatedPattern(None, NodePattern('trailer', [WildcardPattern(None, ((LeafPattern(7, '('), LeafPattern(8, ')')),))]))),))]),), (NodePattern('classdef', [WildcardPattern(None, ((LeafPattern(1, 'class'), WildcardPattern(None, ((NodePattern(),),)), LeafPattern(11, ':'), NodePattern('suite', [WildcardPattern(None, ((WildcardPattern(None, ((NodePattern(),),)), NodePattern('funcdef', [WildcardPattern(None, ((LeafPattern(1, 'def'), LeafPattern(1, 'next', 'name'), NodePattern('parameters', [WildcardPattern(None, ((LeafPattern(7, '('), LeafPattern(1), LeafPattern(8, ')')),))]), WildcardPattern(None, ((NodePattern(),),))),))]), WildcardPattern(None, ((NodePattern(),),))),))])),))]),), (NodePattern('global_stmt', [WildcardPattern(None, ((LeafPattern(1, 'global'), WildcardPattern(None, ((NodePattern(),),)), LeafPattern(1, 'next'), WildcardPattern(None, ((NodePattern(),),))),))], 'global'),))) $ |
From: SourceForge.net <no...@so...> - 2010-10-19 18:16:21
|
Bugs item #3090731, was opened at 2010-10-19 13:16 Message generated for change (Tracker Item Submitted) made by krunk You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3090731&group_id=14534 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: James Kyle (krunk) Assigned to: Nobody/Anonymous (nobody) Summary: CATextLayer font setter fails with NSFont as argument Initial Comment: CATextLayer's font property should be able to accept an NSFont, but fails with ValueError: depythonifying 'unsigned long', got 'NSFont' >>> from Quartz.QuartzCore import CATextLayer >>> from AppKit import NSFont >>> ca = CATextLayer.layer() >>> font = NSFont.fontWithName_size_(u"Monaco", 12.0) >>> ca.setFont_(font) ValueError: depythonifying 'unsigned long', got 'NSFont' ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3090731&group_id=14534 |
From: Diez B. R. <de...@we...> - 2010-10-17 10:00:49
|
On Oct 17, 2010, at 10:56 AM, Michael Thon wrote: > Hello - I am trying PyObjC for the first time and I discovered something that I don't understand. If I initialize an NSAttributedString like this: > > content = NSAttributedString.alloc().initWithPath_documentAttributes_(a_path, None) > > Then content contains a tuple, not an NSAttributedString. If I initialize is like this: > > content = NSAttributedString.alloc() > a_tuple = content.initWithPath_documentAttributes_(a_path, None) > > Then content contains an attributed string from the contents of the file, and a_tuple contains a tuple. On the other hand NSAttributedString.alloc().init() > returns an instance of NSAttributedString, as expected. So, apparently initWithPath_documentAttributes_() returns a tuple instead of an instance of NSAttributedString. My question is, is this by design (and thus, there is something about PyObjC that I don't understand) or is it a bug? It's by design. Pay close attention to the argument list: the parameter you pass as None is a pointer to a pointer. Which means it is an out-parameter. Python lacks the semantics for this, so instead, signatures of that kind are implemented by returning the value as tuple. Diez |
From: Michael T. <mik...@gm...> - 2010-10-17 09:51:17
|
Hello - I am trying PyObjC for the first time and I discovered something that I don't understand. If I initialize an NSAttributedString like this: content = NSAttributedString.alloc().initWithPath_documentAttributes_(a_path, None) Then content contains a tuple, not an NSAttributedString. If I initialize is like this: content = NSAttributedString.alloc() a_tuple = content.initWithPath_documentAttributes_(a_path, None) Then content contains an attributed string from the contents of the file, and a_tuple contains a tuple. On the other hand NSAttributedString.alloc().init() returns an instance of NSAttributedString, as expected. So, apparently initWithPath_documentAttributes_() returns a tuple instead of an instance of NSAttributedString. My question is, is this by design (and thus, there is something about PyObjC that I don't understand) or is it a bug? Thanks Mike |
From: Gregory E. <gre...@ca...> - 2010-10-17 08:31:15
|
PyGUI 2.3 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ This version works on Snow Leopard with PyObjC 2.3. What is PyGUI? -------------- PyGUI is a cross-platform GUI toolkit designed to be lightweight and have a highly Pythonic API. -- Gregory Ewing gre...@ca... http://www.cosc.canterbury.ac.nz/greg.ewing/ This email may be confidential and subject to legal privilege, it may not reflect the views of the University of Canterbury, and it is not guaranteed to be virus free. If you are not an intended recipient, please notify the sender immediately and erase all copies of the message and any attachments. Please refer to http://www.canterbury.ac.nz/emaildisclaimer for more information. |
From: Greg E. <gre...@ca...> - 2010-10-16 08:24:39
|
PyGUI with the latest PyObjC on Snow Leopard is giving me messages like this (although it seems to work all right anyway): Sat Oct 16 21:07:54 gregs-mac-pro.lan Python[353] <Error>: kCGErrorInvalidConnection: CGSGetCurrentCursorLocation: Invalid connection Anyone have any idea what might be causing it? -- Greg |
From: Greg E. <gre...@ca...> - 2010-10-15 09:20:48
|
I've just tried to run PyGUI on 10.6 using the latest version of PyObjC, and it's broken in a major way. I have some Python subclasses of ObjC classes, and they include some methods that are only called from Python. I've been using Python naming conventions for these methods, which used to work fine, but now PyObjC seems to be treating them as ObjC method names, and complaining that the number of underscores in them doesn't match the number of arguments they take. Is this right? Are we now required to use PyObjC method naming conventions for *all* methods in an ObjC subclass, even if they will never be called from ObjC? If so, is there some way of marking methods as Python-only so that they are exempt from this requirement? -- Greg |
From: Ronald O. <ron...@ma...> - 2010-10-15 09:02:57
|
The script below creates a CSV file with all records in de AddressBook using the AddresBook framework. (This is the exportBooks.py script from the examples directory in the pyobjc-framework-AddressBook archive). The Python API to AddressBook is the same as the Objective-C one, in general Objective-C based examples should help to get you going with accessing the same APIs using PyObjC. Ronald # === #!/usr/bin/env python2.3 """ This script gives a short example on how to use the addressbook framework, it creates an CSV file containing information about all entries in the addressbook. Usage: python exportBook.py output.csv """ import csv import sys import AddressBook # The names of fields in the export, and the corresponding property. FIELD_NAMES=( ('Last Name', AddressBook.kABLastNameProperty), ('First Name', AddressBook.kABFirstNameProperty), ('E-mail', AddressBook.kABEmailProperty), ) def encodeField(value): """ Encode a value into an UTF-8 string """ if value is None: return '' if isinstance(value, AddressBook.ABMultiValue): # A multi-valued property, merge them into a single string result = [] for i in range(len(value)): result.append(value.valueAtIndex_(i).encode('utf-8')) return ', '.join(result) return value.encode('utf-8') def personToFields(person, fieldnames): """ Extract the specified fields from a person object """ return [ encodeField(person.valueForProperty_(nm)) for nm in fieldnames ] def bookFields(book, fieldnames): """ Generate the records for all people in the book """ for person in book.people(): yield personToFields(person, fieldnames) def main(argv = None): """ main entry point """ if argv is None: argv = sys.argv[1:] if len(argv) != 1: print "Usage: python exportBook.py output.csv" sys.exit(1) book = AddressBook.ABAddressBook.sharedAddressBook() fp = open(argv[0], 'wb') csvStream = csv.writer(fp) csvStream.writerow([ f[0] for f in FIELD_NAMES]) for row in bookFields(book, [ f[1] for f in FIELD_NAMES]): csvStream.writerow(row) fp.close() if __name__ == "__main__": main() #==== On 14 Oct, 2010,at 11:28 PM, Ned Deily <na...@ac...> wrote: In article <C8DCC28D.2B7B7%ja...@ja...>, Jeremy Reichman <ja...@ja...> wrote: > Does anyone have any examples of how to obtain data from cards via the > Address Book API with PyObjC? I'm not finding much (at least at my skill > level) via searching. > > My goal is to output a few of the fields from "my card." I'm interested in > this from the scripting perspective, not doing so in a full-fledged app. I'd > like to do it with Python, partly as a learning exercise. The little bit > I've done with PyObjC has been trying to update a script I wrote that used > the old Core Graphics bindings. > > If I were doing this via a shell script, I could get information with an > osascript line like this: > > $ osascript -e 'tell application "Address Book" to get the {first name, last > name, organization} of my card' > Leonardo, Flathead, GUE Tech You might consider using py-appscript instead: >>> from appscript import * >>> my_card = app("Address Book").my_card.properties() >>> [my_card.get(f) for f in (k.first_name, k.last_name, k.organization)] [u'Ned', u'Deily', k.missing_value] http://appscript.sourceforge.net/ -- Ned Deily, na...@ac... ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Pyobjc-dev mailing list Pyo...@li... https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Ned D. <na...@ac...> - 2010-10-14 21:28:48
|
In article <C8DCC28D.2B7B7%ja...@ja...>, Jeremy Reichman <ja...@ja...> wrote: > Does anyone have any examples of how to obtain data from cards via the > Address Book API with PyObjC? I'm not finding much (at least at my skill > level) via searching. > > My goal is to output a few of the fields from "my card." I'm interested in > this from the scripting perspective, not doing so in a full-fledged app. I'd > like to do it with Python, partly as a learning exercise. The little bit > I've done with PyObjC has been trying to update a script I wrote that used > the old Core Graphics bindings. > > If I were doing this via a shell script, I could get information with an > osascript line like this: > > $ osascript -e 'tell application "Address Book" to get the {first name, last > name, organization} of my card' > Leonardo, Flathead, GUE Tech You might consider using py-appscript instead: >>> from appscript import * >>> my_card = app("Address Book").my_card.properties() >>> [my_card.get(f) for f in (k.first_name, k.last_name, k.organization)] [u'Ned', u'Deily', k.missing_value] http://appscript.sourceforge.net/ -- Ned Deily, na...@ac... |
From: Jeremy R. <ja...@ja...> - 2010-10-14 18:20:02
|
Does anyone have any examples of how to obtain data from cards via the Address Book API with PyObjC? I'm not finding much (at least at my skill level) via searching. My goal is to output a few of the fields from "my card." I'm interested in this from the scripting perspective, not doing so in a full-fledged app. I'd like to do it with Python, partly as a learning exercise. The little bit I've done with PyObjC has been trying to update a script I wrote that used the old Core Graphics bindings. If I were doing this via a shell script, I could get information with an osascript line like this: $ osascript -e 'tell application "Address Book" to get the {first name, last name, organization} of my card' Leonardo, Flathead, GUE Tech Thanks for any pointers you might be able to provide! -- Jeremy |
From: SourceForge.net <no...@so...> - 2010-10-12 02:21:49
|
Bugs item #3085651, was opened at 2010-10-11 21:21 Message generated for change (Tracker Item Submitted) made by kthomases You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3085651&group_id=14534 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ken Thomases (kthomases) Assigned to: Nobody/Anonymous (nobody) Summary: Unsafe NSLog in PyObjCTools.Debugging.nsLogPythonException Initial Comment: In PyObjCTools.Debugging.nsLogPythonException, the exception is formatted into a string, which is then passed as the first/only argument to NSLog. The problem is that NSLog treats its first argument as a format string. The formatted exception may contain percent ('%') characters, which will be interpreted as format specifiers. Since there are no arguments for those specifiers, an exception is thrown (during logging of an exception). It results in something like this: *** Exception occurred during exception handler *** Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjCTools/Debugging.py", line 83, in exceptionHandler_shouldLogException_mask_ File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjCTools/Debugging.py", line 47, in nsLogPythonException ValueError: Too few arguments for format string [cur:1/len:1] 2010-10-11 20:47:03.946 CrossOver[497:903] NSExceptionHandler has recorded the following exception: OC_PythonException -- <type 'exceptions.KeyError'>: u'Key needs_download does not exist' Stack trace: 0x96155d24 0x97082509 0x98c2a9f1 0x150b2cb8 0x1508c5fe 0x331d4 0x33500 0x32f73 0x97f8cf1e 0x9806c699 0x98068146 0x9806743d 0x980bca61 0x98065e93 0x98063e9c 0x97f7caff 0x255f06 0x97f105bb 0x97f085ed 0x25e676 0x83b10 0x2c92 0x1 When I add a proper format string (u'%@') to the NSLog call, the same path through my code produces a properly-logged exception: 2010-10-11 20:54:26.587 CrossOver[760:903] *** Python exception discarded! Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC/PyObjCTools/KeyValueCoding.py", line 213, in getKey raise KeyError, "Key %s does not exist" % (key,) KeyError: u'Key needs_download does not exist' You can see the '%s' in the traceback which is the "bomb" for the unsafe NSLog call. It's probably a good idea to review all uses of NSLog for similar unsafe calling. The first argument should always be a constant, not a run-time-computed string. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3085651&group_id=14534 |
From: SourceForge.net <no...@so...> - 2010-09-28 06:39:28
|
Bugs item #3077003, was opened at 2010-09-28 01:39 Message generated for change (Tracker Item Submitted) made by kthomases You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3077003&group_id=14534 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Ken Thomases (kthomases) Assigned to: Nobody/Anonymous (nobody) Summary: Misuse of strcmp() in -[OC_PythonString __realObject__] Initial Comment: Relatively recently, -[OC_PythonString __realObject__] was improved to try to use an encoding which matches the Python default encoding. Unfortunately, it was done incorrectly. It uses strcmp() as though it were a strequals() function, but the return value of strcmp() has the opposite logical sense. It's 0 when the strings are equal and non-zero when they differ. The result was that it uses UTF-8 when the Python encoding is "ascii" and ASCII otherwise. (That's actually not a terrible result, since on Mac OS X UTF-8 is almost always the correct encoding to use, even though it's not Python's default encoding.) Anyway, I'm attaching a patch to correct the logic. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3077003&group_id=14534 |
From: Ben A. <be...@ar...> - 2010-09-09 18:03:57
|
Relatedly, has anyone here looked at the possibility of compiling a variant of Python (without eval and exec, similar to RPython) to native iOS code? -- <http://artins.org/ben> "Greatest weakness? It's possible that I am a little too awesome." — Barack Obama |