pyobjc-dev Mailing List for PyObjC (Page 32)
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: Jep H. <je...@gm...> - 2010-01-16 20:28:36
|
Hello everyone, I'm looking for a way to write custom metadata key/value pairs to a quicktime(object) via QTKit and python. Doing a 'help(QTKit.QTmovie)' I found several methods that appear to be promising: addUserData_ofType_() #<--- what are valid 'Types'? setUserData_ofType_() setUserData_ofType_atIndex_() setAnnotation_ofType_() setAnnotations_() setMovieAttributes_() Can anyone shed light on the proper way to use these methods? Very much appreciated, Jep |
From: Jep H. <je...@gm...> - 2010-01-16 19:33:07
|
Not sure why I was thanking 'Roland' — because Ronald has been the one with the help! Apologies for the mild dyslexia — and thanks again for the help. Jep On Jan 16, 2010, at 12:14 PM, Jep Hill wrote: > (hat tip to Roland) |
From: Jep H. <je...@gm...> - 2010-01-16 17:15:11
|
After testing a few variations, indeed it appears (hat tip to Roland) that I was missing the 'NSDictionary.dictionaryWithDictionary_()' and importing Quartz to access it. Cheers, Jep On Jan 13, 2010, at 5:16 PM, Jep Hill wrote: > Hi Ronald, > > Thank you for responing. > > So that doesn't error out on you? If you 'print movie' does it return > an object? > > It appears that you nested your attributes -- rather than predifining > them in a python dictionary and then passing them to the > 'QTMovie.movieWithAttributes_error_' method -- could this be the > critical difference? > > I'll try this as soon as I get home and report my findings. > > Thanks again, > > -Jep > sent via mobile > > On Jan 13, 2010, at 3:09 PM, Ronald Oussoren <ron...@ma...> > wrote: > >> >> On 13 Jan, 2010, at 3:21, Jep Hill wrote: >> >>> I'm able to initialize quicktime movie objects with several methods >>> however I'm not able to successfully implement >>> QTKit.QTMovie.movieWithAtrributes_error_ >> >> Implement or use? >> >> This seems to work from the command-line (but I haven't interacted >> with the movie): >> >> from Quartz import * >> from QTKit import * >> >> path='/path/to/a/movie.mov' >> movie, error = QTMovie.movieWithAttributes_error_( >> NSDictionary.dictionaryWithDictionary_({ >> 'QTMovieURLAttribute': NSURL.fileURLWithPath_(path), >> 'QTMovieOpenForPlaybackAttribute': True, >> 'QTMovieOpenAsyncRequiredAttribute': True, >> }), None) >> >> >> The link below is an Apple example that uses this API, although in >> ObjC. Translating it into Python should be fairly straightforward. >> >> <http://developer.apple.com/mac/library/samplecode/MyMediaPlayer/index.html#//apple_ref/doc/uid/DTS40009203 >>> >> >> Ronald >>> >>> Anyone have any luck with this? >>> >>> (Running Snow Leopard 10.6.2, Python 2.6.4, and using PyObjC-QTKit >>> 2.2) >>> >>> All help is very much appreciated. >>> >>> Cheers, >>> Jep >>> --- >>> --- >>> --- >>> --------------------------------------------------------------------- >>> This SF.Net email is sponsored by the Verizon Developer Community >>> Take advantage of Verizon's best-in-class app development support >>> A streamlined, 14 day to market process makes app distribution fast >>> and easy >>> Join now and get one step closer to millions of Verizon customers >>> http://p.sf.net/sfu/verizon-dev2dev >>> _______________________________________________ >>> Pyobjc-dev mailing list >>> Pyo...@li... >>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev >> |
From: Erik v. B. <er...@le...> - 2010-01-15 15:06:28
|
On 15 jan 2010, at 15:09, Aahz wrote: > Can you search the twisted codebase to find out if they're using > platform.mac_ver()? If yes, that's exactly the same problem I reported > here yesterday. If not, it's almost certainly something similar. I can't find the literal string platform.mac_ver (nor mac_ver) in my twisted-9.0.0 sources. > Critical bit of the logs: > >> Application Specific Information: >> abort() called >> USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER > > BTW, it would have helped if you had specified what "boom" means (i.e. > explained that you were getting an OS crash rather than a Python > traceback). I was looking for this in particular, so it was easy to > find, but someone else might well have not bothered. Ah, sorry, "boom" meant a python crashing hard and OSX returning the included crash report. Not a traceback. Erik |
From: Aahz <aa...@py...> - 2010-01-15 14:09:20
|
On Fri, Jan 15, 2010, Erik van Blokland wrote: > > I also need to draw a couple bitmap images, so I want to use more > functionality from Quartz. The enclosed test script works when executed > in the terminal. Exactly the same script crashes hard when called as part > of a twisted process. Can you search the twisted codebase to find out if they're using platform.mac_ver()? If yes, that's exactly the same problem I reported here yesterday. If not, it's almost certainly something similar. Critical bit of the logs: > Application Specific Information: > abort() called > USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER BTW, it would have helped if you had specified what "boom" means (i.e. explained that you were getting an OS crash rather than a Python traceback). I was looking for this in particular, so it was easy to find, but someone else might well have not bothered. Ronald, I looked in gestaltmodule.c, and it's not doing a fork(), so it must be buried in the Gestalt() call itself. Which really makes this Apple's bug unless Gestalt() is completely deprecated. However, I don't have enough Mac experience to make that certain. -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair |
From: Erik v. B. <er...@le...> - 2010-01-15 10:34:28
|
Hi all, I have a project in which an OSX machine renders images in response to http calls. It runs the python.org 2.6.4, pyobjc 2.2, twisted 9.0.0. I can use Quartz to make a drawing context, draw simple paths, export as PNG. This works. I also need to draw a couple bitmap images, so I want to use more functionality from Quartz. The enclosed test script works when executed in the terminal. Exactly the same script crashes hard when called as part of a twisted process. > [eBook:trunk/lettersetter/Quartz LS Debug] erik% python /usr/bin/ > twistd -y twisted.quartz.test.py --pidfile quartztestpid.txt -- > logfile quartztest.log > versions: > python version: 2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) > [GCC 4.0.1 (Apple Inc. build 5493)] > pyobjc version: 2.2 > twisted.web version: 9.0.0 > > dry run: > saved test image at /Users/erik/Develop/lettersetter/trunk/ > lettersetter/Quartz LS Debug/test.png > > booting twisted app > done Then I open a browser at http://127.0.0.1:8081/ kerboom! My test script requires a png file to be nearby. Any help or pointers are kindly appreciated. Erik |
From: Aahz <aa...@py...> - 2010-01-14 16:28:26
|
On Thu, Jan 14, 2010, Ronald Oussoren wrote: > On 12 Jan, 2010, at 22:36, Aahz wrote: >> >> Should I try just building PyObjC 2.2 from source? I tried updating >> macports before I realized that this was the system libxml. > > Rebuilding pyobjc-core from source should fix the libxml issues, I > created those binaries on 10.6 and that version of libxml is not > compatible with the one on 10.5. Okie-doke. >> AFAICT, PyObjC 2.2b2 is crashing on >> >> from Foundation import NSAutoreleasePool, NSMutableArray, NSString >> >> in objc._bridgesupport._parseBridgeSupport() with "ValueError: Unknown >> typestr". Assuming the line number matches the source, that's >> >> objc.parseBridgeSupport(data, globals, frameworkName, *args, **kwds) > > Is this using /usr/bin/python? Nope, still Python 2.6.4 from python.org, building on 10.5, running on 10.6. >> OTOH, the app built with PyObjC 1.4 is crashing with >> USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER >> and I'm not sure where. Any clues? > > Do you use os.fork in your program? Apple's frameworks do not support > calling fork without calling exec right after that, especially (but > not limited to) frameworks that have a connection to the window > server. AFAIK that includes the CoreFoundation framework. Which is stupid, bone-headed, and wrong. Repeating from pythonmac-sig: After a lot of poking around, it appears that platform.mac_ver() is broken in 10.6 (Snow Leopard) because the gestalt module calls fork(), which causes a crash with USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER. This seems to only happen with py2app builds; I have not been able to reproduce using strict command-line testing, and I haven't had time to create a stripped-down app to test with. I'd appreciate if someone else could verify before I file a bug. (It's possible that the multiprocessing module is involved if a simple test fails to reproduce -- my AppDelegate starts another process for the main code that then calls mac_ver() to log the current OS version.) I'm using os.uname() instead for now. -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair |
From: Ronald O. <ron...@ma...> - 2010-01-14 09:35:54
|
On 12 Jan, 2010, at 22:36, Aahz wrote: > I'm building an app on 10.5, trying to support Intel 10.4, 10.5, 10.6. > Currently I'm using a combination of PyObjC 1.4 (originally to support > PPC 10.4) and PyObjC 2.2b2 to capture FSEvents in a subprocess. When > 10.6 was released, my app crashed. Then Apple delivered some updates and > my app started working in mid-November. Now apparently Apple has put out > new updates and my app is crashing again. > > I am moderately sure that I can fix this with some combination of build > changes, but I'd like some guidance to avoid thrashing around. I'm > using the python.org build for Python 2.6.4. I've tried upgrading to > PyObjC 2.2, but that breaks on 10.5 with > > ImportError: dlopen(/Users/aahz/Library/Python/2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.3-fat.egg/objc/_objc.so, 2): Library not loaded: /usr/lib/libxml2.2.dylib > Reason: Incompatible library version: _objc.so requires version 10.0.0 or later, but libxml2.2.dylib provides version 9.0.0 > > Should I try just building PyObjC 2.2 from source? I tried updating > macports before I realized that this was the system libxml. Rebuilding pyobjc-core from source should fix the libxml issues, I created those binaries on 10.6 and that version of libxml is not compatible with the one on 10.5. I've added removal of the libxml dependency to my todo-list, but haven't decided yet on how to do so. I use libxml to parse the bridgesupport files, which are XML files with additional meta data. I currently use libxml for that because it is an efficient C-based parser and want to investigate two replacement strategies: (1) use ElementTree to do the parsing in Python and (2) "compile" the XML files into some other format when building framework wrappers (either to a python file or a C extension). > > AFAICT, PyObjC 2.2b2 is crashing on > > from Foundation import NSAutoreleasePool, NSMutableArray, NSString > > in objc._bridgesupport._parseBridgeSupport() with "ValueError: Unknown > typestr". Assuming the line number matches the source, that's > > objc.parseBridgeSupport(data, globals, frameworkName, *args, **kwds) Is this using /usr/bin/python? > > OTOH, the app built with PyObjC 1.4 is crashing with > USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER > and I'm not sure where. Any clues? Do you use os.fork in your program? Apple's frameworks do not support calling fork without calling exec right after that, especially (but not limited to) frameworks that have a connection to the window server. AFAIK that includes the CoreFoundation framework. Ronald |
From: Jep H. <je...@gm...> - 2010-01-13 22:16:29
|
Hi Ronald, Thank you for responing. So that doesn't error out on you? If you 'print movie' does it return an object? It appears that you nested your attributes -- rather than predifining them in a python dictionary and then passing them to the 'QTMovie.movieWithAttributes_error_' method -- could this be the critical difference? I'll try this as soon as I get home and report my findings. Thanks again, -Jep sent via mobile On Jan 13, 2010, at 3:09 PM, Ronald Oussoren <ron...@ma...> wrote: > > On 13 Jan, 2010, at 3:21, Jep Hill wrote: > >> I'm able to initialize quicktime movie objects with several methods >> however I'm not able to successfully implement >> QTKit.QTMovie.movieWithAtrributes_error_ > > Implement or use? > > This seems to work from the command-line (but I haven't interacted > with the movie): > > from Quartz import * > from QTKit import * > > path='/path/to/a/movie.mov' > movie, error = QTMovie.movieWithAttributes_error_( > NSDictionary.dictionaryWithDictionary_({ > 'QTMovieURLAttribute': NSURL.fileURLWithPath_(path), > 'QTMovieOpenForPlaybackAttribute': True, > 'QTMovieOpenAsyncRequiredAttribute': True, > }), None) > > > The link below is an Apple example that uses this API, although in > ObjC. Translating it into Python should be fairly straightforward. > > <http://developer.apple.com/mac/library/samplecode/MyMediaPlayer/index.html#//apple_ref/doc/uid/DTS40009203 > > > > Ronald >> >> Anyone have any luck with this? >> >> (Running Snow Leopard 10.6.2, Python 2.6.4, and using PyObjC-QTKit >> 2.2) >> >> All help is very much appreciated. >> >> Cheers, >> Jep >> --- >> --- >> --- >> --------------------------------------------------------------------- >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast >> and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
From: Ronald O. <ron...@ma...> - 2010-01-13 20:51:00
|
On 12 Jan, 2010, at 23:46, Aahz wrote: > On Fri, Jan 08, 2010, Mark Woollard wrote: >> >> I have the following code in both Objective-C (compiled as Cocoa >> tool) and Python as below, with the same input arguments both run to >> completion without error however the ObjectiveC version creates the >> sqlite3 db file and the python version doesn't. I'm stuck as to why >> and was planning on using python in this way to populate database for >> shipping in app bundle. Anyone got any clues? > > Why not just use the built-in sqlite3 library in Python? (Someone who > actually knows Objective-C would need to answer your stated question.) One reason to use CoreData instead of sqlite is convenience: CoreData implements more of a standard application for you (such as bits of undo handling) and that makes it easier to write basic applications. Another one is interaction with an ObjC application that uses the same CoreData database. Ronald |
From: Ronald O. <ron...@ma...> - 2010-01-13 20:10:17
|
On 13 Jan, 2010, at 3:21, Jep Hill wrote: > I'm able to initialize quicktime movie objects with several methods however I'm not able to successfully implement QTKit.QTMovie.movieWithAtrributes_error_ Implement or use? This seems to work from the command-line (but I haven't interacted with the movie): from Quartz import * from QTKit import * path='/path/to/a/movie.mov' movie, error = QTMovie.movieWithAttributes_error_( NSDictionary.dictionaryWithDictionary_({ 'QTMovieURLAttribute': NSURL.fileURLWithPath_(path), 'QTMovieOpenForPlaybackAttribute': True, 'QTMovieOpenAsyncRequiredAttribute': True, }), None) The link below is an Apple example that uses this API, although in ObjC. Translating it into Python should be fairly straightforward. <http://developer.apple.com/mac/library/samplecode/MyMediaPlayer/index.html#//apple_ref/doc/uid/DTS40009203> Ronald > > Anyone have any luck with this? > > (Running Snow Leopard 10.6.2, Python 2.6.4, and using PyObjC-QTKit 2.2) > > All help is very much appreciated. > > Cheers, > Jep > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Jep H. <je...@gm...> - 2010-01-13 02:21:11
|
I'm able to initialize quicktime movie objects with several methods however I'm not able to successfully implement QTKit.QTMovie.movieWithAtrributes_error_ Anyone have any luck with this? (Running Snow Leopard 10.6.2, Python 2.6.4, and using PyObjC-QTKit 2.2) All help is very much appreciated. Cheers, Jep |
From: Mark W. <ma...@ta...> - 2010-01-12 22:55:12
|
Figured this out - had an issue with the model and it wasn't saving - I didn't realise due to not catching on that the call was returning a tuple with error as second item. As to why not to use sqlite api, sqlite backs CoreData and want to load initial data through CoreData to ensure correct structures + data is written for reading in native compiled CoreData app. The python is a script to initialize the data during the app build. Anyway its working now! Mark On 12 Jan 2010, at 22:46, Aahz wrote: > On Fri, Jan 08, 2010, Mark Woollard wrote: >> >> I have the following code in both Objective-C (compiled as Cocoa >> tool) and Python as below, with the same input arguments both run to >> completion without error however the ObjectiveC version creates the >> sqlite3 db file and the python version doesn't. I'm stuck as to why >> and was planning on using python in this way to populate database for >> shipping in app bundle. Anyone got any clues? > > Why not just use the built-in sqlite3 library in Python? (Someone who > actually knows Objective-C would need to answer your stated question.) > -- > Aahz (aa...@py...) <*> http://www.pythoncraft.com/ > > "If you think it's expensive to hire a professional to do the job, wait > until you hire an amateur." --Red Adair > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Aahz <aa...@py...> - 2010-01-12 22:46:47
|
On Fri, Jan 08, 2010, Mark Woollard wrote: > > I have the following code in both Objective-C (compiled as Cocoa > tool) and Python as below, with the same input arguments both run to > completion without error however the ObjectiveC version creates the > sqlite3 db file and the python version doesn't. I'm stuck as to why > and was planning on using python in this way to populate database for > shipping in app bundle. Anyone got any clues? Why not just use the built-in sqlite3 library in Python? (Someone who actually knows Objective-C would need to answer your stated question.) -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair |
From: Ned D. <na...@ac...> - 2010-01-12 22:38:45
|
In article <5c6...@ma...>, David Eppstein <dav...@gm...> wrote: > This is probably not about PyObjC at all, but maybe someone here knows > enough about Python under OS X to answer it. A friend of mine is using > EasyDialogs and his code broke under Snow Leopard. If one tries to > import EasyDialogs in the default Python installation, one gets the > error > > >>> import EasyDialogs > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File > "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat > -mac/EasyDialogs.py", > line 24, in <module> > from Carbon.Dlg import GetNewDialog, SetDialogItemText, > GetDialogItemText, ModalDialog > ImportError: cannot import name GetNewDialog > >>> > > Is there any fix, workaround, or alternative library? A better place to ask a question like this would be on the Python Mac SIG forum (http://dir.gmane.org/gmane.comp.python.apple). The problem is that the Apple-supplied Python 2.6 in 10.6 runs by default in 64-bit mode and the old Mac Carbon modules are not available in 64-bit mode since Apple chose not to support 64-bit Carbon. That's why those old Mac modules are deprecated in Python 2.6 and removed in Python 3. A workaround is to force Python to run in 32-bit mode: $ arch -i386 /usr/bin/python2.6 Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import EasyDialogs >>> or $ export VERSIONER_PYTHON_PREFER_32_BIT=yes $ /usr/bin/python -- Ned Deily, na...@ac... |
From: Aahz <aa...@py...> - 2010-01-12 21:36:25
|
I'm building an app on 10.5, trying to support Intel 10.4, 10.5, 10.6. Currently I'm using a combination of PyObjC 1.4 (originally to support PPC 10.4) and PyObjC 2.2b2 to capture FSEvents in a subprocess. When 10.6 was released, my app crashed. Then Apple delivered some updates and my app started working in mid-November. Now apparently Apple has put out new updates and my app is crashing again. I am moderately sure that I can fix this with some combination of build changes, but I'd like some guidance to avoid thrashing around. I'm using the python.org build for Python 2.6.4. I've tried upgrading to PyObjC 2.2, but that breaks on 10.5 with ImportError: dlopen(/Users/aahz/Library/Python/2.6/site-packages/pyobjc_core-2.2-py2.6-macosx-10.3-fat.egg/objc/_objc.so, 2): Library not loaded: /usr/lib/libxml2.2.dylib Reason: Incompatible library version: _objc.so requires version 10.0.0 or later, but libxml2.2.dylib provides version 9.0.0 Should I try just building PyObjC 2.2 from source? I tried updating macports before I realized that this was the system libxml. AFAICT, PyObjC 2.2b2 is crashing on from Foundation import NSAutoreleasePool, NSMutableArray, NSString in objc._bridgesupport._parseBridgeSupport() with "ValueError: Unknown typestr". Assuming the line number matches the source, that's objc.parseBridgeSupport(data, globals, frameworkName, *args, **kwds) OTOH, the app built with PyObjC 1.4 is crashing with USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER and I'm not sure where. Any clues? -- Aahz (aa...@py...) <*> http://www.pythoncraft.com/ "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair |
From: David E. <dav...@gm...> - 2010-01-12 17:30:43
|
This is probably not about PyObjC at all, but maybe someone here knows enough about Python under OS X to answer it. A friend of mine is using EasyDialogs and his code broke under Snow Leopard. If one tries to import EasyDialogs in the default Python installation, one gets the error >>> import EasyDialogs Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/EasyDialogs.py", line 24, in <module> from Carbon.Dlg import GetNewDialog, SetDialogItemText, GetDialogItemText, ModalDialog ImportError: cannot import name GetNewDialog >>> Is there any fix, workaround, or alternative library? |
From: Ronald O. <ron...@ma...> - 2010-01-12 10:21:23
|
On 12 Jan, 2010, at 11:16, Grzegorz Adam Hankiewicz wrote: [...] I'll get back to you about the rest of your mail. > > BTW, is there no other possibility to run pyobjc scripts than to build applications? Some parts of Cocoa only work in application bundles with a specific structure, and that includes most of the examples because they use a nib-based GUI. The implementation of NSApplication expects to run in an application bundle with specific keys in the Info.plist. Technically, any GUI access requires an application bundle but you won't notice that with Python because the python command itself uses some tricks to ensure that the actual interpreter is in an application bundle. Ronald |
From: Grzegorz A. H. <gr...@ti...> - 2010-01-12 10:16:22
|
El 12/01/2010, a las 10:31, Ronald Oussoren escribió: >> $ python main.py >> 2010-01-10 21:26:34.055 Python[48412:d07] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting >> > > Use "python setup.py py2app" to create an .app bundle in subdirectory "dist", then start that application (either by double-clicking in the Finder or using the open command in the terminal). Thanks, that gets me further. Running the generated bundle throws the following log errors: > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] Traceback (most recent call last): > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] File "/Users/gradha/Downloads/PyObjCExample-CGRotation/dist/CGRotation.app/Contents/Resources/__boot__.py", line 31, in <module> > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] _run('main.py') > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] File "/Users/gradha/Downloads/PyObjCExample-CGRotation/dist/CGRotation.app/Contents/Resources/__boot__.py", line 28, in _run > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] execfile(path, globals(), globals()) > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] File "/Users/gradha/Downloads/PyObjCExample-CGRotation/dist/CGRotation.app/Contents/Resources/main.py", line 1, in <module> > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] from PyObjCTools import AppHelper > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] File "build/bdist.macosx-10.6-universal/egg/PyObjCTools/AppHelper.py", line 14, in <module> > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] File "build/bdist.macosx-10.6-universal/egg/AppKit/__init__.py", line 9, in <module> > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] File "build/bdist.macosx-10.6-universal/egg/Foundation/__init__.py", line 10, in <module> > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] File "build/bdist.macosx-10.6-universal/egg/CoreFoundation/__init__.py", line 19, in <module> > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] File "objc/_bridgesupport.pyc", line 156, in initFrameworkWrapper > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] File "objc/_bridgesupport.pyc", line 58, in _parseBridgeSupport > 12/01/10 11:12:01 [0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304] ValueError: Don't know CF type for typestr '^{__CFAllocator=}', cannot create special wrapper > 12/01/10 11:12:01 CGRotation[2304] CGRotation Error > 12/01/10 11:12:01 CGRotation[2304] CGRotation Error > An unexpected error has occurred during execution of the main script > > ValueError: Don't know CF type for typestr '^{__CFAllocator=}', cannot create special wrapper > 12/01/10 11:12:11 com.apple.launchd.peruser.501[277] ([0x0-0x142142].org.pythonmac.unspecified.CGRotation[2304]) Exited with exit code: 255 BTW, is there no other possibility to run pyobjc scripts than to build applications? |
From: Ronald O. <ron...@ma...> - 2010-01-12 09:53:59
|
On 10 Jan, 2010, at 16:59, Petr Mifek wrote: > Hi, > > I've run into this also, as anyone building and using on stock Leopard > would. It seems the problem is in pyobjc-core/Modules/objc/objc-class.m > at line 1547 (current trunk revision 2386) - there is a call to > PyType_Modified, which seems to be unavailable in Python 2.5 (as per > http://docs.python.org/c-api/type.html#PyType_Modified). > > As it is in there only at one place and (by my judgment) not very > important one, I hope there will be some quick fix possible. Or we > should raise the requirements to Python 2.6+. > > Made a bugreport at SF PyObjC tracker (id 2929331). I'll release pyobjc-core 2.2.1 with just this fix tonight. The next release of pyobjc (2.3) will almost certainly require python 2.6 for two reasons: first of all this makes my life a lot easier w.r.t. supporting both python 2.x and 3.x because of the b"...." literals. But more importantly: 2.6 introcudes an "__dir__" method and that allows me to optimize method lookup. PyObjC currently does a complete scan of classes whenever they are first used and has to resort to some (inefficient) trickery to ensure that the results of that scan get updated when the ObjC class changes (through categories, or other code performing dynamic updates of an ObjC class). The addition of an __dir__ method makes it possible to do away with this complete scan without losing the introspection capabilities of PyObjC. Ronald > > Cheers, > Petr > > > > Ronald Oussoren wrote: >> On 26 Nov, 2009, at 23:41, Orestis Markou wrote: >> >>> Hello, >>> >>> I'm trying to get pyobjc2.2 working on python2.5 in SL (in a virtualenv). I'm getting this strange failure: >>> >>> ImportError: dlopen(/Users/orestis/.virtualenvs/pyobjc2.2/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc/_objc.so, 2): Symbol not found: _PyType_Modified >>> Referenced from: /Users/orestis/.virtualenvs/pyobjc2.2/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc/_objc.so >>> Expected in: flat namespace >>> in /Users/orestis/.virtualenvs/pyobjc2.2/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc/_objc.so >>> >> >> You're the second user that ran into this problem. I haven't had time yet to research the issue. >> >> Ronald >> >> >> ------------------------------------------------------------------------ >> >> ------------------------------------------------------------------------------ >> Join us December 9, 2009 for the Red Hat Virtual Experience, >> a free event focused on virtualization and cloud computing. >> Attend in-depth sessions from your desk. Your couch. Anywhere. >> http://p.sf.net/sfu/redhat-sfdev2dev >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Ronald O. <ron...@ma...> - 2010-01-12 09:31:28
|
On 10 Jan, 2010, at 21:27, Grzegorz Adam Hankiewicz wrote: > Hello there. > > I've followed the instructions on the website to install pyobjc through "easy_install pyobjc==2.2" on a snow leopard 10.6.2. Now I've downloaded the example PyObjCExample-CGRotation from http://pyobjc.sourceforge.net/examples/pyobjc-framework-Quartz/index.html and try to run it using "python main.py", but I get this error: > > $ python main.py > 2010-01-10 21:26:34.055 Python[48412:d07] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting > Use "python setup.py py2app" to create an .app bundle in subdirectory "dist", then start that application (either by double-clicking in the Finder or using the open command in the terminal). Ronald |
From: Jep H. <je...@gm...> - 2010-01-10 22:31:44
|
Hello all, Having searched the web high and low trying to find help with QTKit and Python on Snow Leopard 10.6.2,I was very happy to find this forum. Can anyone tell my how to get this sample script working: http://pseudogreen.org/blog/qtkit/ I'm pulling my hair out trying to figure out why I keep getting this error: $convert_for_iphone in_test.mov out_test.mov Traceback (most recent call last): File "/Users/jep/scripts/python/convert_for_iphone", line 49, in <module> convert_for_iphone(infile, outfile) File "/Users/jep/scripts/python/convert_for_iphone", line 27, in convert_for_iphone movie, error = QTKit.QTMovie.movieWithAttributes_error_(in_attrs, None) KeyError: u'QTMovieDelegateAttribute' In fact I'm getting the same "Key Error: u'QTMovieDelegateAttribute" on several example scripts. I can't seem to successfully initialize a movie object. All help is more than appreciated — thank you all. Jep |
From: Grzegorz A. H. <gr...@ti...> - 2010-01-10 20:45:49
|
Hello there. I've followed the instructions on the website to install pyobjc through "easy_install pyobjc==2.2" on a snow leopard 10.6.2. Now I've downloaded the example PyObjCExample-CGRotation from http://pyobjc.sourceforge.net/examples/pyobjc-framework-Quartz/index.html and try to run it using "python main.py", but I get this error: $ python main.py 2010-01-10 21:26:34.055 Python[48412:d07] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting What am I doing wrong? Is there something else I need to setup? |
From: Petr M. <pet...@an...> - 2010-01-10 16:21:28
|
Hi, I've run into this also, as anyone building and using on stock Leopard would. It seems the problem is in pyobjc-core/Modules/objc/objc-class.m at line 1547 (current trunk revision 2386) - there is a call to PyType_Modified, which seems to be unavailable in Python 2.5 (as per http://docs.python.org/c-api/type.html#PyType_Modified). As it is in there only at one place and (by my judgment) not very important one, I hope there will be some quick fix possible. Or we should raise the requirements to Python 2.6+. Made a bugreport at SF PyObjC tracker (id 2929331). Cheers, Petr Ronald Oussoren wrote: > On 26 Nov, 2009, at 23:41, Orestis Markou wrote: > >> Hello, >> >> I'm trying to get pyobjc2.2 working on python2.5 in SL (in a virtualenv). I'm getting this strange failure: >> >> ImportError: dlopen(/Users/orestis/.virtualenvs/pyobjc2.2/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc/_objc.so, 2): Symbol not found: _PyType_Modified >> Referenced from: /Users/orestis/.virtualenvs/pyobjc2.2/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc/_objc.so >> Expected in: flat namespace >> in /Users/orestis/.virtualenvs/pyobjc2.2/lib/python2.5/site-packages/pyobjc_core-2.2-py2.5-macosx-10.6-i386.egg/objc/_objc.so >> > > You're the second user that ran into this problem. I haven't had time yet to research the issue. > > Ronald > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: SourceForge.net <no...@so...> - 2010-01-10 15:56:42
|
Bugs item #2929331, was opened at 2010-01-10 16:56 Message generated for change (Tracker Item Submitted) made by pmifek You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=2929331&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: Petr Mifek (pmifek) Assigned to: Nobody/Anonymous (nobody) Summary: PyObjC 2.2 currently needs python 2.6+ to run Initial Comment: In pyobjc-core/Modules/objc/objc-class.m at line 1547 (current trunk revision 2386) - there is a call to PyType_Modified, which seems to be added only in Python 2.6 (as per http://docs.python.org/c-api/type.html#PyType_Modified). The result is that current version of PyObjC can't be used with anything less that Python 2.6 - it compiles with warning about implicit declaration of PyType_Modified and throws something like "ImportError: dlopen(_objc.so) ... Symbol not found: _PyType_Modified Referenced from _objc.so, Expected in: dynamic lookup". ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=2929331&group_id=14534 |