pyobjc-dev Mailing List for PyObjC (Page 21)
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: Greg E. <gre...@ca...> - 2011-06-26 07:55:20
|
When I draw text in PyGUI using Courier New, it comes out too far down by about half the height of the lower case letters. The problem only seems to affect this particular font; all the other fonts I've tried are positioned correctly. This is the code I'm using to get the baseline of the text positioned at (x, y): h = ns_font.defaultLineHeightForFont() d = -ns_font.descender() ns_point = NSPoint(x, y - h + d) ns_string.drawAtPoint_withAttributes_(ns_point, ns_attrs) Am I doing anything wrong here? I've checked the values that Cocoa is getting for defaultLineHeightForFont and descender, and they seem to be correct, but the text comes out in the wrong place when using that font. -- Greg |
From: Greg E. <gre...@ca...> - 2011-06-21 23:53:44
|
If anyone would like to see a substantial application built with PyGUI, you might like to take a look at my latest game, currently posted on the Pyggy Awards site: http://pyggy.pyweek.org/e/SimChip/ Any feedback you care to provide on the game would be welcome as well. :-) -- Greg |
From: Greg E. <gre...@ca...> - 2011-06-21 23:20:28
|
geoff wrote: > Greg, I had to solve this problem in another application and ended up > using the array module and the with the slice syntax. > > import array > > input = "rgbaRGBA1234" > ba = array.array('c', input) > ba[0::4], ba[2::4] = ba[2::4], ba[0::4] Yep, I was thinking the same thing myself. I'll give it a try next time I'm working on the problem. Thanks, Greg |
From: Lawrence A. <la...@us...> - 2011-06-19 10:39:57
|
I notice that at the end of last year Ronald said he intended to move the PyObjC repository from SVN to mercurial, to join py2app and friends which have already been transferred. In an attempt to be helpful and for my own purposes I have successfully (I hope) created a copy of the PyObjC SVN repository using mercurial at bitbucket: https://bitbucket.org/lakka/pyobjc All history/branches/tags have been preserved (though some of them might usefully be closed off), but please open an issue if you find any problems. I would be delighted if Ronald wanted to move/clone this into his account! I hope soon to be able to contribute to the project some work I have done reorganising the Sphinx documentation and updating the examples. Lawrence |
From: Gregory E. <gre...@ca...> - 2011-06-18 06:14:57
|
PyGUI 2.5.1 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Minor update to fix missing distutils_extensions.py file. 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...> - 2011-06-18 05:06:10
|
Invisible Bob wrote: > I am on the PyObjC list and got this email, will it work on an > i-(phone/touch)? I have absolutely no idea. Someone will have to try it to find out. -- Greg |
From: Greg E. <gre...@ca...> - 2011-06-18 04:31:42
|
Colin Brown wrote: > Macintosh:PyGUI-2.5 colin$ python setup.py install > Traceback (most recent call last): > File "setup.py", line 12, in <module> > from distutils_extensions import pygui_build_py > ImportError: No module named distutils_extensions Sorry about that! The missing file is attached, and I'll upload a fixed distribution soon. -- Greg |
From: Greg E. <gre...@ca...> - 2011-06-17 03:18:53
|
PyGUI 2.5 is available: http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/ Lots of new stuff in this version. Highlights include: - Improved facilities for customising the standard menus. - Functions for creating PyGUI Images from PIL images and numpy arrays. - ListButton - a pop-up or pull-down menu of choices. - GridView - a user-defined view consisting of a regular grid of cells. - PaletteView - a GridView specialised for implementing tool palettes. There is also a big pile of other improvements and bug fixes. See the CHANGES file for full details. 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: Ronald O. <ron...@ma...> - 2011-06-14 05:05:51
|
On 13 Jun, 2011, at 14:07, Daniel Luis dos Santos wrote: > Hello, > > I have a GUI application built with interface builder. One of the windows has a NSTextView in it. I connected it to an object also referenced in the interface builder file. > The goal is to write to the NSTextView from a background trhead that does some task. I launch the thread with a call to > > NSThread.alloc().initWithTarget_selector_object_() > > The behaviour I am getting is erratic. Most times it blocks on the call to the NSTextView's setString_() method and the application hangs. If I run the code on the main thread it runs fine. > > How do I do this from a background thread ? The idea is to keep the application responsive. You cannot call methods of GUI classes from a thread that is not the main thread (that is, AppKit is not thread-safe). You need to look into methods like, "-performSelectorOnMainThread:withObject:waitUntilDone:". The basic pattern is that you launch your long running task in a secondary thread and use performSelectorOnMainThread... to call a method that updates the GUI. This should keep the application responsive as the GUI updating code should be simple and not take a lot of time. Ronald > > I am on : > snow leopard (10.6.7) > pyObjc (I think it is 2.2b3 (can you tell me how to really check the version ?)) > > Many thanks > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Diez B. R. <de...@we...> - 2011-06-13 12:54:51
|
On Jun 13, 2011, at 2:07 PM, Daniel Luis dos Santos wrote: > Hello, > > I have a GUI application built with interface builder. One of the windows has a NSTextView in it. I connected it to an object also referenced in the interface builder file. > The goal is to write to the NSTextView from a background trhead that does some task. I launch the thread with a call to > > NSThread.alloc().initWithTarget_selector_object_() > > The behaviour I am getting is erratic. Most times it blocks on the call to the NSTextView's setString_() method and the application hangs. If I run the code on the main thread it runs fine. > > How do I do this from a background thread ? The idea is to keep the application responsive. > GUI and multi-theading = bad idea. The main or GUI-thread is very sensitive about state being changed from other threads while it does it's works. So usually there are ways to remedy this by special events that get pushed into the GUI-threads event-queue, or similar means. The documentation relevant for this should be http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html#//apple_ref/doc/uid/10000057i-CH16-SW44 That should get you started. Diez |
From: Daniel L. d. S. <dan...@gm...> - 2011-06-13 12:08:03
|
Hello, I have a GUI application built with interface builder. One of the windows has a NSTextView in it. I connected it to an object also referenced in the interface builder file. The goal is to write to the NSTextView from a background trhead that does some task. I launch the thread with a call to NSThread.alloc().initWithTarget_selector_object_() The behaviour I am getting is erratic. Most times it blocks on the call to the NSTextView's setString_() method and the application hangs. If I run the code on the main thread it runs fine. How do I do this from a background thread ? The idea is to keep the application responsive. I am on : snow leopard (10.6.7) pyObjc (I think it is 2.2b3 (can you tell me how to really check the version ?)) Many thanks |
From: SourceForge.net <no...@so...> - 2011-06-08 08:14:44
|
Bugs item #3313601, was opened at 2011-06-08 20:14 Message generated for change (Tracker Item Submitted) made by gcewing You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3313601&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: Gregory Ewing (gcewing) Assigned to: Nobody/Anonymous (nobody) Summary: NSBezierPath memory leak Initial Comment: NZBezierPath.appendBezierPathWithPoints_count_ appears to leak memory under some circumstances depending on the type of object passed in. Observed using MacOSX 10.6.4, Python 2.7, PyObjC 2.3 Here are two test cases, one of which leaks and the other doesn't. # Case 1 - Passing a list of tuples # This one leaks from AppKit import NSBezierPath, NSAutoreleasePool def test(): path = NSBezierPath.bezierPath() while 1: pool = NSAutoreleasePool.alloc().init() points = [(x, x) for x in xrange(10)] path.appendBezierPathWithPoints_count_(points, len(points)) path.removeAllPoints() pool = None test() # Case 2 - Passing an array.array of type 'f' # This one does NOT leak, apparently because it is able to pass the # contents of the array directly to ObjC without any conversion. # Does not leak from AppKit import NSBezierPath import array def test(): path = NSBezierPath.bezierPath() while 1: ar_points = array.array('f', xrange(2000)) p = ar_points n = len(p) // 2 path.appendBezierPathWithPoints_count_(p, n) path.removeAllPoints() test() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3313601&group_id=14534 |
From: SourceForge.net <no...@so...> - 2011-06-08 07:03:41
|
Bugs item #3313583, was opened at 2011-06-08 19:03 Message generated for change (Tracker Item Submitted) made by gcewing You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3313583&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: Gregory Ewing (gcewing) Assigned to: Nobody/Anonymous (nobody) Summary: Memory leak concerning NSBezierPath + NumPy Initial Comment: The following program leaks memory each time around the loop. The leak does not occur if something other than a NumPy array is used for the points. # Leaks from AppKit import NSBezierPath, NSAutoreleasePool import numpy def test(): path = NSBezierPath.bezierPath() points = numpy.array([(x, x) for x in xrange(1000)]) while 1: pool = NSAutoreleasePool.alloc().init() path.appendBezierPathWithPoints_count_(points, len(points)) path.removeAllPoints() pool = None test() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3313583&group_id=14534 |
From: SourceForge.net <no...@so...> - 2011-06-06 22:50:12
|
Bugs item #3312793, was opened at 2011-06-07 00:50 Message generated for change (Tracker Item Submitted) made by dwaynebailey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3312793&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: Dwayne Bailey (dwaynebailey) Assigned to: Nobody/Anonymous (nobody) Summary: -i sysroot does not make the build version independent Initial Comment: In setup.py there are references to adding '-isysroot /' - the comments state that this is done to make the build portable between versions. This is simply not true. The build will be correct for current and future versions. I've been building using jhbuild on 10.6 but targetting 10.5. All builds failed since sysroot was resulting in 10.6 headers etc being pulled in. I solved my build by simply removing all references to sysroot. The build then correctly links against the 10.5 SDK. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3312793&group_id=14534 |
From: Josh C. <woo...@gm...> - 2011-06-01 21:44:41
|
On 15 Mar, 2011, at 19:04, Ronald Oussoren wrote: > I guess I should have posted the message here as well (I only posted to > pythonmac-sig): Xcode4 sucks w.r..t support for scripting languages. > I've filed a bug at Apple, and I advise anyone that uses PyObjC to write GUI > code to do the same. Ronald, Could you perhaps post the text of the bug you filed to the list, so the rest of us can duplicate it and be sure the separate filings will be properly combined? Thanks, Josh Caswell |
From: Greg E. <gre...@ca...> - 2011-05-28 08:56:13
|
Can anyone think of an efficient way to convert a string full of RGBA image data to BGRA, using only what's available in the standard library? I'm trying to add a function to PyGUI for creating an Image object from arbitrary data. The problem I'm having is that GDI+ on Windows expects BGRA, whereas most other platforms deal with RGBA. I don't want to require the user to supply the data in different formats on different platforms, so PyGUI needs to be able to convert where necessary. I know the conversion can be done easily using something like PIL or numpy, but I'm after a solution that doesn't depend on any third-party libraries. -- Greg |
From: schneo <sc...@gm...> - 2011-05-19 12:26:09
|
Hello, I’m porting an Open Source Python recording/podcasting application i wrote on Windows to Mac OS X (i’m pretty new to this platform). http://sites.google.com/site/audiovideocours/english-home Everything is now finished except the essential events hook which is used for synced screen capturing and finishing recording (and that’s where pyObjC communicate with Quartz for the events tap). Unfortunately i had errors here and after searching i saw there’s a bug in the currently implemented pyobjc lib shipping with Snow Leopard: https://sourceforge.net/mailarchive/message.php?msg_id=22904885 So far i fail at installing the new corrected version of pyobjc. What would be the simplest way for me to have a good version of pyobjc for my purposes ? (if possible i’d like to stay with the python version shipping with OS X) So far i tried, 1) to find the official pyobjc sources file (shipped by Apple) and make the changes you describe on that file (after a backup of those files) but i can’t find them on Snow Leopard. 2) to install pyobjc form the pyobjc website a) i did a trunk checkout and tried “python setup.py install” which ended up in (see more details at the end of the mail) [...] Reading http://pypi.python.org/simple/pyobjc-framework-ServiceManagement/ Reading http://pyobjc.sourceforge.net No local packages or download links found for pyobjc-framework-ServiceManagement==2.4a0 error: Could not find suitable distribution for Requirement.parse('pyobjc-framework-ServiceManagement==2.4a0') b) i tried “easy_install pyobjc” Searching for pyobjc Best match: pyobjc 2.4a0 Processing pyobjc-2.4a0-py2.6.egg pyobjc 2.4a0 is already the active version in easy-install.pth Using /Library/Python/2.6/site-packages/pyobjc-2.4a0-py2.6.egg Processing dependencies for pyobjc Searching for pyobjc-framework-ServiceManagement==2.4a0 Reading http://pypi.python.org/simple/pyobjc-framework-ServiceManagement/ Reading http://pyobjc.sourceforge.net No local packages or download links found for pyobjc-framework-ServiceManagement==2.4a0 error: Could not find suitable distribution for Requirement.parse('pyobjc-framework-ServiceManagement==2.4a0') 3) i tried installing pyobjc from macports This did apparently install a the macport python26 and pyobjc libs in “/opt/local/var/macports/software” without errors: $ ls [...] py26-pyobjc py26-pyobjc-cocoa python26 if i launch in a shell “python2.6” or "/opt/local/var/macports/software/python26/2.6.6_3/opt/local/bin/python2.6", i can do an “import Foundation” but an “import Quartz” states that there’s no library of that name. 4) Is it possible to just drag and drop a pyobjc folder in my dev. folder so that i’m sure it’s going to use it or is it necessary to build something? All help would be greatly appreciated and thanks a lot for your work on this essential bridge :) PS: Is the pyobjc shipping soon in OS X Lion will have this bug fixed? Thanks again. Francois. /////////////////////////////////////////////////////////// This is the full log when i tried “python setup.py install” wifi-osiris-sec-181-140:pyobjc dundun$ python setup.py install running install running bdist_egg running egg_info creating pyobjc.egg-info writing requirements to pyobjc.egg-info/requires.txt writing pyobjc.egg-info/PKG-INFO writing top-level names to pyobjc.egg-info/top_level.txt writing dependency_links to pyobjc.egg-info/dependency_links.txt writing manifest file 'pyobjc.egg-info/SOURCES.txt' unrecognized .svn/entries format in reading manifest file 'pyobjc.egg-info/SOURCES.txt' writing manifest file 'pyobjc.egg-info/SOURCES.txt' installing library code to build/bdist.macosx-10.6-universal/egg running install_lib warning: install_lib: 'build/lib' does not exist -- no Python modules to install creating build creating build/bdist.macosx-10.6-universal creating build/bdist.macosx-10.6-universal/egg creating build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/PKG-INFO -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/SOURCES.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/dependency_links.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/requires.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/top_level.txt -> build/bdist.macosx-10.6-universal/egg/EGG-INFO copying pyobjc.egg-info/zip-safe -> build/bdist.macosx-10.6-universal/egg/EGG-INFO creating dist creating 'dist/pyobjc-2.4a0-py2.6.egg' and adding 'build/bdist.macosx-10.6-universal/egg' to it removing 'build/bdist.macosx-10.6-universal/egg' (and everything under it) Processing pyobjc-2.4a0-py2.6.egg Copying pyobjc-2.4a0-py2.6.egg to /Library/Python/2.6/site-packages Adding pyobjc 2.4a0 to easy-install.pth file Installed /Library/Python/2.6/site-packages/pyobjc-2.4a0-py2.6.egg Processing dependencies for pyobjc==2.4a0 Searching for pyobjc-framework-ServiceManagement==2.4a0 Reading http://pypi.python.org/simple/pyobjc-framework-ServiceManagement/ Reading http://pyobjc.sourceforge.net No local packages or download links found for pyobjc-framework-ServiceManagement==2.4a0 error: Could not find suitable distribution for Requirement.parse('pyobjc-framework-ServiceManagement==2.4a0') |
From: SourceForge.net <no...@so...> - 2011-05-17 10:06:27
|
Bugs item #3303209, was opened at 2011-05-17 22:06 Message generated for change (Tracker Item Submitted) made by gcewing You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3303209&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: Gregory Ewing (gcewing) Assigned to: Nobody/Anonymous (nobody) Summary: NSBitmapImageRep.initWithBitmapDataPlanes_... arg conv error Initial Comment: One of the NSBitmapImageRep.initWithBitmapDataPlanes_blah_blah_blah_ methods (the one with the bitmapFormat_ argument) does not convert its data argument properly. It should accept a 5-tuple of byte strings like the other version of this method, but instead reports: ValueError: depythonifying 'pointer', got 'tuple' Observed in PyObjC 2.3 with Python 2.7 on MacOSX 10.6. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=114534&aid=3303209&group_id=14534 |
From: Ronald O. <ron...@ma...> - 2011-05-14 05:40:31
|
On 12 May, 2011, at 22:47, Daniel Luis dos Santos wrote: > You are right about not making much sense in using a NSString this way. I did it out of distraction. > My question is still on. Why the warning ? I just want to understand, because I don't get it. It's a bug in the copy of PyObjC that's included in OSX 10.6: $ /usr/bin/python Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. :>>> from Foundation import NSString :>>> NSString.alloc().init() __main__:1: UninitializedDeallocWarning: leaking an uninitialized object of type NSPlaceholderString u'' :>>> s = _ :>>> type(s) <type 'objc.pyobjc_unicode'> :>>> I haven't researched yet why this happens, and later versions work properly. Ronald > > Regards, > Daniel Santos > > On May 12, 2011, at 1:14 PM, Greg Ewing wrote: > >> Ronald Oussoren wrote: >>> I don't know why Daniel wants to use an NSString, but there are reasons to >>> use NSString instead of Python unicode strings, for example because NSString >>> has a number of usefull methods with no easy native equivalent. >> >> But is there a reason to use any of them on an *empty* NSString? >> >> -- >> Greg >> >> ------------------------------------------------------------------------------ >> Achieve unprecedented app performance and reliability >> What every C/C++ and Fortran developer should know. >> Learn how Intel has extended the reach of its next-generation tools >> to help boost performance applications - inlcuding clusters. >> http://p.sf.net/sfu/intel-dev2devmay >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Greg E. <gre...@ca...> - 2011-05-12 23:21:04
|
Daniel Luis dos Santos wrote: > You are right about not making much sense in using a NSString this way. I did it out of distraction. > My question is still on. Why the warning ? It looks like a bug in pyobjc to me. According to the Cocoa docs, [[NSString alloc] init] gives you an empty NSString, so the equivalent in Python ought to work, even if it's not particularly useful. -- Greg |
From: Trevor B. <mr...@gm...> - 2011-05-12 21:36:29
|
> I haven't used PyInstaller, and don't even know what it is. It is a cross-platform python application bundler; it bundles the python interpreter, your application, and all required dependencies into one executable. > Does PyInstaller include package data? There should be bridgesupport files in the python package for Cocoa frameworks, that there should be a file named PyObjC.bridgesupport next to Foundation/__init__.py (and simularly for other frameworks). Unfortunately, it does something a little nutty. It seems to copy all the dependencies into one flat directory, and renames them to avoid collisions. It is copying all the CoreFoundation/*.so files out of my system python's site-packages, but it skips the .bridgesupport file, and I think that's at least part of the problem. No worries, it's nothing PyObjC is doing wrong, I just wanted to see if anyone here has solved this problem already. Thanks, -Trevor |
From: Daniel L. d. S. <dan...@gm...> - 2011-05-12 20:47:22
|
You are right about not making much sense in using a NSString this way. I did it out of distraction. My question is still on. Why the warning ? I just want to understand, because I don't get it. Regards, Daniel Santos On May 12, 2011, at 1:14 PM, Greg Ewing wrote: > Ronald Oussoren wrote: >> I don't know why Daniel wants to use an NSString, but there are reasons to >> use NSString instead of Python unicode strings, for example because NSString >> has a number of usefull methods with no easy native equivalent. > > But is there a reason to use any of them on an *empty* NSString? > > -- > Greg > > ------------------------------------------------------------------------------ > Achieve unprecedented app performance and reliability > What every C/C++ and Fortran developer should know. > Learn how Intel has extended the reach of its next-generation tools > to help boost performance applications - inlcuding clusters. > http://p.sf.net/sfu/intel-dev2devmay > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |
From: Daniel L. d. S. <dan...@gm...> - 2011-05-12 20:43:37
|
I am using version : faisca:~ dlsa$ python -c 'import objc; print(objc.__version__)' 2.2b3 On May 12, 2011, at 1:05 PM, Ronald Oussoren wrote: > > On 8 May, 2011, at 19:51, Daniel Luis dos Santos wrote: > >> Hello, >> >> I have some python code in a pyobjc app. At some point I want to initialize a NSString : >> >> string = NSString.alloc().init() > > Which version of pyobjc do you use? This works for me: > >>>> from Foundation import NSString > s = NSString.string>>> s = NSString.string() >>>> s > u'' >>>> s = NSString.alloc().init() >>>> s > u'' > > The PyObjC version can be found using: python -c 'import objc; print(objc.__version__)' > > Ronald > >> >> In the terminal I get the following output : >> >> /Users/dlsa/code/cirrusstore/client/build/cirrusclient.app/Contents/Resources/menubaractions.py:44: UninitializedDeallocWarning: leaking an uninitialized object of type NSPlaceholderString >> string = NSString.alloc().init() >> >> >> I have in my objective C bootstrap code the creation of an Auto release pool. >> >> If I try : >> >> string = NSString.alloc().init().autorelease() >> >> I get the same warning. >> >> Why does this happen ? >> ------------------------------------------------------------------------------ >> WhatsUp Gold - Download Free Network Management Software >> The most intuitive, comprehensive, and cost-effective network >> management toolset available today. Delivers lowest initial >> acquisition cost and overall TCO of any competing solution. >> http://p.sf.net/sfu/whatsupgold-sd >> _______________________________________________ >> Pyobjc-dev mailing list >> Pyo...@li... >> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > |
From: Greg E. <gre...@ca...> - 2011-05-12 12:15:05
|
Ronald Oussoren wrote: > I don't know why Daniel wants to use an NSString, but there are reasons to > use NSString instead of Python unicode strings, for example because NSString > has a number of usefull methods with no easy native equivalent. But is there a reason to use any of them on an *empty* NSString? -- Greg |
From: Ronald O. <ron...@ma...> - 2011-05-12 12:10:01
|
On 9 May, 2011, at 0:57, Trevor Bentley wrote: > Hello, > > I know this is more of a question for the PyInstaller mailing list, but > I wanted to check here and see if anyone has successfully used PyObjC > with PyInstaller? I haven't used PyInstaller, and don't even know what it is. > > I'm trying to create a PyInstaller package with PyTTSx (text-to-speech > module), which uses PyObjC, but it seems that some dynamic imports > related to the PyObjC "bridgesupport" module are failing. The > PyInstaller package is made successfully, but I get the following > exception at runtime: > > ------------------------------ > File > "/Users/<path>/pyinstaller/test/build/pyi.darwin/test/outPYZ1.pyz/pyttsx.engine", > line 45, in __init__ > File > "/Users/<path>/pyinstaller/test/build/pyi.darwin/test/outPYZ1.pyz/pyttsx.driver", > line 64, in __init__ > File "/Users/<path>/pyinstaller/PyInstaller/iu.py", line 431, in > importHook > mod = _self_doimport(nm, ctx, fqname) > ... > ... <lots of iu.py stuff> > ... > File > "/Users/<path>/pyinstaller/test/build/pyi.darwin/test/outPYZ1.pyz/CoreFoundation", > line 19, in <module> > File > "/Users/<path>/pyinstaller/test/build/pyi.darwin/test/outPYZ1.pyz/objc._bridgesupport", > line 156, in initFrameworkWrapper > File > "/Users/<path>/pyinstaller/test/build/pyi.darwin/test/outPYZ1.pyz/objc._bridgesupport", > line 58, in _parseBridgeSupport > ValueError: Don't know CF type for typestr '^{__CFAllocator=}', cannot > create special wrapper > ------------------------------ > > Any information on this would help! I'm willing to hack around dynamic > loading entirely if I can figure out a reasonable way. Does PyInstaller include package data? There should be bridgesupport files in the python package for Cocoa frameworks, that there should be a file named PyObjC.bridgesupport next to Foundation/__init__.py (and simularly for other frameworks). Ronald > > Thanks, > > Trevor > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |