From Chris.Barker at noaa.gov Tue Apr 1 00:43:54 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 31 Mar 2008 15:43:54 -0700 Subject: [Pythonmac-SIG] Trouble with py2app not building standalone on 10.5 Leopard In-Reply-To: <47F15947.6070508@codebykevin.com> References: <47F15947.6070508@codebykevin.com> Message-ID: <47F1692A.7000402@noaa.gov> Kevin Walzer wrote: > To get a truly standalone app bundle with py2app, you'll have to use a > separate build of Python, and wrap that. You can get this from > python.org. I think that build supports 10.3 and up (someone correct me > if I'm wrong). Yes, that's the solution. The Python.org build should bundle up and work on all OS-X 10.3.9 and up systems, PPC and Intel. You'll have to make sure you get all your needed modules installed into that python as Universal too. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From gary.bernhardt at gmail.com Tue Apr 1 03:44:27 2008 From: gary.bernhardt at gmail.com (Gary Bernhardt) Date: Mon, 31 Mar 2008 21:44:27 -0400 Subject: [Pythonmac-SIG] Trouble with py2app not building standalone on 10.5 Leopard In-Reply-To: <47F1692A.7000402@noaa.gov> References: <47F15947.6070508@codebykevin.com> <47F1692A.7000402@noaa.gov> Message-ID: <9c34c72e0803311844q3ffc6eebk612c8ba2a29f0ee5@mail.gmail.com> On 3/31/08, Christopher Barker wrote: > > Yes, that's the solution. The Python.org build should bundle up and work > on all OS-X 10.3.9 and up systems, PPC and Intel. Just to make sure I'm not confused: is it true that apps built with py2app on Leopard will work on Tiger, but only if they don't use PyObjC 2.0? (I'm still trying to sort this all out in my head. :) > You'll have to make sure you get all your needed modules installed into > that python as Universal too. -- Gary http://blog.extracheese.org From Chris.Barker at noaa.gov Tue Apr 1 05:08:56 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 31 Mar 2008 20:08:56 -0700 Subject: [Pythonmac-SIG] Trouble with py2app not building standalone on 10.5 Leopard In-Reply-To: <9c34c72e0803311844q3ffc6eebk612c8ba2a29f0ee5@mail.gmail.com> References: <47F15947.6070508@codebykevin.com> <47F1692A.7000402@noaa.gov> <9c34c72e0803311844q3ffc6eebk612c8ba2a29f0ee5@mail.gmail.com> Message-ID: <47F1A748.1070507@noaa.gov> Gary Bernhardt wrote: > Just to make sure I'm not confused: is it true that apps built with > py2app on Leopard will work on Tiger, but only if they don't use > PyObjC 2.0? (I'm still trying to sort this all out in my head. :) Not really. Apps build with py2app and the "macPython" build of python2.5 (which you can get from python.org) should work on OS-X 10.3.9 and above. I have no idea what version of PyObjC you can use. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception From hengist.podd at virgin.net Tue Apr 1 14:19:08 2008 From: hengist.podd at virgin.net (has) Date: Tue, 1 Apr 2008 13:19:08 +0100 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon (was: Re: Sending files to the trash) In-Reply-To: <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> Message-ID: <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> On 29 Mar 2008, at 09:11, Alex MacCaw wrote: > Thanks - that works. > I'm wondering how to get rid of the python rocket ship that appears > in the dock when I start sending applescript events. I've tried > deleting the object reference to app('Finder') but to no avail. The command line python interpreter automatically upgrades to a full GUI process whenever OS APIs linked to the Window Manager are called. In appscript's case, it uses the Carbon Process Manager to launch applications and obtain their process IDs. This behaviour is useful when running scripts that need to display dialogs, etc. to users, but it's a nuisance the rest of the time and is something I'd like to get rid of if possible. I'm stuffed for spare time at the moment, but if anyone else fancies rewriting the relevant code then do let me know. Cheers, has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From hengist.podd at virgin.net Tue Apr 1 14:23:37 2008 From: hengist.podd at virgin.net (has) Date: Tue, 1 Apr 2008 13:23:37 +0100 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon In-Reply-To: <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> Message-ID: On 1 Apr 2008, at 13:19, has wrote: > The command line python interpreter automatically upgrades to a full > GUI process whenever OS APIs linked to the Window Manager are > called. [...] As an addendum: Note that this isn't an issue with Ruby as the ruby interpreter only upgrades to a GUI process if you call TransformProcessType yourself. e.g. This is what rb-appscript's OSAX module does whenever it needs to display a dialog, and it works fine. With the general de-Macification of Python 3.0 being planned, I wonder if the python3.0 interpreter should take the same approach, leaving it up to individual modules to decide if and when they want a GUI connection? Anyone any thoughts? Regards, has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From ronaldoussoren at mac.com Tue Apr 1 17:22:51 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 1 Apr 2008 17:22:51 +0200 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon In-Reply-To: References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> Message-ID: <8ADFC5E4-5A13-43B0-9C9D-74A9BF1D0C3D@mac.com> On 1 Apr, 2008, at 14:23, has wrote: > > On 1 Apr 2008, at 13:19, has wrote: > >> The command line python interpreter automatically upgrades to a full >> GUI process whenever OS APIs linked to the Window Manager are >> called. [...] > > As an addendum: > > Note that this isn't an issue with Ruby as the ruby interpreter only > upgrades to a GUI process if you call TransformProcessType yourself. > e.g. This is what rb-appscript's OSAX module does whenever it needs to > display a dialog, and it works fine. > > With the general de-Macification of Python 3.0 being planned, I wonder > if the python3.0 interpreter should take the same approach, leaving it > up to individual modules to decide if and when they want a GUI > connection? Anyone any thoughts? My preference would be to have have modules "just work", that is I shouldn't have to call TransformProcessType myself but appscript and/ or the Carbon libraries should do that for me when necessary. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080401/1b72f9df/attachment.bin From kw at codebykevin.com Tue Apr 1 17:37:51 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 01 Apr 2008 11:37:51 -0400 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon In-Reply-To: References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> Message-ID: <47F256CF.6040605@codebykevin.com> has wrote: > > With the general de-Macification of Python 3.0 being planned, I wonder > if the python3.0 interpreter should take the same approach, leaving it > up to individual modules to decide if and when they want a GUI > connection? Anyone any thoughts? What does the "de-Macification" in Python 3.0 mean? Will the Carbon modules be removed? I'm curious because the Python program I currently develop calls into Carbon for a few things, and I'm mulling its future direction and design. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From kw at codebykevin.com Tue Apr 1 20:03:49 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Tue, 01 Apr 2008 14:03:49 -0400 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon In-Reply-To: <47F256CF.6040605@codebykevin.com> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> Message-ID: <47F27905.9010308@codebykevin.com> Kevin Walzer wrote: > > What does the "de-Macification" in Python 3.0 mean? Will the Carbon > modules be removed? > I've found the answer to my own question: http://www.python.org/dev/peps/pep-3108/ Yuk. Looks like I will have to remove the Carbon bits from my app at some point! -- Kevin Walzer Code by Kevin http://www.codebykevin.com From hengist.podd at virgin.net Tue Apr 1 20:32:24 2008 From: hengist.podd at virgin.net (has) Date: Tue, 1 Apr 2008 19:32:24 +0100 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon In-Reply-To: <47F256CF.6040605@codebykevin.com> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> Message-ID: On 1 Apr 2008, at 16:37, Kevin Walzer wrote: > What does the "de-Macification" in Python 3.0 mean? Will the Carbon > modules be removed? See: http://www.python.org/dev/peps/pep-3108/ I'm totally for their removal from the 3.0 stdlib, btw. They did their job in the day, but they've long since become deadweight on Python itself. If backwards-compatibility becomes an major concern for some folks I imagine they could rebundle the existing modules as a separate distribution. IMO though it'd make more sense for projects that need these modules to stick with 2.6, and for 3.0 users to kick off with a completely clean slate. Not that many folks use the Carbon wrappers, and a a lot of equivalent functionality is also available via PyObjC which is fully and actively supported and obviously the way the wind is blowing these days. In future, I think the simplest thing will be to create ObjC wrappers for any Carbon APIs you need, and access those via PyObjC. Such wrappers would have the additional benefit of being usable from any language with an ObjC bridge as well as ObjC itself, making them much more economical to develop and maintain. Incidentally, I'm already thinking of using objc-appscript to replace the lower-level py-appscript APIs in 3.0, with just the high-level API being implemented natively. e.g. See rb-cocoa-appscript in the appscript svn repository for an idea of how that'll work. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From hengist.podd at virgin.net Tue Apr 1 20:41:42 2008 From: hengist.podd at virgin.net (has) Date: Tue, 1 Apr 2008 19:41:42 +0100 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon In-Reply-To: <8ADFC5E4-5A13-43B0-9C9D-74A9BF1D0C3D@mac.com> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <8ADFC5E4-5A13-43B0-9C9D-74A9BF1D0C3D@mac.com> Message-ID: On 1 Apr 2008, at 16:22, Ronald Oussoren wrote: >> With the general de-Macification of Python 3.0 being planned, I >> wonder >> if the python3.0 interpreter should take the same approach, leaving >> it >> up to individual modules to decide if and when they want a GUI >> connection? Anyone any thoughts? > > My preference would be to have have modules "just work", that is I > shouldn't have to call TransformProcessType myself but appscript and/ > or the Carbon libraries should do that for me when necessary. Yep, this is what I meant - the goal being to put responsibility for this behaviour where it really belongs: with the modules that require it. Of course, it'll mean that any existing modules that expect a GUI connection by default will need updated to call TransformProcessType themselves. But given that such modules will almost certainly contain Mac-specific code anyway, it shouldn't be a big deal to add the extra call during their Python 3 upgrade. has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From hengist.podd at virgin.net Tue Apr 1 22:09:12 2008 From: hengist.podd at virgin.net (has) Date: Tue, 1 Apr 2008 21:09:12 +0100 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon In-Reply-To: <47F27905.9010308@codebykevin.com> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> Message-ID: <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> On 1 Apr 2008, at 19:03, Kevin Walzer wrote: >> What does the "de-Macification" in Python 3.0 mean? Will the Carbon >> modules be removed? > > I've found the answer to my own question: > > http://www.python.org/dev/peps/pep-3108/ > > Yuk. Looks like I will have to remove the Carbon bits from my app at > some point! Or just do what I did with appscript: fork off the bits you need and update them yourself. has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From ronaldoussoren at mac.com Thu Apr 3 14:11:41 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 3 Apr 2008 14:11:41 +0200 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon In-Reply-To: <47F256CF.6040605@codebykevin.com> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> Message-ID: <3A48DA62-FC8A-4B5F-A2EC-A05EE497C04B@mac.com> On 1 Apr, 2008, at 17:37, Kevin Walzer wrote: > has wrote: > >> >> With the general de-Macification of Python 3.0 being planned, I >> wonder >> if the python3.0 interpreter should take the same approach, leaving >> it >> up to individual modules to decide if and when they want a GUI >> connection? Anyone any thoughts? > > What does the "de-Macification" in Python 3.0 mean? Will the Carbon > modules be removed? > > I'm curious because the Python program I currently develop calls into > Carbon for a few things, and I'm mulling its future direction and > design. The current plan for Python 3.0 is to remove most of the mac-specific code from the stdlib. The main reason for that is lack of maintenance, but IMO platform bindings shouldn't be in the standard library anyway because that makes it impossible to adapt them to a changing platform in a timely manner. That is, even if the Carbon bindings were properly maintained we couldn't add Leopard bindings to the stdlib for Python 2.5.3 due to backward compatibility constraints. I'd like to see Carbon bindings in PyObjC, especially the bits that weren't deprecated years ago, because some things can only be done in Carbon and not Cocoa. To be honest I don't know if that will ever happen due to lack of time on my part. Ronald > > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080403/d957e7d1/attachment.bin From ronaldoussoren at mac.com Thu Apr 3 14:17:02 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 3 Apr 2008 14:17:02 +0200 Subject: [Pythonmac-SIG] eliminating appscript-triggered Dock icon In-Reply-To: <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> Message-ID: On 1 Apr, 2008, at 22:09, has wrote: > On 1 Apr 2008, at 19:03, Kevin Walzer wrote: > >>> What does the "de-Macification" in Python 3.0 mean? Will the Carbon >>> modules be removed? >> >> I've found the answer to my own question: >> >> http://www.python.org/dev/peps/pep-3108/ >> >> Yuk. Looks like I will have to remove the Carbon bits from my app at >> some point! > > > Or just do what I did with appscript: fork off the bits you need and > update them yourself. I'd prefer if we'd move the interesting bits of the Carbon bindings to their own package(s). One of the nice things of the current Carbon bindings is that a large portion of the API is just there and you probably don't have to write C code when you want to use an API. Sadly enough that's only true of API's that were present in OS9, but the idea stands: it would be nice to have complete bindings to the bits of Carbon that still make sense. IMHO that would exclude all GUI-related code, but I'm a bit biased ;-) Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080403/b0c86940/attachment.bin From hengist.podd at virgin.net Thu Apr 3 15:46:25 2008 From: hengist.podd at virgin.net (has) Date: Thu, 3 Apr 2008 14:46:25 +0100 Subject: [Pythonmac-SIG] Carbon bindings' future (was: Re: eliminating appscript-triggered Dock icon) In-Reply-To: References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> Message-ID: On 3 Apr 2008, at 13:17, Ronald Oussoren wrote: > > On 1 Apr, 2008, at 22:09, has wrote: >> On 1 Apr 2008, at 19:03, Kevin Walzer wrote: >> >> >>> Yuk. Looks like I will have to remove the Carbon bits from my app at >>> some point! >> >> Or just do what I did with appscript: fork off the bits you need and >> update them yourself. > > I'd prefer if we'd move the interesting bits of the Carbon bindings > to > their own package(s). As a long-term strategy for Python as a whole, sure. The above suggestion was for Kevin as a solution to his own more immediate needs. > One of the nice things of the current Carbon bindings > is that a large portion of the API is just there and you probably > don't have > to write C code when you want to use an API. > > Sadly enough that's only true of API's that were present in OS9, but > the > idea stands: it would be nice to have complete bindings to the bits of > Carbon that still make sense. Yes, although I'd repeat my earlier suggestion that the most economically viable way to provide Carbon bindings would be to create ObjC wrappers for the Carbon APIs of interest. That way, any language with ObjC bindings, not to mention ObjC itself, can take advantage of these bindings for no extra effort. The more folk you can get using an API, the more likely it is to be well maintained, documented and community supported. One of the reasons the Python Carbon bindings have fallen into disrepair is that there just isn't enough Python folk wanting to use them to justify their development and maintenance costs. Same with Apple's own Java- Cocoa bridge. Targeting ObjC and BridgeSupport to reach the widest possible audience should greatly reduce the risk of failure. Done well, it might even get picked up by Apple in a future OS release. > IMHO that would exclude all GUI-related > code, but I'm a bit biased ;-) I don't think you're being biased. It's just plain good sense to avoid the Carbon GUI APIs where possible now given Apple's own position on them. Other existing Python frameworks (PyObjC, wxPython, etc) already have this area well covered anyway. Cheers, has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From kw at codebykevin.com Thu Apr 3 16:15:19 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 03 Apr 2008 10:15:19 -0400 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> Message-ID: <47F4E677.6020404@codebykevin.com> has wrote: > > As a long-term strategy for Python as a whole, sure. The above > suggestion was for Kevin as a solution to his own more immediate needs. > Well, my commercial Python application isn't going to break tomorrow if I don't remove the Carbon bits, but it seems the long-term tides are running even more strongly against Carbon than I realized: --The removal of Carbon from the standard library in Python 3. I only depend on a little bit of this--the Carbon Help API's--but having that removed will require some adjustment. -- Someone has announced plans to port Tkinter, the GUI toolkit I use, to run on top of Cocoa--but this will probably break a *lot* of Carbon-dependent Tk libraries that I and other developers use. (See http://www.nabble.com/Re%3A-Tcl-Tk-on-the-iPhone-p16190616.html.) --From a karma standpoint, Adobe has just announced that a Cocoa port of Photoshop is underway. (See http://blogs.adobe.com/jnack/2008/04/photoshop_lr_64.html. ) I've kind of halted work on new versions of my program for the time being to improve my facility with ObjC--because, at a minimum, I may have to write the kinds of wrappers that has suggested, for Python and most likely Tcl as well. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From dvschorre at sbcglobal.net Thu Apr 3 20:14:58 2008 From: dvschorre at sbcglobal.net (Dewey V. Schorre) Date: Thu, 3 Apr 2008 11:14:58 -0700 Subject: [Pythonmac-SIG] Help getting started with py-appscript Message-ID: <74F7B29F-DC90-46DC-BCAE-55040C2B4B83@sbcglobal.net> I began by installing py-appscript like this: macpro-administrators-computer:~ val$ sudo easy_install appscript . . . Finished processing dependencies for appscript macpro-administrators-computer:~ val$ I thought that had worked, so I began the tutorial like this: macpro-administrators-computer:~ val$ python . . . >>> from appscript import * Traceback (most recent call last): File "", line 1, in ImportError: No module named appscript >>> Why did it say "No module named appscript"? How can I get this to work? Thanks for helping me get started. Dewey V. Schorre From jf at ai.univ-paris8.fr Fri Apr 4 11:52:33 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Fri, 4 Apr 2008 11:52:33 +0200 Subject: [Pythonmac-SIG] locating Python.h Message-ID: Hello: I need help to locate Python.h for including in a C program which I will turn into a module. The problem is I've accumulated 5 files with that name over the years: /Developer/SDKs/MacOSX10.3.9.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h /Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/Python.h /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h /System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3/Python.h Since the executable Python I use is in /Library/Frameworks/Python.framework/Versions/2.5/bin, I thought I better use the corresponding include file [i.e. the 4th one in the list above] but this gets me fatal errors at link time: /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: _main _PyArg_ParseTuple _Py_BuildValue _Py_InitModule4 collect2: ld returned 1 exit status What am I doing wrong? What's the best way to clean up that mess? Can somebody help me? -- Jym Feat ~ Paris FR 75018 From ronaldoussoren at mac.com Fri Apr 4 12:57:28 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 04 Apr 2008 03:57:28 -0700 Subject: [Pythonmac-SIG] locating Python.h In-Reply-To: References: Message-ID: <287B820B-0119-1000-C567-A232BE70DCAC-Webmail-10006@mac.com> On Friday, April 04, 2008, at 11:53AM, "Feat" wrote: > >What's the best way to clean up that mess? > >Can somebody help me? Use distutils to build python extensions (see the documentation on www.python.org to learn how to do that). This has two advantages over manually building an extension: distutils can also install the extension of you in the right location, and furthermore you no longer have worry about compiler/linker flags on the various platforms. Ronald From hengist.podd at virgin.net Fri Apr 4 13:45:46 2008 From: hengist.podd at virgin.net (has) Date: Fri, 4 Apr 2008 12:45:46 +0100 Subject: [Pythonmac-SIG] Help getting started with py-appscript In-Reply-To: References: Message-ID: <3A4A35B0-B349-414E-BD3D-A0A22FAF0074@virgin.net> Dewey V. Schorre wrote: > I began by installing py-appscript like this: > > macpro-administrators-computer:~ val$ sudo easy_install appscript > . . . > Finished processing dependencies for appscript > macpro-administrators-computer:~ val$ > > I thought that had worked, so I began the tutorial like this: > > macpro-administrators-computer:~ val$ python > . . . > >>> from appscript import * > Traceback (most recent call last): > File "", line 1, in > ImportError: No module named appscript > >>> > > Why did it say "No module named appscript"? How can I get this to > work? Do you have more than one copy of Python installed? If so, make sure that you've installed setuptools for the Python interpreter you're currently using. e.g. Leopard ships with Python 2.5.1 a copy of easy_install at /usr/ bin, but if you use a different Python installation then then you'll need to install setuptools for that yourself as the existing easy_install only works for Apple's Python. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From jf at ai.univ-paris8.fr Fri Apr 4 15:26:13 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Fri, 4 Apr 2008 15:26:13 +0200 Subject: [Pythonmac-SIG] locating Python.h In-Reply-To: <287B820B-0119-1000-C567-A232BE70DCAC-Webmail-10006@mac.com> References: <287B820B-0119-1000-C567-A232BE70DCAC-Webmail-10006@mac.com> Message-ID: At 03:57 -0700 2008/04/04, Ronald Oussoren wrote: >Use distutils to build python extensions Thanks Ronald: I've carefully read the section about building extensions, i.e. [http://docs.python.org/inst/tweak-flags.html ], but this doesn't tell me how to locate the right Python header file, so I'm still stuck with the original problem... which is how to refer to that file in a #include line inside my C program. I've followed step by step examples from "Core Python Programming" [Wesley J. Chun] and "Programming Python" [Mark Lutz]. They all fail from the beginning, precisely because of the improper included file. Any other suggestion to work it out? -- Jym Feat ~ Paris FR 75018 From skip at pobox.com Fri Apr 4 15:48:08 2008 From: skip at pobox.com (skip at pobox.com) Date: Fri, 4 Apr 2008 08:48:08 -0500 Subject: [Pythonmac-SIG] locating Python.h In-Reply-To: References: <287B820B-0119-1000-C567-A232BE70DCAC-Webmail-10006@mac.com> Message-ID: <18422.12696.17942.906398@montanaro-dyndns-org.local> Feat> I've carefully read the section about building extensions, ... Feat> but this doesn't tell me how to locate the right Python header Feat> file... Distutils takes care of that for you. All you should need to do is #include "Python.h" in your source. As you concluded, the correct one to use is the one which corresponds to the Python executable you're using. I believe distutils uses sys.exec_prefix and the version of the running Pyhon to get a base directory for the installation. From there it's just a hop, skip and jump to the installed Include directory which corresponds to that running executable. For example, for my current python, 2.6, I installed it in ~/local. That gives me an include file directory of ~/local/include/python2.6. -- Skip Montanaro - skip at pobox.com - http://www.webfast.com/~skip/ From jf at ai.univ-paris8.fr Fri Apr 4 16:02:29 2008 From: jf at ai.univ-paris8.fr (Feat) Date: Fri, 4 Apr 2008 16:02:29 +0200 Subject: [Pythonmac-SIG] locating Python.h Message-ID: At 08:48 -0500 2008/04/04, skip at pobox.com wrote: >Distutils takes care of that for you. All you should need to do is #include "Python.h" in your source. Okay, I'll try that again: thank you so much. -- Jym Feat ~ Paris FR 75018 From Chris.Barker at noaa.gov Fri Apr 4 18:50:30 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 04 Apr 2008 09:50:30 -0700 Subject: [Pythonmac-SIG] Odd py2app issue Message-ID: <47F65C56.4070007@noaa.gov> Hi all, I've got an app (wxPython based) that I've been successfully py2apping for a while. I just tweaked the code a bit, and tried to build it again, and got: /usr/bin/strip: the __LINKEDIT segment does not cover the end of the file (can't be processed) in: /Users/cbarker/HAZMAT/UnitConversion/dist/Converter.app/Contents/Frameworks/libwx_macud-2.8.0.dylib (for architecture ppc) And the resulting application crashes: ImportError: dlopen(/Users/cbarker/HAZMAT/UnitConversion/dist/Converter.app/Contents/Resources/lib/python2.5/lib-dynload/wx/_core_.so, 2): bad external relocation length If I delete the old *.app, and build again it works fine, so it's easy to work around, but this does smell like a bug. OS-X 10.4.11 MacPython 2.5.1 wxPython 2.8.7 py2app 0.3.6 macholib dev version as of 3/27/08 -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From geometrian at gmail.com Fri Apr 4 19:00:41 2008 From: geometrian at gmail.com (Ian Mallett) Date: Fri, 4 Apr 2008 10:00:41 -0700 Subject: [Pythonmac-SIG] py2app on windows Message-ID: Hello, -I have a windows machine, but I want to write mac programs. -I looked around, and was told that py2app doesn't work on windows. -I have only a windows machine, so I need a way around. Ian From mike.spamfree at yahoo.com Fri Apr 4 19:35:12 2008 From: mike.spamfree at yahoo.com (anonymous user) Date: Fri, 4 Apr 2008 10:35:12 -0700 (PDT) Subject: [Pythonmac-SIG] newbie py2app problem - "ImportError: no module named code" Message-ID: <130588.13474.qm@web58901.mail.re1.yahoo.com> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080404/a66ce581/attachment.htm From kw at codebykevin.com Fri Apr 4 19:47:27 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Fri, 04 Apr 2008 13:47:27 -0400 Subject: [Pythonmac-SIG] py2app on windows In-Reply-To: References: Message-ID: <47F669AF.6020905@codebykevin.com> Ian Mallett wrote: > Hello, > -I have a windows machine, but I want to write mac programs. > -I looked around, and was told that py2app doesn't work on windows. > -I have only a windows machine, so I need a way around. > Ian > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > > The simplest answer is: get a Mac. py2app doesn't work on Windows. The less simple answer is, write your code on Windows and distribute as source code only. You won't get an app bundle or shiny icon, but if you are using platform-neutral bits (i.e. it's pure Python), you should be fine. -- Kevin Walzer Code by Kevin http://www.codebykevin.com From Chris.Barker at noaa.gov Fri Apr 4 20:13:58 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 04 Apr 2008 11:13:58 -0700 Subject: [Pythonmac-SIG] py2app on windows In-Reply-To: References: Message-ID: <47F66FE6.9090404@noaa.gov> Ian Mallett wrote: > -I looked around, and was told that py2app doesn't work on windows. > -I have only a windows machine, so I need a way around. In theory, one could make a version of py2app that you could run on windows, an build apps for the Mac. However, no one has done so, and the truth is that you'd really need to test on a Mac anyway, so there is little point. If you have users on a Mac, you'll be best off finding a couple of them that don't mind being on the "bleeding edge" and testing stuff for you, including running py2app. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Fri Apr 4 20:29:31 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 04 Apr 2008 11:29:31 -0700 Subject: [Pythonmac-SIG] newbie py2app problem - "ImportError: no module named code" In-Reply-To: <130588.13474.qm@web58901.mail.re1.yahoo.com> References: <130588.13474.qm@web58901.mail.re1.yahoo.com> Message-ID: <47F6738B.7040205@noaa.gov> anonymous user wrote: > Using: > OS X 10.4.11 > py2app 0.3.6 and also tried the latest from svn I've got the same setup working well. > from wx import * A note here -- you really don't want to do "import *", but I doubt that's your issue. > File > "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/py/__init__.py", Here's a slight difference -- I use the unicode build, but again, probably not the issue. > "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/py/interpreter.py", > line 9, in > from code import InteractiveInterpreter > ImportError: No module named code > 2008-04-01 11:30:14.958 driver[1109] driver Error > 2008-04-01 11:30:14.959 driver[1109] driver Error code is part of the standard library. I suspect that it isn't picked up by py2app, because you haven't imported it in any of your code, or in code that you import. Try: adding an explicit import in one of your files: import code or: if False: import code That will keep it from getting imported, but will "fool" py2app into including it. You can also add it to the list of extra modules you want py2app to include: OPTIONS = {'argv_emulation': True, 'modules' : ['code']} (not tested) > Why it seems to be grabbing wx libraries from the system > folder, rather than from dist. actually, it should be running the wx package from the app bundle, but it could keep the old path around, I'm not sure about that. > which I modified to include "wx" as a package. That shouldn't be required. if you've imported wx, py2app should pick that up, and the wx recipe should "do the right thing" -- it's always worked for me. Try it without specifying that package. Let us know how it works out... -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From dvschorre at sbcglobal.net Fri Apr 4 21:35:31 2008 From: dvschorre at sbcglobal.net (Dewey V. Schorre) Date: Fri, 4 Apr 2008 12:35:31 -0700 Subject: [Pythonmac-SIG] Help getting started with py-appscript In-Reply-To: <3A4A35B0-B349-414E-BD3D-A0A22FAF0074@virgin.net> References: <3A4A35B0-B349-414E-BD3D-A0A22FAF0074@virgin.net> Message-ID: <02A3F9E7-08B0-4C57-9446-AE6D3B4DC86B@sbcglobal.net> On Apr 4, 2008, at 4:45 AM, has wrote: > Dewey V. Schorre wrote: > >> I began by installing py-appscript like this: >> >> macpro-administrators-computer:~ val$ sudo easy_install appscript >> . . . >> Finished processing dependencies for appscript >> macpro-administrators-computer:~ val$ >> >> I thought that had worked, so I began the tutorial like this: >> >> macpro-administrators-computer:~ val$ python >> . . . >> >>> from appscript import * >> Traceback (most recent call last): >> File "", line 1, in >> ImportError: No module named appscript >> >>> >> >> Why did it say "No module named appscript"? How can I get this to >> work? > > > Do you have more than one copy of Python installed? If so, make sure > that you've installed setuptools for the Python interpreter you're > currently using. > > e.g. Leopard ships with Python 2.5.1 a copy of easy_install at /usr/ > bin, but if you use a different Python installation then then you'll > need to install setuptools for that yourself as the existing > easy_install only works for Apple's Python. > > HTH > > has > -- > My only copy of Python is MacPython 2.5 in my application folder. I find the following file: /Library/Python/2.5/site-packages/appscript-0.18.1-py2.5-macosx-10.5- i386.egg Using IDLE to run Python, I am able to import files that are in my documents folder and end with .py. I would think that I need a file named appscript.py in my documents folder, but the easy_install of appscript did not create a file with that name. I don't understand what an .egg file is. I appreciate your help. Val -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080404/b86c53be/attachment.htm From mike.spamfree at yahoo.com Fri Apr 4 22:40:17 2008 From: mike.spamfree at yahoo.com (anonymous user) Date: Fri, 4 Apr 2008 13:40:17 -0700 (PDT) Subject: [Pythonmac-SIG] newbie py2app problem - "ImportError: no module named code" In-Reply-To: <47F6738B.7040205@noaa.gov> Message-ID: <506445.94474.qm@web58915.mail.re1.yahoo.com> Hi Chris, Thanks for the response! I actually used one of your older posts from 2006 to help get me started with py2app, so I'm doubly indebted. > That shouldn't be required. if you've imported wx, > py2app should pick > that up, and the wx recipe should "do the right > thing" -- it's always > worked for me. Try it without specifying that package. > > Let us know how it works out... > http://mail.python.org/mailman/listinfo/pythonmac-sig Ok, so the reason I originally explicitly listed wx as a package is because I got the following error when running the .dmg file using the "raw" setup.py script straight out of py2applet: Traceback (most recent call last): File "/Users/pekalmj1/tmp/foo2/dist/driver.app/Contents/Resources/__boot__.py", line 137, in _run('driver.py') File "/Users/pekalmj1/tmp/foo2/dist/driver.app/Contents/Resources/__boot__.py", line 134, in _run execfile(path, globals(), globals()) File "/Users/pekalmj1/tmp/foo2/dist/driver.app/Contents/Resources/driver.py", line 14, in from wx import * AttributeError: 'module' object has no attribute 'build' 2008-04-04 16:31:31.999 driver[3152] driver Error 2008-04-04 16:31:32.000 driver[3152] driver Error An unexpected error has occurred during execution of the main script AttributeError: 'module' object has no attribute 'build' I had no idea what this meant, and assumed it had something to do with needing to specify wx as a package explicitly. Based on your feedback, I went back and changed my "from wx import *" to a "import wx" (which, as you pointed out, I should have done in the first place). The resulting .dmg seems to work! I haven't yet tried dropping the dmg on another platform to ensure that it's not really still picking up my locally installed wx libs behind the scenes, but this definitely seems to have repaired the import code problem. Thanks again for your time - I think I would have just punted on this without your help! mike ____________________________________________________________________________________ You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost. http://tc.deals.yahoo.com/tc/blockbuster/text5.com From Chris.Barker at noaa.gov Fri Apr 4 23:17:11 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 04 Apr 2008 14:17:11 -0700 Subject: [Pythonmac-SIG] newbie py2app problem - "ImportError: no module named code" In-Reply-To: <506445.94474.qm@web58915.mail.re1.yahoo.com> References: <506445.94474.qm@web58915.mail.re1.yahoo.com> Message-ID: <47F69AD7.1020102@noaa.gov> anonymous user wrote: > Thanks for the response! I actually used one of your older posts > from 2006 to help get me started with py2app, so I'm doubly indebted. > no problem, I've been there. > I haven't yet tried > dropping the dmg on another platform to ensure that it's not really > still picking up my locally installed wx libs behind the scenes, well, it should be close to 40 MB -- yes, that's huge, but you've got all of Python, all of wxWidgets and wxPython, all as Universal. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Sat Apr 5 01:40:48 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 04 Apr 2008 16:40:48 -0700 Subject: [Pythonmac-SIG] PIL for OS-X Message-ID: <47F6BC80.6010204@noaa.gov> Hi all, There's been a discussion over on the Image-sig about what the PIL web site should tell folks that want PIL for OS-X. There have simply been too many "I'm having trouble building PIL on OS-X" questions. I've suggested that the PIL website include binaries for the "best" versions of Python to support. Fredrik can't build them, but hopefully someone on this list can do it for him when a new PIL version comes out -- the 1.1.6 binary on pythonmac.org/packages is a good start. However, it's not so simple, 'cause of all the Python's out there. So my question is: Can we build a single binary installer for PIL that will work with BOTH Apple's Python2.5 that comes with OS-X 10.5 and MacPython2.5, Universal Framework Build for OS-X 10.3.9 and above. I think those are the most critical to support, and it would be great if we could do it with one installer. Next in line would be MacPython2.4, I think, but I notice that the package on pythonmac.org/packages is out of date, so there must not be too much demand. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From robin at alldunn.com Sat Apr 5 08:55:41 2008 From: robin at alldunn.com (Robin Dunn) Date: Fri, 04 Apr 2008 23:55:41 -0700 Subject: [Pythonmac-SIG] newbie py2app problem - "ImportError: no module named code" In-Reply-To: <506445.94474.qm@web58915.mail.re1.yahoo.com> References: <506445.94474.qm@web58915.mail.re1.yahoo.com> Message-ID: <47F7226D.6080006@alldunn.com> anonymous user wrote: > Traceback (most recent call last): > File "/Users/pekalmj1/tmp/foo2/dist/driver.app/Contents/Resources/__boot__.py", line 137, in > _run('driver.py') > File "/Users/pekalmj1/tmp/foo2/dist/driver.app/Contents/Resources/__boot__.py", line 134, in _run > execfile(path, globals(), globals()) > File "/Users/pekalmj1/tmp/foo2/dist/driver.app/Contents/Resources/driver.py", line 14, in > from wx import * > AttributeError: 'module' object has no attribute 'build' > 2008-04-04 16:31:31.999 driver[3152] driver Error > 2008-04-04 16:31:32.000 driver[3152] driver Error > An unexpected error has occurred during execution of the main script > > AttributeError: 'module' object has no attribute 'build' > It should work if you use "import wx" and not "from wx import *". The problem has something to do with the build subpackage being included in the __all__ list in wx/__init__.py, but since doing the import "properly" avoids the problem I haven't worried about it very much. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! From matthias.baas at gmail.com Sat Apr 5 11:53:36 2008 From: matthias.baas at gmail.com (Matthias Baas) Date: Sat, 05 Apr 2008 10:53:36 +0100 Subject: [Pythonmac-SIG] locating Python.h In-Reply-To: <18422.12696.17942.906398@montanaro-dyndns-org.local> References: <287B820B-0119-1000-C567-A232BE70DCAC-Webmail-10006@mac.com> <18422.12696.17942.906398@montanaro-dyndns-org.local> Message-ID: <47F74C20.8060706@gmail.com> skip at pobox.com wrote: > Feat> I've carefully read the section about building extensions, ... > Feat> but this doesn't tell me how to locate the right Python header > Feat> file... > > Distutils takes care of that for you. All you should need to do is > > #include "Python.h" > > in your source. As you concluded, the correct one to use is the one which > corresponds to the Python executable you're using. I believe distutils uses > sys.exec_prefix and the version of the running Pyhon to get a base directory > for the installation. From there it's just a hop, skip and jump to the > installed Include directory which corresponds to that running executable. Just for the record, the distutils have a function that returns the include path: >>> import distutils.sysconfig >>> distutils.sysconfig.get_python_inc() '/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5' So if you really need to know the include path for some reason, you should use this function as it is platform independent. But as was said above, when compiling an extension module adding this path manually is not required. - Matthias - From hengist.podd at virgin.net Sat Apr 5 15:28:46 2008 From: hengist.podd at virgin.net (has) Date: Sat, 5 Apr 2008 14:28:46 +0100 Subject: [Pythonmac-SIG] Help getting started with py-appscript In-Reply-To: References: Message-ID: Dewey V. Schorre wrote: > My only copy of Python is MacPython 2.5 in my application folder. That's just the GUI utilities that come with the third-party Python 2.5 distribution from python.org; the Python framework itself, which includes its command line tools, is installed under /Library/Frameworks. There's also a copy of Python 2.5 included in Leopard as standard, so you actually have two Python 2.5 installations on your machine. > I find the following file: > > /Library/Python/2.5/site-packages/appscript-0.18.1-py2.5- > macosx-10.5-i386.egg Yep, this is where Apple's Python keeps third-party modules (the framework itself is under /System so it doesn't get fiddled with). Setuptools and easy_install are included with Leopard's Python, but aren't included in the third-party distributions so must be installed separately for those. You have two options: 1. Uninstall your own Python 2.5 installation and use Apple's (slightly older) version. 2. Install setuptools for your third-party Python: http://pypi.python.org/pypi/setuptools > I don't understand what an .egg file is. It's the module packaging format used by setuptools. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From hengist.podd at virgin.net Sat Apr 5 15:36:13 2008 From: hengist.podd at virgin.net (has) Date: Sat, 5 Apr 2008 14:36:13 +0100 Subject: [Pythonmac-SIG] Mac Python FAQ? Message-ID: Hi all, Just wondering if there's an up-to-date FAQ/troubleshooting page available for OS X-based Python users? For example, the adjoining "Help getting started with py-appscript" thread was really a general Python/OS X issue, not an appscript- specific one, so I'd like to add a "New to Python and need help?" link to the appscript site for benefit of newcomers. Ta, has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From hraban at fiee.net Sat Apr 5 16:06:31 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sat, 5 Apr 2008 16:06:31 +0200 Subject: [Pythonmac-SIG] Mac Python FAQ? In-Reply-To: References: Message-ID: <34871D31-14DC-4714-8744-B9BDEE055789@fiee.net> Am 2008-04-05 um 15:36 schrieb has: > Just wondering if there's an up-to-date FAQ/troubleshooting page > available for OS X-based Python users? > > For example, the adjoining "Help getting started with py-appscript" > thread was really a general Python/OS X issue, not an appscript- > specific one, so I'd like to add a "New to Python and need help?" link > to the appscript site for benefit of newcomers. I guess it should go here: http://wiki.python.org/moin/MacPython/FAQ Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From khorton01 at rogers.com Mon Apr 7 02:50:06 2008 From: khorton01 at rogers.com (Kevin Horton) Date: Sun, 6 Apr 2008 20:50:06 -0400 Subject: [Pythonmac-SIG] Double-clickable wxpython application? Message-ID: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> I've created a small wxpython application to perform a particular function that my wife wants. It uses the standard Apple python and wxpython, and works great if I start it from Terminal.app. But, she is not keen on using the command line, so I hope to find a way so she can double click on something to start this application. I've tried AppleScript, and I've tried to save a Terminal.app command file, , and Platypus, but none of them has worked, quite probably because I haven't yet found the magic hints on what I need to do to make this work. What are the simplest ways to make a double-clickable interface to a wxpython application? I don't need to actually include python or wxpython in the application, as they are already resident on her computer. Thanks, -- Kevin Horton Ottawa, Canada From hraban at fiee.net Mon Apr 7 12:57:16 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Mon, 7 Apr 2008 12:57:16 +0200 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> Message-ID: <954f61110804070357j3f8b82e9la34f5757e3047cb8@mail.gmail.com> 2008/4/7, Kevin Horton : > I've created a small wxpython application to perform a particular > function that my wife wants. It uses the standard Apple python and > wxpython, and works great if I start it from Terminal.app. But, she > is not keen on using the command line, so I hope to find a way so she > can double click on something to start this application. I've tried > AppleScript, and I've tried to save a Terminal.app command file, , > and Platypus, but none of them has worked, quite probably because I > haven't yet found the magic hints on what I need to do to make this > work. > > What are the simplest ways to make a double-clickable interface to a > wxpython application? I don't need to actually include python or > wxpython in the application, as they are already resident on her > computer. Just put an alias to your python file on the Desktop. On doubleclick it starts Terminal, but it works. There's also Platypus to wrap any script, see http://www.sveinbjorn.org/platypus The "big" solution is py2app. Greetlings, Hraban From joerg.birkhold at gmail.com Mon Apr 7 17:24:30 2008 From: joerg.birkhold at gmail.com (=?ISO-8859-1?Q?J=F6rg_Birkhold?=) Date: Mon, 7 Apr 2008 17:24:30 +0200 Subject: [Pythonmac-SIG] PIL and py2app on Leopard Message-ID: Hi there, I'm about diving into python ;-) And I have script creating some jpeg thumbnails form pngs working fine so far. I tried to run py2app on it but when I try to execute the app i get the error that the module Image can't be found. But the output in the terminal says something about processing PIL??? Any help is very appreciated! I use the Leopard default installation of python and developer tools. Thanks + Greetz Joerg From cpu.crazy at gmail.com Mon Apr 7 02:08:46 2008 From: cpu.crazy at gmail.com (Joseph Quigley) Date: Sun, 6 Apr 2008 18:08:46 -0600 Subject: [Pythonmac-SIG] py2applet doesn't create a setup.py file on game made with pygame Message-ID: <66ca60fc0804061708i630d5387he36627b395486349@mail.gmail.com> Hi,I'm trying to make a .app of our pyweek game that uses pygame. I'm following the instructions on http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html#id7 that says: py2applet --make-setup MyApplication.py But when I run that I get the error: *** creating application bundle: run_game *** error: can't copy '/Users/jayne/Desktop/roger-robot/--make-setup': doesn't exist or not a regular file When I run py2applet without the --make-setup argument I get a .app that only has the run_game.py file. I copied the other python folders into run_game.app/Contents/Resources but when I run the .app I get the error: ImportError: No module named pygame How can I get py2applet to create a setup file, and/or include pygame into the .app? Thanks, Joe -- All Your Base Are Belong To Us!!! chown -r us ./base "After three days without programming, life becomes meaningless.'' -- Tao of Programming Book 2 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080406/9efa56e9/attachment.htm From khorton01 at rogers.com Tue Apr 8 02:40:42 2008 From: khorton01 at rogers.com (Kevin Horton) Date: Mon, 7 Apr 2008 20:40:42 -0400 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <954f61110804070357j3f8b82e9la34f5757e3047cb8@mail.gmail.com> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <954f61110804070357j3f8b82e9la34f5757e3047cb8@mail.gmail.com> Message-ID: <794D178E-0913-4704-9EFB-541F75A8CCAF@rogers.com> On 7-Apr-08, at 06:57 , Henning Hraban Ramm wrote: > 2008/4/7, Kevin Horton : >> I've created a small wxpython application to perform a particular >> function that my wife wants. It uses the standard Apple python and >> wxpython, and works great if I start it from Terminal.app. But, she >> is not keen on using the command line, so I hope to find a way so she >> can double click on something to start this application. I've tried >> AppleScript, and I've tried to save a Terminal.app command file, , >> and Platypus, but none of them has worked, quite probably because I >> haven't yet found the magic hints on what I need to do to make this >> work. >> >> What are the simplest ways to make a double-clickable interface to a >> wxpython application? I don't need to actually include python or >> wxpython in the application, as they are already resident on her >> computer. > > Just put an alias to your python file on the Desktop. > On doubleclick it starts Terminal, but it works. I don't know why, but this does not work for me. In my account nothing happens, and no messages in Console.app giving a clue why. I restarted the computer, and created a brand new user account, with admin priviledges. In that account, if I double the script file, or an alias, Terminal starts, I see that it runs "/path/to/my script ; exit;". The wxpython application does not start. It does run normally if I start it manually from the command line in Terminal. I tried doubleclicking the script file on another Mac, and I get the identical result as I did on the fresh user account on the first Mac - i.e. the script is called, but immediately exits, and the application does not start. It is quite possible that I have done something non-standard in my script that is at fault here, but I have no clue on what to look for. > There's also Platypus to wrap any script, see http:// > www.sveinbjorn.org/platypus I tried that on both Macs - the Platypus wrapper application starts, but the wxpython application does not start. > The "big" solution is py2app. I was hoping to find a smaller solution. I took a quick look at the py2app docs, and was quite befuddled. I have to assume that I have done something very non-standard either in my script, or my environment. But I have no idea what to look for. I also received a private e-mail suggesting a simple bundling solution. I'll try tha t and report back if it works. Thanks, -- Kevin Horton Ottawa, Canada From ronaldoussoren at mac.com Tue Apr 8 12:55:37 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Tue, 8 Apr 2008 12:55:37 +0200 Subject: [Pythonmac-SIG] PIL for OS-X In-Reply-To: <47F6BC80.6010204@noaa.gov> References: <47F6BC80.6010204@noaa.gov> Message-ID: <793A33FC-A504-48E8-95EE-158B8B51E374@mac.com> On 5 Apr, 2008, at 1:40, Christopher Barker wrote: > Hi all, > > There's been a discussion over on the Image-sig about what the PIL web > site should tell folks that want PIL for OS-X. There have simply been > too many "I'm having trouble building PIL on OS-X" questions. > > I've suggested that the PIL website include binaries for the "best" > versions of Python to support. Fredrik can't build them, but hopefully > someone on this list can do it for him when a new PIL version comes > out > -- the 1.1.6 binary on pythonmac.org/packages is a good start. > > However, it's not so simple, 'cause of all the Python's out there. > So my > question is: > > Can we build a single binary installer for PIL that will work with > BOTH > Apple's Python2.5 that comes with OS-X 10.5 and MacPython2.5, > Universal > Framework Build for OS-X 10.3.9 and above. Not really, you'll have to provide two installers. BTW. What I'd like to see is a collection of recipes for building packages like this. That is, a Makefile/shell-script/python-script/... that will build all dependencies, the package itself and an installer. That's the most annoying issue with the pythonmac.org repository: some packages are non-trivial to rebuild (such as PyOpenGL 2.x) and there is no indication whatsover of how they were build. That's not very interesting for users, until it is time to build a binary for the next version and someone has to reinvent the proper build proces. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080408/1fbc5923/attachment.bin From zabaione at uk2.net Tue Apr 8 16:26:22 2008 From: zabaione at uk2.net (Martin Dunschen) Date: Tue, 08 Apr 2008 15:26:22 +0100 Subject: [Pythonmac-SIG] PIL and py2app on Leopard In-Reply-To: References: Message-ID: <47FB808E.3050609@uk2.net> PIL stands for "Python Imaging Library". "Image" is the module you import to use this library. In your setup.py you need to make sure that the "Image" module is included in building the app. Read the documentation to py2app (or py2exe) to find how you can ensure that this module will be included in the modules your application depends on: I think you've got to use something like this: setup( options=dict( py2app=dict( ... packages='wx, PIL', ... in your setup.py file. This says that you want the packages wx and PIL (Image module) included in your distribution (the application). Hope this helps, Martin From hraban at fiee.net Tue Apr 8 21:38:22 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Tue, 8 Apr 2008 21:38:22 +0200 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <794D178E-0913-4704-9EFB-541F75A8CCAF@rogers.com> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <954f61110804070357j3f8b82e9la34f5757e3047cb8@mail.gmail.com> <794D178E-0913-4704-9EFB-541F75A8CCAF@rogers.com> Message-ID: <42135292-7D87-490F-AA7C-4845529DD764@fiee.net> Am 2008-04-08 um 02:40 schrieb Kevin Horton: >> >> Just put an alias to your python file on the Desktop. >> On doubleclick it starts Terminal, but it works. > I don't know why, but this does not work for me. In my account > nothing happens, and no messages in Console.app giving a clue why. I > restarted the computer, and created a brand new user account, with > admin priviledges. In that account, if I double the script file, or > an alias, Terminal starts, I see that it runs "/path/to/my script ; > exit;". The wxpython application does not start. It does run > normally if I start it manually from the command line in Terminal. > > I tried doubleclicking the script file on another Mac, and I get the > identical result as I did on the fresh user account on the first Mac > - i.e. the script is called, but immediately exits, and the > application does not start. > > It is quite possible that I have done something non-standard in my > script that is at fault here, but I have no clue on what to look for. Try to map *.py on Python Launcher. And I guess it helps if you make your script executable (chmod a+x) and have a working shebang line like this: #!/usr/bin/env python >> There's also Platypus to wrap any script, see http:// >> www.sveinbjorn.org/platypus > I tried that on both Macs - the Platypus wrapper application starts, > but the wxpython application does not start. I never tried Platypus with wxPython, sorry. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From khorton01 at rogers.com Wed Apr 9 02:54:49 2008 From: khorton01 at rogers.com (Kevin Horton) Date: Tue, 8 Apr 2008 20:54:49 -0400 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <42135292-7D87-490F-AA7C-4845529DD764@fiee.net> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <954f61110804070357j3f8b82e9la34f5757e3047cb8@mail.gmail.com> <794D178E-0913-4704-9EFB-541F75A8CCAF@rogers.com> <42135292-7D87-490F-AA7C-4845529DD764@fiee.net> Message-ID: On 8 Apr 2008, at 15:38, Henning Hraban Ramm wrote: > Try to map *.py on Python Launcher. I didn't even know PythonLauncher.app existed, but SpotLight found it, and I did the mapping. PythonLauncher from Apple's python 2.3 on OS 10.4 didn't work, but the one from MacPython 2.5 did work. At least this worked on my machine, running 10.4. But, on my wife's machine, running 10.5, where this script will live once it is polished up, PythonLauncher will not do the job. It starts, then a Terminal window opens, then PythonLauncher quits. I tried with both the system python, and with MacPython. I tried logging out, and back in, but that did not help. I'll play with this some more tomorrow evening. > And I guess it helps if you make your script executable (chmod a+x) > and have a working shebang line like this: > > #!/usr/bin/env python Already done. Thanks for your assistance. Best regards, -- Kevin Horton Ottawa, Canada From ronaldoussoren at mac.com Wed Apr 9 07:56:47 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Wed, 9 Apr 2008 07:56:47 +0200 Subject: [Pythonmac-SIG] Carbon bindings' future (was: Re: eliminating appscript-triggered Dock icon) In-Reply-To: References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> Message-ID: <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> On 3 Apr, 2008, at 15:46, has wrote: > > >> One of the nice things of the current Carbon bindings >> is that a large portion of the API is just there and you probably >> don't have >> to write C code when you want to use an API. >> >> Sadly enough that's only true of API's that were present in OS9, but >> the >> idea stands: it would be nice to have complete bindings to the bits >> of >> Carbon that still make sense. > > Yes, although I'd repeat my earlier suggestion that the most > economically viable way to provide Carbon bindings would be to create > ObjC wrappers for the Carbon APIs of interest. That way, any language > with ObjC bindings, not to mention ObjC itself, can take advantage of > these bindings for no extra effort. I'm far from convinced that this is true. The bridgesupport tools don't target Objective-C exclusively but can also be used to wrap C API's. The only problem w.r.t. Carbon might be the arcane memory- management rules of Carbon. I'm not sure if that's relevant for the non-GUI bits of Carbon. Even then it should be possible to extend the bridgesupport tools a little with annotations that tell bridges that a specific type is a Carbon-style handle. Even fixing bgen isn't that much work, once you understand the code. The problem is that bgen is a nearly vertical learning curve and Jack seems to be the only person that understands enough of bgen to be able to hack on it. I'm definitely in favor of ditching bgen and moving toward PyObjC-based wrappers. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080409/8c14b884/attachment.bin From joerg.birkhold at gmail.com Wed Apr 9 10:51:30 2008 From: joerg.birkhold at gmail.com (=?ISO-8859-1?Q?J=F6rg_Birkhold?=) Date: Wed, 9 Apr 2008 10:51:30 +0200 Subject: [Pythonmac-SIG] PIL and py2app on Leopard In-Reply-To: <47FB808E.3050609@uk2.net> References: <47FB808E.3050609@uk2.net> Message-ID: <3CFE7234-12DF-4A36-B0DE-5616734D91A0@gmail.com> hello, i tried this but still got the same error. in my code i use: from PIL import Image my setup.py: from setuptools import setup setup( app=["converter.py"], setup_requires=["py2app"], options=dict(py2app=dict(packages='PIL',)), ) in the terminal i get: *** using recipe: PIL *** that looks ok but still that line throws an error: from PIL import Image any ideas? thanks a lot joerg Am 08.04.2008 um 16:26 schrieb Martin Dunschen: > PIL stands for "Python Imaging Library". "Image" is the module you > import to use this library. > > In your setup.py you need to make sure that the "Image" module is > included in building the app. Read the documentation to py2app (or > py2exe) to find how you can ensure that this module will be included > in > the modules your application depends on: I think you've got to use > something like this: > > setup( > options=dict( > py2app=dict( > ... > packages='wx, PIL', > ... > > > in your setup.py file. This says that you want the packages wx and PIL > (Image module) included in your distribution (the application). > > Hope this helps, > > Martin > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From zabaione at uk2.net Wed Apr 9 13:20:56 2008 From: zabaione at uk2.net (Martin Dunschen) Date: Wed, 09 Apr 2008 12:20:56 +0100 Subject: [Pythonmac-SIG] PIL and py2app on Leopard In-Reply-To: References: Message-ID: <47FCA698.104@uk2.net> The recommendation is to import like this: import Image ... not from PIL import Image ... This reqires that PYTHONPATH is set up to find the module. PIL should be in your PYTHONPATH environment variable. Test this: import sys print sys.path and see if PIL is somewhere in there. When you run setup.py, does it find the module Image? Check the output. Put some debug code into the script: print the path for example from your application. I take it that if you run your python without wrapping it into an application everything works as expected? Martin > > Subject: > Re: [Pythonmac-SIG] PIL and py2app on Leopard > From: > Martin Dunschen > Date: > Tue, 08 Apr 2008 15:26:22 +0100 > To: > pythonmac-sig at python.org > > To: > pythonmac-sig at python.org > > > PIL stands for "Python Imaging Library". "Image" is the module you > import to use this library. > > In your setup.py you need to make sure that the "Image" module is > included in building the app. Read the documentation to py2app (or > py2exe) to find how you can ensure that this module will be included in > the modules your application depends on: I think you've got to use > something like this: > > setup( > options=dict( > py2app=dict( > ... > packages='wx, PIL', > ... > > > in your setup.py file. This says that you want the packages wx and PIL > (Image module) included in your distribution (the application). > > Hope this helps, > > Martin > > > ------------------------------------------------------------------------ > > Subject: > Re: [Pythonmac-SIG] Double-clickable wxpython application? > From: > Henning Hraban Ramm > Date: > Tue, 8 Apr 2008 21:38:22 +0200 > To: > pythonmac-sig at python.org > > To: > pythonmac-sig at python.org > > > Am 2008-04-08 um 02:40 schrieb Kevin Horton: >>> >>> Just put an alias to your python file on the Desktop. >>> On doubleclick it starts Terminal, but it works. >> I don't know why, but this does not work for me. In my account >> nothing happens, and no messages in Console.app giving a clue why. I >> restarted the computer, and created a brand new user account, with >> admin priviledges. In that account, if I double the script file, or >> an alias, Terminal starts, I see that it runs "/path/to/my script ; >> exit;". The wxpython application does not start. It does run >> normally if I start it manually from the command line in Terminal. >> >> I tried doubleclicking the script file on another Mac, and I get the >> identical result as I did on the fresh user account on the first Mac >> - i.e. the script is called, but immediately exits, and the >> application does not start. >> >> It is quite possible that I have done something non-standard in my >> script that is at fault here, but I have no clue on what to look for. > > Try to map *.py on Python Launcher. > And I guess it helps if you make your script executable (chmod a+x) and > have a working shebang line like this: > > #!/usr/bin/env python > >>> There's also Platypus to wrap any script, see http:// >>> www.sveinbjorn.org/platypus >> I tried that on both Macs - the Platypus wrapper application starts, >> but the wxpython application does not start. > > I never tried Platypus with wxPython, sorry. > > Greetlings from Lake Constance! > Hraban > --- > http://www.fiee.net > https://www.cacert.org (I'm an assurer) > > > > > ------------------------------------------------------------------------ > > Subject: > Re: [Pythonmac-SIG] Double-clickable wxpython application? > From: > Kevin Horton > Date: > Tue, 8 Apr 2008 20:54:49 -0400 > To: > pythonmac-sig at python.org > > To: > pythonmac-sig at python.org > > > On 8 Apr 2008, at 15:38, Henning Hraban Ramm wrote: > >> Try to map *.py on Python Launcher. > > I didn't even know PythonLauncher.app existed, but SpotLight found it, > and I did the mapping. PythonLauncher from Apple's python 2.3 on OS > 10.4 didn't work, but the one from MacPython 2.5 did work. At least > this worked on my machine, running 10.4. But, on my wife's machine, > running 10.5, where this script will live once it is polished up, > PythonLauncher will not do the job. It starts, then a Terminal window > opens, then PythonLauncher quits. I tried with both the system python, > and with MacPython. I tried logging out, and back in, but that did not > help. I'll play with this some more tomorrow evening. > >> And I guess it helps if you make your script executable (chmod a+x) >> and have a working shebang line like this: >> > Subject: > Re: [Pythonmac-SIG] PIL and py2app on Leopard > From: > J?rg Birkhold > Date: > Wed, 9 Apr 2008 10:51:30 +0200 > To: > pythonmac-sig at python.org > > To: > pythonmac-sig at python.org > > > hello, > > i tried this but still got the same error. > in my code i use: > > from PIL import Image > > my setup.py: > > from setuptools import setup > > setup( > app=["converter.py"], > setup_requires=["py2app"], > options=dict(py2app=dict(packages='PIL',)), > ) > > in the terminal i get: > *** using recipe: PIL *** > > that looks ok but still that line throws an error: > from PIL import Image > > any ideas? > > thanks a lot > > joerg > > Am 08.04.2008 um 16:26 schrieb Martin Dunschen: > >> PIL stands for "Python Imaging Library". "Image" is the module you >> import to use this library. >> >> In your setup.py you need to make sure that the "Image" module is >> included in building the app. Read the documentation to py2app (or >> py2exe) to find how you can ensure that this module will be included in >> the modules your application depends on: I think you've got to use >> something like this: >> >> setup( >> options=dict( >> py2app=dict( >> ... >> packages='wx, PIL', >> ... >> >> >> in your setup.py file. This says that you want the packages wx and PIL >> (Image module) included in your distribution (the application). >> >> Hope this helps, >> >> Martin >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> http://mail.python.org/mailman/listinfo/pythonmac-sig > > From joerg.birkhold at gmail.com Wed Apr 9 13:37:50 2008 From: joerg.birkhold at gmail.com (=?ISO-8859-1?Q?J=F6rg_Birkhold?=) Date: Wed, 9 Apr 2008 13:37:50 +0200 Subject: [Pythonmac-SIG] PIL and py2app on Leopard In-Reply-To: <47FCA698.104@uk2.net> References: <47FCA698.104@uk2.net> Message-ID: <88702764-9232-4180-865C-6EE29A155F15@gmail.com> Am 09.04.2008 um 13:20 schrieb Martin Dunschen: > The recommendation is to import like this: > > import Image that throws an error that the module is not found even without wrapping is it the recommendation for py2app or for python general? > > > not > from PIL import Image > ... > > This reqires that PYTHONPATH is set up to find the module. > > > PIL should be in your PYTHONPATH environment variable. Test this: > > import sys > print sys.path > > and see if PIL is somewhere in there. ['/Users/Shared/work/converter/pybackend', '/Users/Shared/work/ converter/pybackend/src', '/Library/Python/2.5/site-packages', '/ System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/ python', '/System/Library/Frameworks/Python.framework/Versions/2.5/ Extras/lib/python/PyObjC', '/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5', '/System/Library/ Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/ System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/plat-darwin', '/System/Library/Frameworks/Python.framework/ Versions/2.5/lib/python2.5/plat-mac', '/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5/plat-mac/lib- scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/ 2.5/lib/python25.zip', '/System/Library/Frameworks/Python.framework/ Versions/2.5/lib/python25.zip'] obviously it is missing how do I add it? > > > I take it that if you run your python without wrapping it into an > application everything works as expected? yes everything works fine. Thanks and best Regards Joerg > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From Chris.Barker at noaa.gov Wed Apr 9 19:22:05 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 09 Apr 2008 10:22:05 -0700 Subject: [Pythonmac-SIG] PIL and py2app on Leopard In-Reply-To: <88702764-9232-4180-865C-6EE29A155F15@gmail.com> References: <47FCA698.104@uk2.net> <88702764-9232-4180-865C-6EE29A155F15@gmail.com> Message-ID: <47FCFB3D.4040004@noaa.gov> Sorry, I've lost track of this thread a bit, but I'm going to try to give some general advice -- sorry if I repeat stuff you've already said/tried: >> import Image > > that throws an error that the module is not found even without wrapping > is it the recommendation for py2app or for python general? Yes, that is how PIL is usually imported, so you'll have an easier time getting your install fixed first. Indeed, when I started using PIL, "import Image" was the only option. I've just looked at my install, which is from the PIL package on pythonmac.org/packages. in site-packages, there is a directory called "PIL". It is a package (it has an __init__.py), but it is also added to the sys.path by the addition of a PIL.pth file. So you should be able to import it either way, but perhaps "from PIL import Image" is confusing py2app. >> This requires that PYTHONPATH is set up to find the module. not quite -- just to get the terminology straight -- PYTHONPATH is an environment variable in which one can specify additional paths you want Python to search for packages/modules. sys.path is the set of paths used by python to find stuff -- it is built at initialization from a number of sources, of which PYTHONPATH is only one. In addition, you can add paths to sys.path yourself, in your code, at runtime. I've never had a need to use PYTHONPATH, and I don't recommend it -- Environment variables are different depending on how your script is run, and there is only one PYTHONPATH, even though there may be multiple version of python on your system. > obviously it is missing how do I add it? Odd -- how did you install PIL? Anyway, there should be a file in /Library/Python/2.5/site-packages called "PIL.pth", and in there, should be the single line" "PIL". This assumes that PIL is installed in: /Library/Python/2.5/site-packages/PIL That should add it to your path. Now on to py2app: Py2app is supposed to read your code and determine what modules/packages are needed, an include those automatically. Some packages need special attention to be included correctly. PIL is one of those. In this case, there are built-in "recipes" that should get triggered when you use a given package, and it will do some extra stuff for you. There is a PIL recipe in: /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/recipes/PIL That should "do the right thing" with PIL. If it isn't working, then it's broken, and hopefully one of the folks here can figure it out and fix it. So, for your situation, I recommend: 1) Get PIL installed so that "import Image" works. 2) make a little script that does little else but "import image" and some little action to test it. 3) build a simple py2app setup.py, like: from setuptools import setup setup( app="MyScript.py", setup_requires=['py2app'], ) Should do it. And you might want to try it with both: "import Image" and "from PIL import Image", 'cause it looks like both should work. That should "just work". If it doesn't: Report back what you get, and be sure to include: Your script Your setup.py Your OS-X version Your Python version (where you got it, how you installed it) Your py2app version Your PIL version (where you got it, how you installed it) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From joerg.birkhold at gmail.com Wed Apr 9 20:47:15 2008 From: joerg.birkhold at gmail.com (=?ISO-8859-1?Q?J=F6rg_Birkhold?=) Date: Wed, 9 Apr 2008 20:47:15 +0200 Subject: [Pythonmac-SIG] PIL and py2app on Leopard In-Reply-To: <47FCFB3D.4040004@noaa.gov> References: <47FCA698.104@uk2.net> <88702764-9232-4180-865C-6EE29A155F15@gmail.com> <47FCFB3D.4040004@noaa.gov> Message-ID: <9F1BBCF2-7E33-427A-AC5F-DED9FC1B7FF4@gmail.com> Am 09.04.2008 um 19:22 schrieb Christopher Barker: >> > > > I've just looked at my install, which is from the PIL package on > pythonmac.org/packages. in site-packages, there is a directory > called "PIL". It is a package (it has an __init__.py), but it is > also added to the sys.path by the addition of a PIL.pth file. So you > should be able to import it either way, but perhaps "from PIL import > Image" is confusing py2app. Strange thing is I downloaded the mac package from pythonmac but the installer says there is no python 2.5 on my system??? I'm using Leopard with Developer Tools so it is there for sure. >> > > Odd -- how did you install PIL? Anyway, there should be a file in I installed PIL from source calling setup.py, I have the package in site-packages but no PIL.pth. after adding PIL.pth I can use Import Image. 1 step forward :-) > > > Now on to py2app: > > Py2app is supposed to read your code and determine what modules/ > packages are needed, an include those automatically. Some packages > need special attention to be included correctly. PIL is one of > those. In this case, there are built-in "recipes" that should get > triggered when you use a given package, and it will do some extra > stuff for you. There is a PIL recipe in: > > /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site- > packages/py2app-0.4.2-py2.5.egg/py2app/recipes/PIL yepp it is there After fixing the PIL.pth i could generate one app where i could see the site-packages like PIL inside the app-package but just one time. Now I don't even get an error the app is just crashing on startup. > > > That should "do the right thing" with PIL. > > If it isn't working, then it's broken, and hopefully one of the > folks here can figure it out and fix it. > > So, for your situation, I recommend: > > 1) Get PIL installed so that "import Image" works. > > 2) make a little script that does little else but "import image" and > some little action to test it. > > 3) build a simple py2app setup.py, like: > > from setuptools import setup > > setup( > app="MyScript.py", > setup_requires=['py2app'], > ) i will look into it tomorrow an try to build up everything step by step. Is there a log or something automatically written with the python errors of the app? If not how can I achieve this? > > > Should do it. > > And you might want to try it with both: "import Image" and "from PIL > import Image", 'cause it looks like both should work. > > That should "just work". If it doesn't: > > Report back what you get, and be sure to include: > > Your script > Your setup.py > Your OS-X version > Your Python version (where you got it, how you installed it) > Your py2app version > Your PIL version (where you got it, how you installed it) > > Thanks a lot so far I hope I will manage to get it running and report how it is going. Joerg > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Wed Apr 9 21:11:38 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 09 Apr 2008 12:11:38 -0700 Subject: [Pythonmac-SIG] PIL and py2app on Leopard In-Reply-To: <15673533-DE10-4E10-9741-21C56846D6E1@gmail.com> References: <47FCA698.104@uk2.net> <88702764-9232-4180-865C-6EE29A155F15@gmail.com> <47FCFB3D.4040004@noaa.gov> <15673533-DE10-4E10-9741-21C56846D6E1@gmail.com> Message-ID: <47FD14EA.6040901@noaa.gov> J?rg Birkhold wrote: > Strange thing is I downloaded the mac package from pythonmac but the > installer says there is no python 2.5 on my system??? > I'm using Leopard with Developer Tools so it is there for sure. Those packages are for the "MacPython" that is also distributed from that site. The one Apple delivers is slightly different, and located in a different place. > after adding PIL.pth I can use Import Image. > 1 step forward :-) Good start. As setup.py didn't do it for you, perhaps it's depricated... > yepp it is there > > After fixing the PIL.pth i could generate one app where i could see the > site-packages like PIL inside the app-package but just one time. What does "just one time" mean? > Now I don't even get an error the app is just crashing on startup. Have you looked at Coinsole.app? there may be a message there. > i will look into it tomorrow an try to build up everything step by step. > Is there a log or something automatically written with the python errors > of the app? If not how can I achieve this? They should show up in Console.app. It should be in Applications/Utilities -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Wed Apr 9 21:14:28 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 09 Apr 2008 12:14:28 -0700 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <954f61110804070357j3f8b82e9la34f5757e3047cb8@mail.gmail.com> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <954f61110804070357j3f8b82e9la34f5757e3047cb8@mail.gmail.com> Message-ID: <47FD1594.6010701@noaa.gov> Henning Hraban Ramm wrote: > 2008/4/7, Kevin Horton : >> I hope to find a way so she >> can double click on something to start this application. > The "big" solution is py2app. It's not that big -- and I think it will use the built-in python if that's what you're using, so I think it's the "right" way to do it. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From hraban at fiee.net Wed Apr 9 21:24:46 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Wed, 9 Apr 2008 21:24:46 +0200 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <954f61110804070357j3f8b82e9la34f5757e3047cb8@mail.gmail.com> <794D178E-0913-4704-9EFB-541F75A8CCAF@rogers.com> <42135292-7D87-490F-AA7C-4845529DD764@fiee.net> Message-ID: <58563E83-3B2C-4790-A03A-4F3C8327E761@fiee.net> Am 2008-04-09 um 02:54 schrieb Kevin Horton: >> Try to map *.py on Python Launcher. > I didn't even know PythonLauncher.app existed, but SpotLight found > it, and I did the mapping. PythonLauncher from Apple's python 2.3 on > OS 10.4 didn't work, but the one from MacPython 2.5 did work. At > least this worked on my machine, running 10.4. But, on my wife's > machine, running 10.5, where this script will live once it is > polished up, PythonLauncher will not do the job. It starts, then a > Terminal window opens, then PythonLauncher quits. I tried with both > the system python, and with MacPython. I tried logging out, and back > in, but that did not help. I'll play with this some more tomorrow > evening. Sorry, then I can't help you. I'm still on 10.4 and have no experience with 10.5. > Am 2008-04-09 um 21:14 schrieb Christopher Barker: >>> The "big" solution is py2app. >> It's not that big -- and I think it will use the built-in python if >> that's what you're using, so I think it's the "right" way to do it. It depends - normally py2app will create a complete application that includes Python and all the libraries (therefore not really tiny), but you can configure it to use an installed Python (then you've to care for the needed libraries yourself, of course). Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From Jack.Jansen at cwi.nl Wed Apr 9 22:48:37 2008 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Wed, 9 Apr 2008 22:48:37 +0200 Subject: [Pythonmac-SIG] Carbon bindings' future (was: Re: eliminating appscript-triggered Dock icon) In-Reply-To: <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> Message-ID: On 9-Apr-2008, at 07:56 , Ronald Oussoren wrote: > Even fixing bgen isn't that much work, once you understand the code. > The problem is that bgen is a nearly vertical learning curve and > Jack seems to be the only person that understands enough of bgen to > be able to hack on it. I'm definitely in favor of ditching bgen and > moving toward PyObjC-based wrappers. I would also be in favor of using PyObjC-based wrappers. But: I'm not sure that completely ditching bgen is what's needed. The front-end of bgen, which reads the C header files and produces what's basically interface definitions, should be understandable. The xxxgen.py files (which are really the interface definitions) could then be used to create bridgesupport files, and everything should play together well enough. The only problem would be compatibility: one of the things bgen does is convert the procedural Carbon C argument convention (with the main object being the first argument, usually) to an OO model on the Python side. I don't think bridgesupport can pull off this trick. And the conversion of arguments to be more Pythonic (two arguments of the form "char *buf, int bufsiz" are represented as a single string on the Python side, and lots more) is probably difficult too. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080409/b5cc2104/attachment.htm From Chris.Barker at noaa.gov Thu Apr 10 02:17:05 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 09 Apr 2008 17:17:05 -0700 Subject: [Pythonmac-SIG] PIL for OS-X In-Reply-To: <793A33FC-A504-48E8-95EE-158B8B51E374@mac.com> References: <47F6BC80.6010204@noaa.gov> <793A33FC-A504-48E8-95EE-158B8B51E374@mac.com> Message-ID: <47FD5C81.7000004@noaa.gov> Ronald Oussoren wrote: > On 5 Apr, 2008, at 1:40, Christopher Barker wrote: >> Can we build a single binary installer for PIL that will work with BOTH >> Apple's Python2.5 that comes with OS-X 10.5 and MacPython2.5, Universal >> Framework Build for OS-X 10.3.9 and above. > > Not really, you'll have to provide two installers. Darn. > BTW. What I'd like to see is a collection of recipes for building > packages like this. That is, a Makefile/shell-script/python-script/... that will build > all dependencies, the package itself and an installer. Well, there is this: http://wiki.python.org/moin/MacPython/UniversalLibrariesAndExtensions But you're right, it would be nice to get that down to a single script. I'll get a start on that. Do you think it should download the tarballs too (curl) ? > That's the most annoying issue with the pythonmac.org repository: some > packages are non-trivial to rebuild (such as PyOpenGL 2.x) and there is no > indication whatsover of how they were build. There was some effort to put it all in a Wiki, but not really maintained. Also, it was suggested that folks put a README in with it. I did that for Matplotlib a while back, but the problem is that the packages are moving targets. Another issue is that lots of Python packages rely on the same external libs -- libpng comes to mind. Another way to do do it would be to supply a standard build of those libs,a nd link all the packages against them. These are good options for that: http://www.kyngchaos.com/wiki/software:frameworks His UnixImageIO Framework is pretty handy > That's not very interesting for users, until it is time to build a > binary for the next > version and someone has to reinvent the proper build proces. Exactly. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From janssen at parc.com Thu Apr 10 02:33:42 2008 From: janssen at parc.com (Bill Janssen) Date: Wed, 9 Apr 2008 17:33:42 PDT Subject: [Pythonmac-SIG] PIL for OS-X In-Reply-To: <47FD5C81.7000004@noaa.gov> References: <47F6BC80.6010204@noaa.gov> <793A33FC-A504-48E8-95EE-158B8B51E374@mac.com> <47FD5C81.7000004@noaa.gov> Message-ID: <08Apr9.173346pdt."58696"@synergy1.parc.xerox.com> > > On 5 Apr, 2008, at 1:40, Christopher Barker wrote: > >> Can we build a single binary installer for PIL that will work with BOTH > >> Apple's Python2.5 that comes with OS-X 10.5 and MacPython2.5, Universal > >> Framework Build for OS-X 10.3.9 and above. > > > > Not really, you'll have to provide two installers. > > Darn. I find that hard to believe. Why not two packages in the same installer with a preflight script that checks to see which to unpack? > But you're right, it would be nice to get that down to a single script. > I'll get a start on that. Do you think it should download the tarballs > too (curl) ? I would. Bill From janssen at parc.com Thu Apr 10 02:38:48 2008 From: janssen at parc.com (Bill Janssen) Date: Wed, 9 Apr 2008 17:38:48 PDT Subject: [Pythonmac-SIG] PIL for OS-X In-Reply-To: <47FD5C81.7000004@noaa.gov> References: <47F6BC80.6010204@noaa.gov> <793A33FC-A504-48E8-95EE-158B8B51E374@mac.com> <47FD5C81.7000004@noaa.gov> Message-ID: <08Apr9.173851pdt."58696"@synergy1.parc.xerox.com> > But you're right, it would be nice to get that down to a single script. > I'll get a start on that. Do you think it should download the tarballs > too (curl) ? Feel free to start with my script here. I download the tarballs, unpack PIL and all the prereq packages in /tmp, and go to work. ${distdir} could be "/usr/local". Bill ---------------------------------------------------------- set tempfile=/tmp/foo-$$ cd libpng-* ./configure --prefix=${distdir} make make install cd ../jpeg* ./configure --prefix=${distdir} make make install make install-lib make install-headers ranlib ${distdir}/lib/libjpeg.a setenv CPPFLAGS "-I${distdir}/include" setenv LDFLAGS "-L${distdir}/lib" setenv CXXFLAGS "-I${distdir}/include" cd ../jbig2dec* ./configure --prefix=${distdir} make make install cd ../ghostscript-8* ln -s ../jpeg-6b ./jpeg # Macs may not have X11, so make sure not to link it in by accident ./configure --without-x --prefix=${distdir} make make install cd ../fonts install -m 444 * ${distdir}/share/ghostscript/fonts cd ../tiff-* ./configure --prefix=${distdir} --without-x make make install cd ../freetype-2.* # first, get rid of erroneous mac flag cp include/freetype/config/ftconfig.h ${tempfile} rm -f include/freetype/config/ftconfig.h sed -e 's/#define FT_MACINTOSH 1/#undef FT_MACINTOSH/' < ${tempfile} > include/freetype/config/ftconfig.h # next, enable the bytecode interpreter rm -f ${tempfile} cp include/freetype/config/ftoption.h ${tempfile} rm -f include/freetype/config/ftoption.h sed -e 's;/\* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER \*/;#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER;' < ${tempfile} > include/freetype/config/ftoption.h # now build ./configure --prefix=${distdir} make make install cp ${distdir}/include/ft2build.h ${distdir}/include/freetype2/ # for xpdf cd ../t1lib-5.* ./configure --without-x --without-athena --prefix=${distdir} make without_doc make install cd ../Imaging-1.1.* rm -f ${tempfile} cp setup.py ${tempfile} sed -e "s;/sw;${distdir};" < ${tempfile} > setup.py python setup.py build python setup.py install --prefix=${distdir} From hengist.podd at virgin.net Thu Apr 10 11:46:19 2008 From: hengist.podd at virgin.net (has) Date: Thu, 10 Apr 2008 10:46:19 +0100 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> Message-ID: On 9 Apr 2008, at 06:56, Ronald Oussoren wrote: > > On 3 Apr, 2008, at 15:46, has wrote: >> >>> it would be nice to have complete bindings to the bits of >>> Carbon that still make sense. >> >> Yes, although I'd repeat my earlier suggestion that the most >> economically viable way to provide Carbon bindings would be to create >> ObjC wrappers for the Carbon APIs of interest. > > I'm far from convinced that this is true. If you use bridgesupport/bgen/whatever to generate ObjC wrappers then ObjC users, Python users, Ruby users, Perl users, etc, etc. all benefit. If you generate Python wrappers, then only Python users benefit. It's a question of reaching the widest number of users with the least duplication of effort. Reaching ObjC users is particularly important, because sooner or later the existing Carbon APIs are going to get wrapped for ObjC anyway. If you target ObjC now, there's a good chance that your wrappers will become the de-facto standard there and everywhere else. If you target individual scripting languages, eventually someone else will create ObjC wrappers and then you've got two different standards fighting for users' attention. Regards, has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From khorton01 at rogers.com Thu Apr 10 13:52:00 2008 From: khorton01 at rogers.com (Kevin Horton) Date: Thu, 10 Apr 2008 07:52:00 -0400 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> Message-ID: <8D6E1238-730E-4222-B83D-A025E1F378C6@rogers.com> On 6 Apr 2008, at 20:50, Kevin Horton wrote: > What are the simplest ways to make a double-clickable interface to a > wxpython application? I don't need to actually include python or > wxpython in the application, as they are already resident on her > computer. I have stopped knocking my head against the wall with trying to find a way to start this wxpython script by a double click. I have moved the GUI portion to a Dashboard widget, and had it working in about 30 minutes. The javascript in the widget calls the python script that does the actual work. The widget provides the GUI. Thanks to everyone for their advice. It would have been nice to get this working all in python, but I needed to cut my losses and move on, as there are only so many hours in the day. -- Kevin Horton Ottawa, Canada From ronaldoussoren at mac.com Thu Apr 10 14:41:42 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 10 Apr 2008 14:41:42 +0200 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> Message-ID: On 10 Apr, 2008, at 11:46, has wrote: > > On 9 Apr 2008, at 06:56, Ronald Oussoren wrote: >> >> On 3 Apr, 2008, at 15:46, has wrote: >>> >>>> it would be nice to have complete bindings to the bits of >>>> Carbon that still make sense. >>> >>> Yes, although I'd repeat my earlier suggestion that the most >>> economically viable way to provide Carbon bindings would be to >>> create >>> ObjC wrappers for the Carbon APIs of interest. >> >> I'm far from convinced that this is true. > > If you use bridgesupport/bgen/whatever to generate ObjC wrappers then > ObjC users, Python users, Ruby users, Perl users, etc, etc. all > benefit. If you generate Python wrappers, then only Python users > benefit We seem to be agreeing, the bit I'm not convinced about is the "create ObjC wrappers" bit. You don't have to write Objective-C wrappers to use bridgesupport, bridgesupport can easily wrap pure C functions as well. It might be necessary to enhance the bridgesupport format a little to deal with oddities in Carbon APIs and it would obviously be helpfull to cooperate with other bridgesupport users for that. My guess is that Carbon bindings are a medium-term solution anyway, Apple seems to be moving away from Carbon (as can be seen by the lack of 64-bit Carbon and the deprecation of QuickTime in favour of QTKit). Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080410/1b0b211d/attachment.bin From Chris.Barker at noaa.gov Thu Apr 10 18:00:51 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 10 Apr 2008 09:00:51 -0700 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <8D6E1238-730E-4222-B83D-A025E1F378C6@rogers.com> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <8D6E1238-730E-4222-B83D-A025E1F378C6@rogers.com> Message-ID: <47FE39B3.6090000@noaa.gov> Kevin Horton wrote: > I have stopped knocking my head against the wall with trying to find > a way to start this wxpython script by a double click. Did you try (and fail) py2app? That really is THE way to build a clickable app from a python script. > It would have been nice to get > this working all in python, py2app would have done that, though I'm still confused as to why pythonlauncher didn't work for you. -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From kw at codebykevin.com Thu Apr 10 18:00:16 2008 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 10 Apr 2008 12:00:16 -0400 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <47FE39B3.6090000@noaa.gov> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <8D6E1238-730E-4222-B83D-A025E1F378C6@rogers.com> <47FE39B3.6090000@noaa.gov> Message-ID: <47FE3990.6060207@codebykevin.com> Christopher Barker wrote: > py2app would have done that, though I'm still confused as to why > pythonlauncher didn't work for you. Pythonlauncher is broken on Leopard: http://bugs.python.org/issue1905 -- Kevin Walzer Code by Kevin http://www.codebykevin.com From Chris.Barker at noaa.gov Thu Apr 10 19:04:00 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 10 Apr 2008 10:04:00 -0700 Subject: [Pythonmac-SIG] PIL for OS-X In-Reply-To: <08Apr9.173346pdt.58696@synergy1.parc.xerox.com> References: <47F6BC80.6010204@noaa.gov> <793A33FC-A504-48E8-95EE-158B8B51E374@mac.com> <47FD5C81.7000004@noaa.gov> <08Apr9.173346pdt.58696@synergy1.parc.xerox.com> Message-ID: <47FE4880.4060408@noaa.gov> Bill Janssen wrote: >>> Not really, you'll have to provide two installers. >> Darn. > > I find that hard to believe. Why not two packages in the same > installer with a preflight script that checks to see which to unpack? OK. it's a terminology issue -- What I meant was "two separate binaries". Anyway, if you want to write such an installer, that would be great (though it would make the download bigger) >> But you're right, it would be nice to get that down to a single script. >> I'll get a start on that. Do you think it should download the tarballs >> too (curl) ? > > I would. I've got start on it. Bill Janssen wrote: > Feel free to start with my script here. thanks. A couple questions: > cd libpng-* The PIL docs state that you need libz for png support, but not libpng itself -- are those docs out of date? > setenv CPPFLAGS "-I${distdir}/include" > setenv LDFLAGS "-L${distdir}/lib" > setenv CXXFLAGS "-I${distdir}/include" I thought this overrode the Makefile values -- or does it add to them? I'd like to add " -arch PPP -arch Intel" to CFLAGS, but don't want to override the other flags there... > cd ../jbig2dec* What's this? > # Macs may not have X11, so make sure not to link it in by accident What is the status of this? I was wondering if I could use Apple's freetype... > cd ../fonts > install -m 444 * ${distdir}/share/ghostscript/fonts Does PIL usually come with these fonts? how critical is this? Again, tiff isn't listed as a PIL dependency . I sure wish Apple would provide a bit more of this stuff -- I now have libjpeg, libpng, and libtiff in a half a dozen different packages -- arrrgg! > cd ../t1lib-5.* What's this? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From janssen at parc.com Thu Apr 10 22:43:46 2008 From: janssen at parc.com (Bill Janssen) Date: Thu, 10 Apr 2008 13:43:46 PDT Subject: [Pythonmac-SIG] PIL for OS-X In-Reply-To: <47FE4880.4060408@noaa.gov> References: <47F6BC80.6010204@noaa.gov> <793A33FC-A504-48E8-95EE-158B8B51E374@mac.com> <47FD5C81.7000004@noaa.gov> <08Apr9.173346pdt.58696@synergy1.parc.xerox.com> <47FE4880.4060408@noaa.gov> Message-ID: <08Apr10.134353pdt."58696"@synergy1.parc.xerox.com> > > cd libpng-* > > The PIL docs state that you need libz for png support, but not libpng > itself -- are those docs out of date? I'm not sure. But I build it anyway for Ghostscript. > > setenv CPPFLAGS "-I${distdir}/include" > > setenv LDFLAGS "-L${distdir}/lib" > > setenv CXXFLAGS "-I${distdir}/include" > > I thought this overrode the Makefile values -- or does it add to them? > I'd like to add " -arch PPP -arch Intel" to CFLAGS, but don't want to > override the other flags there... My understanding is that it adds to them for some flags, overrides for others. I use this mainly for "configure" scripts -- not sure what the behavior of setup.py is. > > cd ../jbig2dec* > > What's this? It's a decoder for JBIG2 image compression. > > # Macs may not have X11, so make sure not to link it in by accident > > What is the status of this? I was wondering if I could use Apple's > freetype... On Leopard, yes. I've been using this since 10.3; some of it isn't needed on 10.5, I imagine. > > cd ../fonts > > install -m 444 * ${distdir}/share/ghostscript/fonts > > Does PIL usually come with these fonts? how critical is this? If you're going to use Ghostscript render Postscript with PIL, it's critical. > Again, tiff isn't listed as a PIL dependency . I don't remember why I included this (probably for Ghostscript or PDF rendering), but it may not be a dependency. > I sure wish Apple would provide a bit more of this stuff -- I now have > libjpeg, libpng, and libtiff in a half a dozen different packages -- arrrgg! > > > cd ../t1lib-5.* > > What's this? Type 1 font rendering library. Bill From ian_m_bloom at yahoo.com Fri Apr 11 01:22:15 2008 From: ian_m_bloom at yahoo.com (Ian Bloom) Date: Thu, 10 Apr 2008 16:22:15 -0700 (PDT) Subject: [Pythonmac-SIG] Help, py2app thinks everything is dependant? Message-ID: <643670.53496.qm@web51704.mail.re2.yahoo.com> I have a program that I've been writing using Xcode, pyObjc and py2app. Up until this point I've been using the standard python on Mac OSX Tiger which is 2.3, it's been doing fine for me. I needed to use the subprocess module, so I installed 2.4 and changed the lead line in my setup.py file to read: #!/usr/local/bin/python2.4 Now the application being created runs properly, but py2app is copying the entire python installation, documentation and all into the application bundle, making it about 28MB instead of the usual 2. Any idea why it's doing this? Many thanks, Ian Bloom This is my setup.py: #!/usr/local/bin/python2.4 # # ------------------------------------------------ # # CHANGE ABOVE OR EDIT THE "Shell Script Files" # PHASE TO START THE THIS SCRIPT WITH ANOTHER # PYTHON INTERPRETER. # # ------------------------------------------------ # """ Distutils script for building Crimson. Development: xcodebuild -buildstyle Development Deployment: xcodebuild -buildstyle Deployment These will place the executable in the "build" dir by default. Alternatively, you can use py2app directly. Development: python setup.py py2app --alias Deployment: python setup.py py2app These will place the executable in the "dist" dir by default. """ from distutils.core import setup import py2app import os import sys os.chdir(os.path.dirname(os.path.abspath(__file__))) from PyObjCTools import XcodeSupport xcode = XcodeSupport.xcodeFromEnvironment( 'Crimson.xcode', os.environ, ) sys.argv = xcode.py2app_argv(sys.argv) setup_options = xcode.py2app_setup_options('app') infos = { 'description' : 'Crimson facilitates onlining 4K footage', 'keywords' : 'red, workflow, edit, conform', 'name' : 'CrimsonWorkflow', 'platforms' : 'MacOS X', 'version' : '0.8.9', } #py2app_options = { #'iconfile' : 'Crimson.icns', #'plist' : 'Info.plist' #} setup_options.update(infos) #setup_options["options"]["py2app"].update(py2app_options) setup(**setup_options) Ian Bloom Director of Photography New York, NY Office: 646.257.2462 Cell: 336.986.0663 ian at ianbloom.com http://www.ianbloom.com http://www.redhax.net From khorton01 at rogers.com Fri Apr 11 01:34:59 2008 From: khorton01 at rogers.com (Kevin Horton) Date: Thu, 10 Apr 2008 19:34:59 -0400 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <47FE39B3.6090000@noaa.gov> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <8D6E1238-730E-4222-B83D-A025E1F378C6@rogers.com> <47FE39B3.6090000@noaa.gov> Message-ID: <311D960F-FDA6-4913-AC10-1F603EB76D2A@rogers.com> On 10 Apr 2008, at 12:00, Christopher Barker wrote: > Kevin Horton wrote: >> I have stopped knocking my head against the wall with trying to >> find a way to start this wxpython script by a double click. > > Did you try (and fail) py2app? That really is THE way to build a > clickable app from a python script. py2app is not available at the link provided on its download page, so I couldn't try it with MacPython. I did try py2app from the Fink distribution. The app that I built using Fink's py2app fails to run, as it cannot import wx. I assumed that was because Fink does not have a proper wxpython - their version uses X11 and wxgtk. I didn't investigate any further as this was starting to look like a big time sink. The widget approach is looking like a winner, as being a widget is a good fit for how this app will be used by my wife. And it works already, whereas a pure python solution looks like it would be a bigger job. -- Kevin Horton Ottawa, Canada From ronaldoussoren at mac.com Fri Apr 11 08:05:16 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 11 Apr 2008 08:05:16 +0200 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> Message-ID: <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> Folks, The removal of the Carbon bindings shouldn't impact the functionality of the rest of the standard library. This means we need to do some work though, because urllib relies on the Carbon bindings to get the current proxy settings. The best way to fix that (IMO of course) is to write a small C extension that uses the Carbon API's to fetch that data into a dictionary. All code for that is present in the Python source tree, but in Python instead of in C. Hence writing the extension should be easy enough. Is anyone game for writing this extension? Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080411/0ae85201/attachment.bin From ronaldoussoren at mac.com Fri Apr 11 08:09:17 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 11 Apr 2008 08:09:17 +0200 Subject: [Pythonmac-SIG] Help, py2app thinks everything is dependant? In-Reply-To: <643670.53496.qm@web51704.mail.re2.yahoo.com> References: <643670.53496.qm@web51704.mail.re2.yahoo.com> Message-ID: On 11 Apr, 2008, at 1:22, Ian Bloom wrote: > I have a program that I've been writing using Xcode, > pyObjc and py2app. Up until this point I've been using > the standard python on Mac OSX Tiger which is 2.3, > it's been doing fine for me. I needed to use the > subprocess module, so I installed > 2.4 and changed the lead line in my setup.py file to > read: > #!/usr/local/bin/python2.4 > > Now the application being created runs properly, but > py2app is copying the entire python installation, > documentation and all into the application bundle, > making it about 28MB instead of the usual 2. > > Any idea why it's doing this? That's by design. Py2app creates a standalone application bundle that you can copy to other machines to run without further setup. When you used Python 2.3 the application bundle referenced the system install of Python, which is present on all machines. When using Python2.4 py2app must copy the framework into your application to ensure that the bundle is really standalone. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080411/723f4a13/attachment.bin From daniel at keystonewood.com Fri Apr 11 17:51:02 2008 From: daniel at keystonewood.com (Daniel Miller) Date: Fri, 11 Apr 2008 11:51:02 -0400 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> References: <1A9CD4D6-430E-4525-924A-F614C53C3C3E@virgin.net> <0A74B1F4-2B58-4DC4-B233-567BD6BE9EA9@gmail.com> <109CB3DB-32B5-40DD-ACB2-13D2741C6DA8@virgin.net> <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> Message-ID: Hi Ronald, Will this work (see attached)? ~ Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: urllib_getproxies_internetconfig.py Type: text/x-python-script Size: 1376 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080411/ec4cda25/attachment.bin -------------- next part -------------- On Apr 11, 2008, at 2:05 AM, Ronald Oussoren wrote: > Folks, > > The removal of the Carbon bindings shouldn't impact the > functionality of the rest of the standard library. This means we > need to do some work though, because urllib relies on the Carbon > bindings to get the current proxy settings. > > The best way to fix that (IMO of course) is to write a small C > extension that uses the Carbon API's to fetch that data into a > dictionary. All code for that is present in the Python source tree, > but in Python instead of in C. Hence writing the extension should > be easy enough. > > Is anyone game for writing this extension? > > Ronald > > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From njriley at uiuc.edu Fri Apr 11 19:23:30 2008 From: njriley at uiuc.edu (Nicholas Riley) Date: Fri, 11 Apr 2008 12:23:30 -0500 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> Message-ID: <20080411172330.GA80024@uiuc.edu> Internet Config is deprecated in 10.5; you should use SCDynamicStoreCopyProxies instead (see SCDynamicStoreCopySpecific.h). -- Nicholas Riley | From daniel at keystonewood.com Fri Apr 11 22:50:16 2008 From: daniel at keystonewood.com (Daniel Miller) Date: Fri, 11 Apr 2008 16:50:16 -0400 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: <20080411172330.GA80024@uiuc.edu> References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> Message-ID: Take two (attached). BTW, I'm not sure if I'm doing the memory management correctly, especially with the values returned from CFDictionaryGetValue (it might need a CFRelease in there). Could someone double-check me on that please? ~ Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: urllib_getproxies_internetconfig.py Type: text/x-python-script Size: 1730 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080411/18a831af/attachment.bin From njriley at uiuc.edu Fri Apr 11 22:57:35 2008 From: njriley at uiuc.edu (Nicholas Riley) Date: Fri, 11 Apr 2008 15:57:35 -0500 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> Message-ID: <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> On Apr 11, 2008, at 3:50 PM, Daniel Miller wrote: > BTW, I'm not sure if I'm doing the memory management correctly, > especially with the values returned from CFDictionaryGetValue (it > might need a CFRelease in there). Could someone double-check me on > that please? The general CF rule is that if you use a function named *Get*, then you don't need to CFRelease; if you use a function named *Copy* or *Create*, you do. So, what you've written looks fine. -- Nicholas Riley | From khorton01 at rogers.com Sat Apr 12 21:07:26 2008 From: khorton01 at rogers.com (Kevin Horton) Date: Sat, 12 Apr 2008 15:07:26 -0400 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <8D6E1238-730E-4222-B83D-A025E1F378C6@rogers.com> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <8D6E1238-730E-4222-B83D-A025E1F378C6@rogers.com> Message-ID: <3B37F070-9BCA-4CBB-9911-57EE775785E2@rogers.com> On 10 Apr 2008, at 07:52, Kevin Horton wrote: > On 6 Apr 2008, at 20:50, Kevin Horton wrote: >> What are the simplest ways to make a double-clickable interface to a >> wxpython application? I don't need to actually include python or >> wxpython in the application, as they are already resident on her >> computer. > > I have stopped knocking my head against the wall with trying to find > a way to start this wxpython script by a double click. I have moved > the GUI portion to a Dashboard widget, and had it working in about 30 > minutes. The javascript in the widget calls the python script that > does the actual work. The widget provides the GUI. > > Thanks to everyone for their advice. It would have been nice to get > this working all in python, but I needed to cut my losses and move > on, as there are only so many hours in the day. Here is a followup to close the loop on my problems. I eventually ran into a performance issue with my widget version, so I took another look at wxpython. With a fresh look, I realized that it was an environment issue that was causing the failure to start wxpython from an AppleScript or Automator. I have two scripts - the program is started by running the GUI script, which calls wx, and sets up the whole GUI. This script imports another script, which holds all the functions that perform the calculations that are the whole purpose of this application. The calculation script reads several data files, which live in the same directory as the two scripts. I was using relative paths when opening those data files. That worked fine if I started the script from the command line. But, for a reason that I don't yet understand, when using AppleScript, or Automator, I needed to use os.chdir() to point to the correct directory before loading the data files. The failure to load the data files did not trigger a traceback, or a Console message when the script was started with AppleScript. I had to resort to putting write statements in my script to log items of interest to a debug file before I could confirm the cause of the problem. Thanks for everyone's patience and assistance. Now that I am back with wxpython, I'll probably eventually have more questions as I beef up the functionality of this application. -- Kevin Horton RV-8 (FInal Assembly) Ottawa, Canada http://www.kilohotel.com/rv8 From hraban at fiee.net Sun Apr 13 20:20:16 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sun, 13 Apr 2008 20:20:16 +0200 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <3B37F070-9BCA-4CBB-9911-57EE775785E2@rogers.com> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <8D6E1238-730E-4222-B83D-A025E1F378C6@rogers.com> <3B37F070-9BCA-4CBB-9911-57EE775785E2@rogers.com> Message-ID: Am 2008-04-12 um 21:07 schrieb Kevin Horton: > I eventually ran into a performance issue with my widget version, so > I took another look at wxpython. With a fresh look, I realized that > it was an environment issue that was causing the failure to start > wxpython from an AppleScript or Automator. I have two scripts - the > program is started by running the GUI script, which calls wx, and > sets up the whole GUI. This script imports another script, which > holds all the functions that perform the calculations that are the > whole purpose of this application. The calculation script reads > several data files, which live in the same directory as the two Sounds awfully complicated... > scripts. I was using relative paths when opening those data files. > That worked fine if I started the script from the command line. But, > for a reason that I don't yet understand, when using AppleScript, or > Automator, I needed to use os.chdir() to point to the correct > directory before loading the data files. AppleScript has no concept of a "current directory". BTW, I'd suggest the dabo wrapper for wxPython, it's much easier to handle. (see dabodev.com) It's in fact a 3-tier framework, but I myself use it only for the GUI. But, of course, additional libraries make a py2app generated app even bigger. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From wand at nd.edu Fri Apr 11 14:06:11 2008 From: wand at nd.edu (wand) Date: Fri, 11 Apr 2008 08:06:11 -0400 Subject: [Pythonmac-SIG] path problems with appscript & OmniOutliner from a newbie Message-ID: <10a955066432e5c02e9d360804fac99e@nd.edu> I am getting file not found errors and another copy of OmniOutliner starts with a new file. I open Projects.oo3 manually and all is well. I have the following in file p.py #! /usr/bin/env pythonw from appscript import * oop = app('OmniOutliner Professional') pdoc = oop.documents['Projects.oo3'] From an xterm window I type p.py and get my error. It doesn't seem to find my open Projects.oo3 window. I'm running os x 10.3.9, appscript 0.18.1, macpython 2.4.4. The appscript file testall.sh runs fine. Any ideas? John From daniel at keystonewood.com Mon Apr 14 14:24:18 2008 From: daniel at keystonewood.com (Daniel Miller) Date: Mon, 14 Apr 2008 08:24:18 -0400 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> Message-ID: <25FDC8D2-C641-4A37-AD6D-D4038B83A8D4@keystonewood.com> Thanks Nicholas, > The general CF rule is that if you use a function named *Get*, then > you don't need to CFRelease; if you use a function named *Copy* or > *Create*, you do. So, what you've written looks fine. With that in mind one further modification seems to be necessary. Take three attached. ~ Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: urllib_contribution.py Type: text/x-python-script Size: 8126 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080414/20386cc4/attachment.bin From daniel at keystonewood.com Mon Apr 14 14:27:52 2008 From: daniel at keystonewood.com (Daniel Miller) Date: Mon, 14 Apr 2008 08:27:52 -0400 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> Message-ID: <7947685F-6F4B-4844-A7C8-68CDA77D2B12@keystonewood.com> Try again...that last file was my scratch file I was using for development. Here's the real thing. Sorry for the mess. ~ Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: urllib_getproxies_internetconfig.py Type: text/x-python-script Size: 1910 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080414/aea1a08f/attachment.bin From jott at watt.ame.nd.edu Mon Apr 14 14:46:38 2008 From: jott at watt.ame.nd.edu (John Ott) Date: Mon, 14 Apr 2008 08:46:38 -0400 (EDT) Subject: [Pythonmac-SIG] appscript path problem from a newbie Message-ID: I am getting file not found errors from appscript. I manually open my OmniOutliner file Projets.oo3 first then from a xterm window: python from appscript import * oop = app('OmniOutliner Professional') pod = oop.documents['Projects.oo3'] A second copy of OmniOutliner Professional is started and a new file is opened then I get my error. I'm suspecting an path variable not set properly but I can't find where to set it. Any ideas? I am running mac os x 10.3.9, macpython 2.4.4, appscript 0.18.1 John ************************************************************************ * * * * John Ott * Email: jott at watt.ame.nd.edu * * Dept. AME * * * 365 Fitzpatrick Hall * * * University of Notre Dame * Phone: (574) 631-8131 * * Notre Dame, IN 46556 USA * Fax: (574) 631-8341 * * * * ************************************************************************ From ronaldoussoren at mac.com Mon Apr 14 18:20:34 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 14 Apr 2008 18:20:34 +0200 Subject: [Pythonmac-SIG] Carbon bindings' future In-Reply-To: <25FDC8D2-C641-4A37-AD6D-D4038B83A8D4@keystonewood.com> References: <47F256CF.6040605@codebykevin.com> <47F27905.9010308@codebykevin.com> <8789780D-C683-497A-998A-18FA5C4FC45F@virgin.net> <4E09E9D3-F1BE-45F9-B780-C9C627342A1D@mac.com> <7822AB5C-32CA-4BA6-B9C9-A50E6DD30F85@mac.com> <20080411172330.GA80024@uiuc.edu> <98DE450D-986E-402A-B9F1-3C39D7DD18A5@uiuc.edu> <25FDC8D2-C641-4A37-AD6D-D4038B83A8D4@keystonewood.com> Message-ID: <97347C48-C825-42F2-AC5B-DD885F51F511@mac.com> On 14 Apr, 2008, at 14:24, Daniel Miller wrote: > Thanks Nicholas, > >> The general CF rule is that if you use a function named *Get*, then >> you don't need to CFRelease; if you use a function named *Copy* or >> *Create*, you do. So, what you've written looks fine. > > With that in mind one further modification seems to be necessary. > Take three attached. This looks great. Thanks for working on this. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20080414/2d6e4055/attachment.bin From nad at acm.org Mon Apr 14 22:25:18 2008 From: nad at acm.org (Ned Deily) Date: Mon, 14 Apr 2008 13:25:18 -0700 Subject: [Pythonmac-SIG] appscript path problem from a newbie References: Message-ID: In article , John Ott wrote: > I am getting file not found errors from appscript. > > I manually open my OmniOutliner file Projets.oo3 first then from a xterm > window: > > python > from appscript import * > oop = app('OmniOutliner Professional') > pod = oop.documents['Projects.oo3'] > > A second copy of OmniOutliner Professional is started and a new file is > opened then I get my error. I'm suspecting an path variable not set > properly but I can't find where to set it. Any ideas? > > I am running mac os x 10.3.9, macpython 2.4.4, appscript 0.18.1 FWIW, it works OK here for 10.5.2, 2.5.2, 0.19-alpha. Any chance the xterm shell is running under a different user name? Have you tried the same sequence from Terminal.app rather than xterm? -- Ned Deily, nad at acm.org From Chris.Barker at noaa.gov Tue Apr 15 07:26:04 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Mon, 14 Apr 2008 22:26:04 -0700 Subject: [Pythonmac-SIG] Double-clickable wxpython application? In-Reply-To: <3B37F070-9BCA-4CBB-9911-57EE775785E2@rogers.com> References: <07683CC3-9B6D-44B3-8A61-44FA3961A0A5@rogers.com> <8D6E1238-730E-4222-B83D-A025E1F378C6@rogers.com> <3B37F070-9BCA-4CBB-9911-57EE775785E2@rogers.com> Message-ID: <48043C6C.3050008@noaa.gov> Kevin Horton wrote: > I have two scripts - the > program is started by running the GUI script, which calls wx, and > sets up the whole GUI. This script imports another script, which > holds all the functions that perform the calculations that are the > whole purpose of this application. The calculation script reads > several data files, which live in the same directory as the two > scripts. I was using relative paths when opening those data files. > That worked fine if I started the script from the command line. But, > for a reason that I don't yet understand, when using AppleScript, or > Automator, I needed to use os.chdir() to point to the correct > directory before loading the data files. yes -- where data files lie is always an issue, and , for the most part, the "current directory" concept really makes no sense with a program started from the GUI. For what it's worth, py2app always sets the current dir to some sensible place. I don't remember where off the top of my head, but it's the same place that it puts "data files", which makes things like this easy. > The failure to load the data files did not trigger a traceback, or a > Console message when the script was started with AppleScript. Th could be a function of how you initialize your wx.App -- MyApp = wx.App() defaults to having wx capture the stdout and stderr and try to dump it to a Window. If your app crashes immediately the errors then get dropped. Try" MyApp - wx.App(False) By the way, I think the default has been changed in the latest version -- this is the source of a LOT of questions on the wxPython list. > I had > to resort to putting write statements in my script to log items of > interest to a debug file before I could confirm the cause of the > problem. wx can also re-direct all output to a file, but I don't remember the syntax of that one off the top of me head, something like: wx.App(redirect=filename). > py2app is not available at the link provided on its download page Your best bet is to get it with easy-install now: easy_install py2app should do it. http://peak.telecommunity.com/DevCenter/EasyInstall > I did try py2app from the Fink > distribution. I wouldn't expect that to work at all -- they really have one? strange. -Chris From j.m.h.thomas at dl.ac.uk Tue Apr 15 11:28:55 2008 From: j.m.h.thomas at dl.ac.uk (Jens Thomas) Date: Tue, 15 Apr 2008 10:28:55 +0100 Subject: [Pythonmac-SIG] Disabling Menus on the Mac Message-ID: <48047557.7060201@dl.ac.uk> Hi, I've hit a rather quirky problem that falls between a number of different areas, so I'm not sure if this is the correct list to post this to, so apologies if I've got it wrong. I'm working on a PyQt GUI application that I'm trying to integrate with a Tkinter GUI application. Surprisingly, this actually works quite well and the two event loops don't seem to clash and it all (almost) works fine. The only issue I've hit is that when the PyQt application spawns the thread that runs the Tkinter GUI, the "Python" menu for the Tkinter app appears and tramples over the existing PyQt application's menu (i.e. the menu along the top of the screen with the "Preferences", "File", "Edit" etc. stuff in it gets scrambled as both applications think they have control of it). I guess this makes sense, but it does rather screw things up for me. Does anyone know if there is any way for me to run the Tkinter GUI without it trying to populate the menu bar? Best wishes, Jens -- =================================================================== Jens Thomas, email: j.m.h.thomas at dl.ac.uk STFC Daresbury Lab, tel: +44-1925-603849 Warrington, fax: +44-1925-603634 WA4 4AD, UK. http: http://www.cse.scitech.ac.uk =================================================================== From hengist.podd at virgin.net Tue Apr 15 12:53:08 2008 From: hengist.podd at virgin.net (has) Date: Tue, 15 Apr 2008 11:53:08 +0100 Subject: [Pythonmac-SIG] appscript path problem from a newbie In-Reply-To: References: Message-ID: John Ott wrote: > I am getting file not found errors from appscript. > > I manually open my OmniOutliner file Projets.oo3 first then from a > xterm > window: > > python > from appscript import * > oop = app('OmniOutliner Professional') > pod = oop.documents['Projects.oo3'] > > A second copy of OmniOutliner Professional is started and a new file > is > opened then I get my error. I'm suspecting an path variable not set > properly but I can't find where to set it. Any ideas? The only thing the above code does is locate OO, launch it if it isn't already running, and get its terminology. (Note: it won't do anything to your 'Projects.oo3' document as you haven't sent a command.) Do you have more than one copy of OO installed? Appscript uses LaunchServices to locate applications by name/bundle id/creator code, so it may be that the LS database points to a different copy of OO to the one you're running. If you need to be more specific, you can identify applications by their full path or unix process id; see chapter 7 of the appscript manual for details. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From konrad.hinsen at laposte.net Tue Apr 15 18:28:45 2008 From: konrad.hinsen at laposte.net (Konrad Hinsen) Date: Tue, 15 Apr 2008 18:28:45 +0200 Subject: [Pythonmac-SIG] Finding the memory usage of a Python process Message-ID: I am trying to obtain the amount of memory that my Python process uses from inside the Python program using resource.getrusage(). While this works fine under Linux, on the Mac I always get 0 for the memory usage (the time information seems credible though). Does anyone have another idea for monitoring memory usage on the Mac? Thanks, Konrad. From gary.bernhardt at gmail.com Tue Apr 15 21:06:44 2008 From: gary.bernhardt at gmail.com (Gary Bernhardt) Date: Tue, 15 Apr 2008 15:06:44 -0400 Subject: [Pythonmac-SIG] Finding the memory usage of a Python process In-Reply-To: References: Message-ID: <9c34c72e0804151206rc25c26bj790a4dd21b40376e@mail.gmail.com> On 4/15/08, Konrad Hinsen wrote: > I am trying to obtain the amount of memory that my Python process > uses from inside the Python program using resource.getrusage(). While > this works fine under Linux, on the Mac I always get 0 for the memory > usage (the time information seems credible though). > > Does anyone have another idea for monitoring memory usage on the Mac? I needed this as well but didn't find a clean way to do it. Eventually I gave up and shelled out to "ps" with something like this: cmd = 'ps %i -o rss' % pid pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True).stdout mem_usage = int(pipe.readlines()[1]) -- Gary http://blog.extracheese.org From rblove_lists at comcast.net Wed Apr 16 04:18:31 2008 From: rblove_lists at comcast.net (Robert Love) Date: Tue, 15 Apr 2008 21:18:31 -0500 Subject: [Pythonmac-SIG] PyGtk Message-ID: Is anybody doing python apps with a GTK gui (for portability with Linux at work)? What GTK do you use? And has anybody tried with the native GTK being developed as opposed to the X-windows version? -- Bob Love "I.R.S.: We've got what it takes to take what you've got! " -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080415/ca548aea/attachment.htm From brad at shub-internet.org Thu Apr 17 03:34:33 2008 From: brad at shub-internet.org (Brad Knowles) Date: Wed, 16 Apr 2008 20:34:33 -0500 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? Message-ID: <4806A929.6080305@shub-internet.org> Folks, I know you hear about these version issues all the time (I have done a bit of searching of the archives ;-), but I think this might be the first case I'm aware of where someone is trying to backport Python 2.3 to Mac OS X 10.5, as opposed to trying to get a newer version of Python running on an older machine. My problem is that I'm trying to run the Access Grid software for doing video conferencing (see ), and the latest version of AG is built on top of Python 2.3. Of course, Apple ships Python 2.5 with Mac OS X 10.5, so AG won't run on my machine (see ). There is an alpha release of an Intel-only version of AG for Mac OS X 10.5 which has been built with Python 2.5, but that doesn't help me since I'm running on a PowerMac G5 (PPC). So, while they work on their issues of trying to get their code brought up-to-date to work with Python 2.5, I figured I'd go the other route and see if I can get Python 2.3 installed on my machine (with wxPython 2.6 and Tcl/Tk Aqua 8.4.9, see ). I checked around, and there doesn't seem to be much in the FAQ at , and I'm at a loss to be able to find any other resources that talk about this subject. I'm a little loathe to just grab the latest source version of Python 2.3 (2.3.7, according to ), without at least a little encouragement that this should work, typical stumbling blocks to look for, etc.... And yes, this does have to be installed in a place that won't interfere with the system-supplied Python 2.5, and once Python 2.3 is installed then I need to go figure out how to install AG with a non-standard location for the Python installation. But first things first, and that means getting Python 2.3 installed on this machine in a non-competing/non-destructive location. Does anyone have advice, URLs, or other suggestions that may be helpful? Thanks! -- Brad Knowles LinkedIn Profile: From Chris.Barker at noaa.gov Thu Apr 17 05:33:27 2008 From: Chris.Barker at noaa.gov (Chris.Barker) Date: Wed, 16 Apr 2008 20:33:27 -0700 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? In-Reply-To: <4806A929.6080305@shub-internet.org> References: <4806A929.6080305@shub-internet.org> Message-ID: <4806C507.90404@noaa.gov> You might as well try to build the source, why not? http://python.org/download/releases/2.3.7/ Otherwise, you might try the 2.3.3 build here: http://homepages.cwi.nl/~jack/macpython/download.html I thought there was a 2.3.5 build somewhere, but who knows where? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Jack.Jansen at cwi.nl Thu Apr 17 11:34:22 2008 From: Jack.Jansen at cwi.nl (Jack Jansen) Date: Thu, 17 Apr 2008 11:34:22 +0200 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? In-Reply-To: <4806A929.6080305@shub-internet.org> References: <4806A929.6080305@shub-internet.org> Message-ID: <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> Brad, there's only one potential problem and that's the PPC/Intel issue. If you have a PowerPC mac (or you can live with running Python under Rosetta on an Intel Mac) I would first try to download a binary 2.3.X. My guess is that there's a 90% chance that it works. The issue might be finding compatible binary installers for Tcl/Tk and wxPython. If the binary installer doesn't work just build the source. BUT (large but, here): don't try to build for Intel, only for PPC. If you have a PPPC mac that's easy. If you don't have one it's going to be a bit of a problem. The normal way to build for one platform on another platform is through the --host crosscompilation support of configure, but Python doesn't like that. Try starting with running the whole configure/build with CFLAGS="-arch ppc" in the environment. -- Jack Jansen, , http://www.cwi.nl/~jack If I can't dance I don't want to be part of your revolution -- Emma Goldman From hengist.podd at virgin.net Thu Apr 17 14:52:20 2008 From: hengist.podd at virgin.net (has) Date: Thu, 17 Apr 2008 13:52:20 +0100 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? (Brad Knowles) In-Reply-To: References: Message-ID: Brad Knowles wrote: > I know you hear about these version issues all the time (I have done > a bit of searching of the archives ;-), but I think this might be > the first case I'm aware of where someone is trying to backport > Python 2.3 to Mac OS X 10.5, as opposed to trying to get a newer > version of Python running on an older machine. FWIW, there is a Python 2.3.5 framework build included in 10.5 (/ System/Library/Frameworks/Python.framework/Versions/2.3), although it lacks a CLI interpreter and headers, and I've no idea if it's functional or not. has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net From brad at shub-internet.org Thu Apr 17 17:48:17 2008 From: brad at shub-internet.org (Brad Knowles) Date: Thu, 17 Apr 2008 10:48:17 -0500 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? In-Reply-To: <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> References: <4806A929.6080305@shub-internet.org> <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> Message-ID: <48077141.5080704@shub-internet.org> Jack Jansen wrote: > there's only one potential problem and that's the PPC/Intel issue. If > you have a PowerPC mac (or you can live with running Python under > Rosetta on an Intel Mac) I would first try to download a binary 2.3.X. > My guess is that there's a 90% chance that it works. The issue might be > finding compatible binary installers for Tcl/Tk and wxPython. My desktop machine is a PowerMac G5 (PPC), running Mac OS X 10.5. And I figured that wxPython and Tcl/Tk Aqua might have to be re-installed and pointed to the back-ported Python 2.3 installation, but I figured I'd cross that bridge when I came to it. > If the binary installer doesn't work just build the source. My primary concern is (was?) that the older binary builds are talking about things like Mac OS X 10.3 or Mac OS X 10.4, and I don't know what may have changed between 10.3/10.4 and 10.5 that might cause them to break. > BUT (large > but, here): don't try to build for Intel, only for PPC. This is a case where I don't care about Intel, so that's not a problem. Now, when my new machine arrives, then I'll care about Intel, but by then maybe Access Grid will have been updated to work with Python 2.5, and I won't have a problem. -- Brad Knowles LinkedIn Profile: From brad at shub-internet.org Thu Apr 17 18:40:10 2008 From: brad at shub-internet.org (Brad Knowles) Date: Thu, 17 Apr 2008 11:40:10 -0500 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? In-Reply-To: <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> References: <4806A929.6080305@shub-internet.org> <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> Message-ID: <48077D6A.1020708@shub-internet.org> Jack Jansen wrote: > there's only one potential problem and that's the PPC/Intel issue. If > you have a PowerPC mac (or you can live with running Python under > Rosetta on an Intel Mac) I would first try to download a binary 2.3.X. There's a problem here. If you go to the python.org page for the latest release of 2.3.x (see ), it tells you that this is a source-only release, and anyone needing a binary release should use 2.3.5 (see ). However, there are no binary releases for Macintosh that are listed -- Windows gets one, but everyone else is supposed to use the source archive. Going to the Mac Python page at , there's pointers for newer binary installers (using Python 2.4.x) based on which OS you're running (see ), but nothing for the older binary installers (based on Python 2.3.x). Looking in the "Legacy Packages" at , I don't see any older binary installers. So, it looks like I have no choice but to try to do a source install of Python 2.3.7. Blargh. -- Brad Knowles LinkedIn Profile: From brad at shub-internet.org Thu Apr 17 19:05:49 2008 From: brad at shub-internet.org (Brad Knowles) Date: Thu, 17 Apr 2008 12:05:49 -0500 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? In-Reply-To: <48077D6A.1020708@shub-internet.org> References: <4806A929.6080305@shub-internet.org> <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> <48077D6A.1020708@shub-internet.org> Message-ID: <4807836D.9000505@shub-internet.org> Brad Knowles wrote: > So, it looks like I have no choice but to try to do a source install of > Python 2.3.7. Well, ran into my first problem. Actually, it's the same one that was reported by "j47" in the thread at . So far, I'm following the build instructions given at , and then I'm going to see if I can track down the problem alluded to at . -- Brad Knowles LinkedIn Profile: From brad at shub-internet.org Thu Apr 17 19:38:47 2008 From: brad at shub-internet.org (Brad Knowles) Date: Thu, 17 Apr 2008 12:38:47 -0500 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? In-Reply-To: <4807836D.9000505@shub-internet.org> References: <4806A929.6080305@shub-internet.org> <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> <48077D6A.1020708@shub-internet.org> <4807836D.9000505@shub-internet.org> Message-ID: <48078B27.8090402@shub-internet.org> Brad Knowles wrote: > Well, ran into my first problem. Actually, it's the same one that was > reported by "j47" in the thread at > . Actually, the first clue was at the top of that page. If you configure with "--disable-toolbox-glue", that will turn off the "-u __dummy" stuff: | case "$enable_toolbox_glue" in | yes) | extra_frameworks="-framework CoreServices -framework Foundation" | extra_machdep_objs="Python/mactoolboxglue.o" | extra_undefs="-u __dummy -u _PyMac_Error" However, the problem is that I don't know what else this might do. I definitely don't want to disable Tcl/Tk, since that's a vital part of Access Grid, and I'm going to be installing the Tcl/Tk Aqua stuff once I finally get Python 2.3 installed. And I have no idea what configuring with "--disable-framework" does, or whether Access Grid needs that. > So far, I'm following the build instructions given at > , > and then I'm going to see if I can track down the problem alluded to at > . As outlined at , if you configure with "MACOSX_DEPLOYMENT_TARGET=10.5", that does seem to grab the right definition for "SETPGRP_HAVE_ARG", but I don't know about the other items referenced on . Any other advice would be appreciated. -- Brad Knowles LinkedIn Profile: From conradwt at gmail.com Thu Apr 17 21:06:23 2008 From: conradwt at gmail.com (Conrad Taylor) Date: Thu, 17 Apr 2008 12:06:23 -0700 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? In-Reply-To: <48077141.5080704@shub-internet.org> References: <4806A929.6080305@shub-internet.org> <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> <48077141.5080704@shub-internet.org> Message-ID: <7317d7610804171206t5c98fe87p4110dec3790b72a2@mail.gmail.com> Hi, if your new machine will be arriving soon, I would recommend assisting the Access Grid team in doing the port. Then you'll not waste time trying to get Python 2.3.x and the associated version of Access Grid installed. Good luck, -Conrad On Thu, Apr 17, 2008 at 8:48 AM, Brad Knowles wrote: > Jack Jansen wrote: > > > there's only one potential problem and that's the PPC/Intel issue. If > > you have a PowerPC mac (or you can live with running Python under > > Rosetta on an Intel Mac) I would first try to download a binary 2.3.X. > > My guess is that there's a 90% chance that it works. The issue might be > > finding compatible binary installers for Tcl/Tk and wxPython. > > My desktop machine is a PowerMac G5 (PPC), running Mac OS X 10.5. And I > figured that wxPython and Tcl/Tk Aqua might have to be re-installed and > pointed to the back-ported Python 2.3 installation, but I figured I'd > cross > that bridge when I came to it. > > > If the binary installer doesn't work just build the source. > > My primary concern is (was?) that the older binary builds are talking > about > things like Mac OS X 10.3 or Mac OS X 10.4, and I don't know what may have > changed between 10.3/10.4 and 10.5 that might cause them to break. > > > BUT (large > > but, here): don't try to build for Intel, only for PPC. > > This is a case where I don't care about Intel, so that's not a problem. > > Now, when my new machine arrives, then I'll care about Intel, but by then > maybe Access Grid will have been updated to work with Python 2.5, and I > won't have a problem. > > -- > Brad Knowles > LinkedIn Profile: > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080417/385b043b/attachment.htm From janssen at parc.com Thu Apr 17 21:32:59 2008 From: janssen at parc.com (Bill Janssen) Date: Thu, 17 Apr 2008 12:32:59 PDT Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? In-Reply-To: <48078B27.8090402@shub-internet.org> References: <4806A929.6080305@shub-internet.org> <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> <48077D6A.1020708@shub-internet.org> <4807836D.9000505@shub-internet.org> <48078B27.8090402@shub-internet.org> Message-ID: <08Apr17.123302pdt."58696"@synergy1.parc.xerox.com> > And I have no idea what configuring with "--disable-framework" does, or > whether Access Grid needs that. Well, that's your real problem. You don't know what kind of Python facilities your application needs. But in general, yes, definitely configure with --disable-toolbox-glue and --disable-framework. Here's what I use when I build Python on my 10.5 system: ./configure --disable-universalsdk --disable-framework --disable-toolbox-glue Bill From brad at shub-internet.org Thu Apr 17 22:07:52 2008 From: brad at shub-internet.org (Brad Knowles) Date: Thu, 17 Apr 2008 15:07:52 -0500 Subject: [Pythonmac-SIG] Back-porting Python 2.3 to Mac OS X 10.5? In-Reply-To: <7317d7610804171206t5c98fe87p4110dec3790b72a2@mail.gmail.com> References: <4806A929.6080305@shub-internet.org> <00BD207F-3E61-4185-8D12-1BDBB6F5E5DE@cwi.nl> <48077141.5080704@shub-internet.org> <7317d7610804171206t5c98fe87p4110dec3790b72a2@mail.gmail.com> Message-ID: <4807AE18.9070303@shub-internet.org> Conrad Taylor wrote: > Hi, if your new machine will be arriving soon, I would recommend assisting > the Access Grid team in doing the port. Then you'll not waste time trying > to get Python 2.3.x and the associated version of Access Grid installed. Regretfully, I have no idea when the new machine will be arriving. The new monitors that were ordered with it just came in, but they're from a different manufacturer. Actually, I think I may be most of the way towards getting Python 2.3 installed with Access Grid working. I think I may just have to re-install Access Grid now. Thanks! -- Brad Knowles LinkedIn Profile: From christopher.e.kees at usace.army.mil Wed Apr 16 18:43:31 2008 From: christopher.e.kees at usace.army.mil (Chris Kees) Date: Wed, 16 Apr 2008 11:43:31 -0500 Subject: [Pythonmac-SIG] Finding the memory usage of a Python process In-Reply-To: <9c34c72e0804151206rc25c26bj790a4dd21b40376e@mail.gmail.com> References: <9c34c72e0804151206rc25c26bj790a4dd21b40376e@mail.gmail.com> Message-ID: I have been using an approach like Gary's below, but I just noticed that it can't calculate the memory correctly once the resident size gets over about 4G. The 'top' command seems correct but not 'ps'. On Apr 15, 2008, at 2:06 PM, Gary Bernhardt wrote: > On 4/15/08, Konrad Hinsen wrote: >> I am trying to obtain the amount of memory that my Python process >> uses from inside the Python program using resource.getrusage(). >> While >> this works fine under Linux, on the Mac I always get 0 for the >> memory >> usage (the time information seems credible though). >> >> Does anyone have another idea for monitoring memory usage on the >> Mac? > > I needed this as well but didn't find a clean way to do it. > Eventually I gave up and shelled out to "ps" with something like this: > > cmd = 'ps %i -o rss' % pid > pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE, > shell=True).stdout > mem_usage = int(pipe.readlines()[1]) > > -- > Gary > http://blog.extracheese.org > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From gmlobdell at seanet.com Tue Apr 22 09:22:53 2008 From: gmlobdell at seanet.com (Gregg Lobdell) Date: Tue, 22 Apr 2008 00:22:53 -0700 Subject: [Pythonmac-SIG] Full Screen Window Message-ID: <13C27761-81EF-46DF-99A1-E5F6FBA02F43@seanet.com> I'm using Python 2.5, wxPython, and PIL. I am working on a slide show application similar to what iPhoto does, but with some added features. I like the random feature of iPhoto, but I want to designate small sets of pictures that should always be shown in sequence. Anyway, my question is, how can I show an image full screen? I can make a large window, but that still leaves the menu bar and the window bar and the window border. I want to take over the entire screen for my images. Can I do this in wxPython on the Mac? If you could send me a code snippet, that would be most helpful. Thank you, Gregg Lobdell gmlobdell at seanet.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jott at watt.ame.nd.edu Tue Apr 22 14:34:46 2008 From: jott at watt.ame.nd.edu (John Ott) Date: Tue, 22 Apr 2008 08:34:46 -0400 (EDT) Subject: [Pythonmac-SIG] appscript path problem from a newbie Message-ID: has solved my problem. I recently upgraded my OmniOutliner and had two copies floating around. Double clicking Projects.oo3 opened 3.6.2 and python was opening 3.6.5. Thanks. John ************************************************************************ * * * * John Ott * Email: jott at watt.ame.nd.edu * * Dept. AME * * * 365 Fitzpatrick Hall * * * University of Notre Dame * Phone: (574) 631-8131 * * Notre Dame, IN 46556 USA * Fax: (574) 631-8341 * * * * ************************************************************************ From bduncan at jwcs.nsw.edu.au Tue Apr 22 15:37:27 2008 From: bduncan at jwcs.nsw.edu.au (Brett Duncan) Date: Tue, 22 Apr 2008 23:37:27 +1000 Subject: [Pythonmac-SIG] Problem with File dialog Message-ID: <480DEA17.4080007@jwcs.nsw.edu.au> Hello List! I'm trying to add a file selector to a program I'm working on (I'm using wxPython on an Intel MacBook Pro, OS X 10.4.11), but I keep getting the following error whenever I run the program and try selecting a file: Traceback (most recent call last): File "ConvertGUI.py", line 56, in SelectFile if dialog.ShowModal() == wx.ID_OK: File "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-ansi/wx/_windows.py", line 707, in ShowModal return _windows_.Dialog_ShowModal(*args, **kwargs) wx._core.PyAssertionError: C++ assertion "filterIndex == 0 || !isName" failed at /BUILD/wxPython-src-2.8.7.1/src/mac/carbon/filedlg.cpp(162) in MakeUserDataRec(): incorrect format of format string Can anyone tell me what the problem is/where I've screwed up/how to fix this? Thanks, Brett From bb at brianberliner.com Wed Apr 23 01:31:28 2008 From: bb at brianberliner.com (Brian Berliner) Date: Tue, 22 Apr 2008 16:31:28 -0700 Subject: [Pythonmac-SIG] Xcode 3.0 and Compiled Python Files? Message-ID: <46BDA4CD-298B-463C-B519-D81974BEFC15@brianberliner.com> I'm playing around with the Python support in Xcode 3.0 (under Leopard). I'd like to have my built app include only .pyc (or .pyo) files and not to include the .py source files. 1. Is this possible? 2. How do I do it? 3. Is there a way to obfuscate the code so that it is not easy to disassamble? Thanks! -Brian From Chris.Barker at noaa.gov Wed Apr 23 02:02:09 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Tue, 22 Apr 2008 17:02:09 -0700 Subject: [Pythonmac-SIG] Xcode 3.0 and Compiled Python Files? In-Reply-To: <46BDA4CD-298B-463C-B519-D81974BEFC15@brianberliner.com> References: <46BDA4CD-298B-463C-B519-D81974BEFC15@brianberliner.com> Message-ID: <480E7C81.1070200@noaa.gov> Brian Berliner wrote: > I'd like to have my built app include only .pyc (or .pyo) files and not > to include the .py source files. > > 1. Is this possible? > 2. How do I do it? py2app puts all the *.pyc files you need into the application bundle. I don't think it includes any *.py files except for your main file. > 3. Is there a way to obfuscate the code so that it is not easy to > disassamble? Not really -- python byte code is not supposed to be all that hard to read, but it's not python source either -- someone would have to want to copy your code pretty bad to bother. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From bb at brianberliner.com Wed Apr 23 17:00:31 2008 From: bb at brianberliner.com (Brian Berliner) Date: Wed, 23 Apr 2008 08:00:31 -0700 Subject: [Pythonmac-SIG] Xcode 3.0 and Compiled Python Files? In-Reply-To: <480E7C81.1070200@noaa.gov> References: <46BDA4CD-298B-463C-B519-D81974BEFC15@brianberliner.com> <480E7C81.1070200@noaa.gov> Message-ID: Hi Chris, Thanks for the response. So, I'm using Xcode 3.0 with Python and Objective-C/Cocoa files intermixed. Right now, I just do the Xcode "Build" process, which creates my foo.app package. Would py2app be appropriate for me, since I have mixed Xcode/Cocoa and Python files, currently controlled by the Xcode build environment? Also, I'm developing on Leopard for Leopard, if that matters... Thanks! -Brian On Apr 22, 2008, at 5:02 PM, Christopher Barker wrote: > Brian Berliner wrote: >> I'd like to have my built app include only .pyc (or .pyo) files and >> not to include the .py source files. >> 1. Is this possible? >> 2. How do I do it? > > py2app puts all the *.pyc files you need into the application > bundle. I > don't think it includes any *.py files except for your main file. > >> 3. Is there a way to obfuscate the code so that it is not easy to >> disassamble? > > Not really -- python byte code is not supposed to be all that hard to > read, but it's not python source either -- someone would have to > want to > copy your code pretty bad to bother. > > -Chris > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From Chris.Barker at noaa.gov Wed Apr 23 18:05:21 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 23 Apr 2008 09:05:21 -0700 Subject: [Pythonmac-SIG] Xcode 3.0 and Compiled Python Files? In-Reply-To: References: <46BDA4CD-298B-463C-B519-D81974BEFC15@brianberliner.com> <480E7C81.1070200@noaa.gov> Message-ID: <480F5E41.6070905@noaa.gov> Brian Berliner wrote: > So, I'm using Xcode 3.0 with Python and Objective-C/Cocoa files intermixed. > Right now, I just do the Xcode "Build" process, which creates my foo.app > package. I have no idea how Xcode builds a combined Python/ObjectiveC app. IN fact, I didn't know it could do it at all -- is it embedding python? > Would py2app be appropriate for me, It sounds like XCode is building your app for you, if so, you don't need py2app. Does the resulting app bundle work as a stand-alone on a stock Leopard install? I'd take a look in the resulting app bundle and see what's there. It may only have *.pyc files anyway, so you're done. > Also, I'm developing on Leopard for Leopard, if that matters... Which means you are probably using the Apple-supplied python, and that the resulting app bundle relies on it. That's fine, as long as you only need to deploy on Leopard (though I'd make sure to test on both PPC and Intel, if you do need to support both). Be aware, however, than Apple has always replaced python with a new version with OS upgrades, so your app bundle may not work on future versions of OS-X. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Wed Apr 23 18:54:14 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 23 Apr 2008 09:54:14 -0700 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> Message-ID: <480F69B6.6050203@noaa.gov> George Nurser wrote: > Apologies for perhaps raising an old chestnut here.... but these > issues would not arise if we had separate intel and ppc MacPython > binaries. But all sorts of other issues would arise. The tricky bit to all of this is getting/building Universal versions of the various dependencies. I still have no idea why Apple doesn't just provide a few more common libs, like libpng and libfreetype (which is now included with X11, but as I understand it, that's an optional install). Anyway as we don't have any control over what Apples does (and even less control over what they have already not done!), we need other solutions: My proposal: We try to build a consensus among the MacPython community about a "standard" way to deal with common dependencies. There is now more-or-less a consensus that we should provide binaries for MacPython (and now 10.5's Apple python) that are statically linked against universal versions of all the dependencies. That works great, but the truth is that it's a pain in the $$%#@ to get those dependencies built right, so we've substantially raised the barrier for folks to build binary packages. Also, it seems a bit silly to separately deal with something like libpng for multiple packages. I think I've got at least four python extensions with libpng. For example: Fredrik Lundh recently asked on the PIL list for recommendations as to what binaries he should provide for OS-X, and for someone to build them (he doesn't have a Mac). I set out to do it for him, and am still mired in dependency heck. Note that the key dependencies are the same as for Matplotlib (libpng, libfreetype) My proposal for the "standard" way to provide the libs: Kyng Chaos (William Kyngesburye)'s Frameworks: http://www.kyngchaos.com/wiki/software:frameworks He's got UnixImageIO, which provides libpng and others, and freetype, plus a bunch of others. They are all build as proper versioned OS-X frameworks, as well as a nice little hack where he puts soft links in to create a standard "unixy" hierarchy, so that they can be used by libs that don't understand frameworks. Yes, it's a bit extra to tell folks to first install these two frameworks, then whatever the python package lib is, but I think it really would make it easier all around, particularly for package builders, and making things easier for package builders means that more binaries would be built properly, which would make things easier for users. Note: William's Frameworks are all versioned properly, so there would be no harm in installing them multiple times, or having multiple versions installed. In fact, I think you could build a *.mpkg that had both your python package and the frameworks it needs, so that users would have a one download and one click install. It wouldn't hurt to have multiple packages with the same Frameworks installed this way. Thoughts? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From nathan.stocks at gmail.com Wed Apr 23 19:01:52 2008 From: nathan.stocks at gmail.com (Nathan) Date: Wed, 23 Apr 2008 11:01:52 -0600 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <480F69B6.6050203@noaa.gov> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> Message-ID: <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> On Wed, Apr 23, 2008 at 10:54 AM, Christopher Barker wrote: > libpng and libfreetype (which is now included with X11, but as I understand > it, that's an optional install). Anyway as we don't have any control over X11 is installed by default under Leopard. In fact, I'm not sure there's even an option _not_ to install it under Leopard... Under Tiger and Panther X11 was an optional install only included on the install DVD and Apple site, respectively. I'm not qualified to comment on the actual content of your message, so I'll just stop here. :-) ~ Nathan From nathan.stocks at gmail.com Wed Apr 23 19:04:41 2008 From: nathan.stocks at gmail.com (Nathan) Date: Wed, 23 Apr 2008 11:04:41 -0600 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> Message-ID: <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> On Wed, Apr 23, 2008 at 11:01 AM, Nathan wrote: > On Wed, Apr 23, 2008 at 10:54 AM, Christopher Barker > wrote: > > libpng and libfreetype (which is now included with X11, but as I understand > > it, that's an optional install). Anyway as we don't have any control over > > X11 is installed by default under Leopard. In fact, I'm not sure > there's even an option _not_ to install it under Leopard... > > Under Tiger and Panther X11 was an optional install only included on > the install DVD and Apple site, respectively. > > I'm not qualified to comment on the actual content of your message, so > I'll just stop here. :-) Oh, and if you have any X11-related development questions (libpng, for example), I highly encourage joining the xquartz-dev mailing list. It's the open-source dev list for apple's x11. It's very active and the x11-apple employees are very helpful. http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev ~ Nathan From bb at brianberliner.com Wed Apr 23 19:08:23 2008 From: bb at brianberliner.com (Brian Berliner) Date: Wed, 23 Apr 2008 10:08:23 -0700 Subject: [Pythonmac-SIG] Xcode 3.0 and Compiled Python Files? In-Reply-To: <480F5E41.6070905@noaa.gov> References: <46BDA4CD-298B-463C-B519-D81974BEFC15@brianberliner.com> <480E7C81.1070200@noaa.gov> <480F5E41.6070905@noaa.gov> Message-ID: On Apr 23, 2008, at 9:05 AM, Christopher Barker wrote: > Brian Berliner wrote: >> So, I'm using Xcode 3.0 with Python and Objective-C/Cocoa files >> intermixed. >> Right now, I just do the Xcode "Build" process, which creates my >> foo.app package. > > I have no idea how Xcode builds a combined Python/ObjectiveC app. IN > fact, I didn't know it could do it at all -- is it embedding python? I'm using the Apple-supplied Python in 10.5 Leopard. And, at least for now, that is good enough, as it reduces my test burden. I like that everything is neatly integrated into Xcode. I just didn't like that I couldn't tweak the Xcode build to pre- compile the Python files. >> Would py2app be appropriate for me, > > It sounds like XCode is building your app for you, if so, you don't > need py2app. > > Does the resulting app bundle work as a stand-alone on a stock > Leopard install? > > I'd take a look in the resulting app bundle and see what's there. It > may only have *.pyc files anyway, so you're done. Looks like Xcode 3.0 just copies the .py files directly to the Resources folder in the bundle. No processing whatsoever. I can't find any easy way of changing that behaviour. Anyone? Yes, the App Bundle that Xcode generates works fine on a stock Leopard install (since Python is installed with every Leopard system). I played around with setting up a build rule in Xcode for *.py files, but that force-compiled every .py file, and it appears that you cannot compile the "main.py" file and have things still work. So, instead, I wrote the following "Run Script Phase" for the Target in Xcode (which runs as a last-step in the build): ================ #!/bin/sh if [ "$ACTION" != "build" ]; then echo "$ACTION Complete" exit 0 fi build_dir="${CONFIGURATION_BUILD_DIR}/$ {UNLOCALIZED_RESOURCES_FOLDER_PATH}" if [ "${CONFIGURATION_BUILD_DIR}" != "" -a "$ {UNLOCALIZED_RESOURCES_FOLDER_PATH}" != "" -a -d "$build_dir" ]; then cd "$build_dir" for python_file in `find * -name '*.py' -print`; do if [ "$python_file" != "main.py" ]; then python -m py_compile "$python_file" rm -f "$python_file" fi done fi echo "Build Complete!" exit 0 ================ For some reason, I could not build with "python -O", as Python could not load my modules if they are *.pyo files. Bummer. This may be good enough to get me going. Now, any advice on an obfuscator? > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov -Brian From Chris.Barker at noaa.gov Wed Apr 23 19:18:42 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 23 Apr 2008 10:18:42 -0700 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> Message-ID: <480F6F72.80307@noaa.gov> Nathan wrote: > Oh, and if you have any X11-related development questions (libpng, for > example), I don't have leopard, so I'll ask you -- does X11 include both libpng and libfreetype? If so , then I guess that's the way to go for the Leopard builds -- maybe Apple will make our lives easier eventually. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From nathan.stocks at gmail.com Wed Apr 23 19:20:24 2008 From: nathan.stocks at gmail.com (Nathan) Date: Wed, 23 Apr 2008 11:20:24 -0600 Subject: [Pythonmac-SIG] Xcode 3.0 and Compiled Python Files? In-Reply-To: References: <46BDA4CD-298B-463C-B519-D81974BEFC15@brianberliner.com> <480E7C81.1070200@noaa.gov> <480F5E41.6070905@noaa.gov> Message-ID: <96c9d6a80804231020n5966a23ep149beb05f8dd56d@mail.gmail.com> On Wed, Apr 23, 2008 at 11:08 AM, Brian Berliner wrote: > Looks like Xcode 3.0 just copies the .py files directly to the Resources > folder in the bundle. > No processing whatsoever. > I can't find any easy way of changing that behaviour. > Anyone? I've never used Xcode, though I've wanted to learn. I bet lots of people on this list have, though: http://lists.apple.com/mailman/listinfo/xcode-users ~ Nathan From nathan.stocks at gmail.com Wed Apr 23 19:25:03 2008 From: nathan.stocks at gmail.com (Nathan) Date: Wed, 23 Apr 2008 11:25:03 -0600 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <480F6F72.80307@noaa.gov> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> Message-ID: <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> My guess would be yes. $ locate *libpng* | grep -Ev 'opt|App|old' /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng/png.h /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng/pngconf.h /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng.3.0.0.dylib /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng.3.dylib /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng.dylib /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng12.0.0.0.dylib /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng12.0.dylib /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libpng12.dylib /Developer/usr/X11/man/man3/libpng.3 /Developer/usr/X11/man/man3/libpngpf.3 /System/Library/Tcl/Img1.3/libpngtcl1.0.dylib /usr/X11/bin/libpng-config /usr/X11/bin/libpng12-config /usr/X11/include/libpng /usr/X11/include/libpng/png.h /usr/X11/include/libpng/pngconf.h /usr/X11/include/libpng12 /usr/X11/include/libpng12/png.h /usr/X11/include/libpng12/pngconf.h /usr/X11/lib/libpng.3.0.0.dylib /usr/X11/lib/libpng.3.24.0.dylib /usr/X11/lib/libpng.3.dylib /usr/X11/lib/libpng.dylib /usr/X11/lib/libpng.la /usr/X11/lib/libpng12.0.0.0.dylib /usr/X11/lib/libpng12.0.24.0.dylib /usr/X11/lib/libpng12.0.dylib /usr/X11/lib/libpng12.dylib /usr/X11/lib/libpng12.la /usr/X11/lib/pkgconfig/libpng.pc /usr/X11/lib/pkgconfig/libpng12.pc /usr/X11/man/man3/libpng.3 /usr/X11/man/man3/libpngpf.3 $ locate *libfreetype* | grep -Ev 'opt|App|old' /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libfreetype.6.3.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libfreetype.6.dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libfreetype.a /Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/lib/libfreetype.dylib /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libfreetype.6.3.16.dylib /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libfreetype.6.dylib /Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib/libfreetype.dylib /usr/X11/lib/libfreetype.6.3.16.dylib /usr/X11/lib/libfreetype.6.dylib /usr/X11/lib/libfreetype.dylib /usr/X11/lib/libfreetype.la ~ Nathan From Chris.Barker at noaa.gov Thu Apr 24 00:21:23 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Wed, 23 Apr 2008 15:21:23 -0700 Subject: [Pythonmac-SIG] Is there a run-time way to tell if you're running fink, macports, etc? Message-ID: <480FB663.5040208@noaa.gov> Hi all, sys.platform returns "darwin" for all of the various python builds on OS-X. I"d like to know if I"m running a framework build, or fink, or macports, or whatever build -- is there a runtime way to do that? Is looking at sys.executable the best(only?) way? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From ronaldoussoren at mac.com Thu Apr 24 13:11:35 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 24 Apr 2008 13:11:35 +0200 Subject: [Pythonmac-SIG] Is there a run-time way to tell if you're running fink, macports, etc? In-Reply-To: <480FB663.5040208@noaa.gov> References: <480FB663.5040208@noaa.gov> Message-ID: <8081698A-64E9-4D7F-9B46-CDD82364A05C@mac.com> On 24 Apr, 2008, at 0:21, Christopher Barker wrote: > Hi all, > > sys.platform returns "darwin" for all of the various python builds > on OS-X. I"d like to know if I"m running a framework build, or fink, > or macports, or whatever build -- is there a runtime way to do that? > > Is looking at sys.executable the best(only?) way? Looking at sys.prefix is better than sys.executable. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From gary at zope.com Thu Apr 24 14:40:49 2008 From: gary at zope.com (Gary Poster) Date: Thu, 24 Apr 2008 08:40:49 -0400 Subject: [Pythonmac-SIG] non-framework Python 2.5.2 has empty lib-dynload Message-ID: Hi. I'm assuming this is a python-on-mac oddity, but maybe I'm wrong. I wanted a local non-framework build of Python 2.5.2. I did the following in a Python 2.5.2 source download: ./configure --prefix=/Users/gary/opt/py25 LDFLAGS=-L/opt/local/lib OPT=-I/opt/local/include make make install (The LDFLAGS and OPT are there to get readline and zlib from Darwin Ports in the Python.) I got some warnings about expat, but nothing serious during configure and make. But oddly, /Users/gary/opt/py25/library/python2.5/lib-dynload was completely empty. So, for instance, I couldn't do basic things like ``import math``. I then did make test. A few unrelated things failed--expat related, for instance--but most tests passed, including math tests. In fact, the .so files were in the build directory. I then did the following: ln build/lib.macosx-10.3-i386-2.5/*.so ~/opt/py25/lib/python2.5/lib- dynload/ Now everything seems to work. :-D :-/ Anybody know if I did something wrong? Or is this a bug in the Python 2.5 build? I couldn't find a similar report with Google, but maybe I wasn't looking in the right metaphorical corner. Gary From gary at zope.com Thu Apr 24 16:23:12 2008 From: gary at zope.com (Gary Poster) Date: Thu, 24 Apr 2008 10:23:12 -0400 Subject: [Pythonmac-SIG] non-framework Python 2.5.2 has empty lib-dynload In-Reply-To: References: Message-ID: <0C151A03-BC3D-4A4D-9BD8-035599674E89@zope.com> More notes on this. (1) --disable-toolbox-glue did not help: ./configure --prefix=/Users/gary/opt/py25 LDFLAGS=-L/opt/local/lib OPT=-I/opt/local/include --disable-toolbox-glue (...this then led to the same problem I reported before, eventually). (2) Looking at the ``make install`` output, it seems the .so files went into ~/Library/Python/2.5/site-packages, rather than where I had requested: copying build/lib.macosx-10.3-i386-2.5/cmath.so -> /Users/gary/Library/ Python/2.5/site-packages This seems like the best clue, but I wasn't able to take it anywhere myself. (3) I decided to doublecheck my PYTHONHOME and PYTHONPATH environment variables imposter:Python-2.5.2 gary$ echo $PYTHONHOME imposter:Python-2.5.2 gary$ echo $PYTHONPATH I then did a quick glance at ``env``: nothing seemed amiss. Will look more as I have time. Gary On Apr 24, 2008, at 8:40 AM, Gary Poster wrote: > Hi. I'm assuming this is a python-on-mac oddity, but maybe I'm wrong. > > I wanted a local non-framework build of Python 2.5.2. I did the > following in a Python 2.5.2 source download: > > ./configure --prefix=/Users/gary/opt/py25 LDFLAGS=-L/opt/local/lib > OPT=-I/opt/local/include > make > make install > > (The LDFLAGS and OPT are there to get readline and zlib from Darwin > Ports in the Python.) > > I got some warnings about expat, but nothing serious during > configure and make. > > But oddly, /Users/gary/opt/py25/library/python2.5/lib-dynload was > completely empty. So, for instance, I couldn't do basic things like > ``import math``. > > I then did make test. A few unrelated things failed--expat related, > for instance--but most tests passed, including math tests. In fact, > the .so files were in the build directory. > > I then did the following: > > ln build/lib.macosx-10.3-i386-2.5/*.so ~/opt/py25/lib/python2.5/lib- > dynload/ > > Now everything seems to work. :-D :-/ > > Anybody know if I did something wrong? Or is this a bug in the > Python 2.5 build? I couldn't find a similar report with Google, but > maybe I wasn't looking in the right metaphorical corner. > > Gary > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig From ronaldoussoren at mac.com Thu Apr 24 16:56:40 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Thu, 24 Apr 2008 16:56:40 +0200 Subject: [Pythonmac-SIG] non-framework Python 2.5.2 has empty lib-dynload In-Reply-To: References: Message-ID: <52A0578D-C68A-429D-8916-BB807258811E@mac.com> On 24 Apr, 2008, at 14:40, Gary Poster wrote: > Hi. I'm assuming this is a python-on-mac oddity, but maybe I'm wrong. There's probably something wrong with your environment, although I don't know what that could be, as you've already excluded the most likely problems in your next message. Do you by any chance have a .pydistutils.cfg file in your home directory? I regularly use non-framework installs when testing and those work fine. Ronald -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From gary at zope.com Thu Apr 24 17:41:41 2008 From: gary at zope.com (Gary Poster) Date: Thu, 24 Apr 2008 11:41:41 -0400 Subject: [Pythonmac-SIG] non-framework Python 2.5.2 has empty lib-dynload In-Reply-To: <52A0578D-C68A-429D-8916-BB807258811E@mac.com> References: <52A0578D-C68A-429D-8916-BB807258811E@mac.com> Message-ID: <9B87CB4D-729F-468E-82E2-2C67A92E896C@zope.com> On Apr 24, 2008, at 10:56 AM, Ronald Oussoren wrote: > > On 24 Apr, 2008, at 14:40, Gary Poster wrote: > >> Hi. I'm assuming this is a python-on-mac oddity, but maybe I'm >> wrong. > > There's probably something wrong with your environment, although I > don't know what that could be, as you've already excluded the most > likely problems in your next message. > > Do you by any chance have a .pydistutils.cfg file in your home > directory? Ah-ha! I had a feeling it was something like that but I hadn't connected the dots yet. Yes, thank you very much! For reference, these are the offending lines in my .pydistutils.cfg: [install] install_lib = ~/Library/Python/$py_version_short/site-packages install_scripts = ~/bin install_lib is apparently honored during this installation, and install_scripts is not. I have these because I want to use easy install for system Python-ish things but don't want to pollute my system Python with whatever I experiment with or easy_install pulls along. If anyone knows a command-line way to temporarily disable this setting while building a package, that would be cool! But for now, I've just moved it aside. Thanks again. Gary From Chris.Barker at noaa.gov Thu Apr 24 18:31:36 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 24 Apr 2008 09:31:36 -0700 Subject: [Pythonmac-SIG] Is there a run-time way to tell if you're running fink, macports, etc? In-Reply-To: <8081698A-64E9-4D7F-9B46-CDD82364A05C@mac.com> References: <480FB663.5040208@noaa.gov> <8081698A-64E9-4D7F-9B46-CDD82364A05C@mac.com> Message-ID: <4810B5E8.5090301@noaa.gov> Ronald Oussoren wrote: > Looking at sys.prefix is better than sys.executable. great, thanks. much better. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Thu Apr 24 18:32:47 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 24 Apr 2008 09:32:47 -0700 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> Message-ID: <4810B62F.1020908@noaa.gov> One more, How about libjpeg? -Chris Nathan wrote: > My guess would be yes. > > $ locate *libpng* | grep -Ev 'opt|App|old' > /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng > /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng/png.h -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From skip at pobox.com Thu Apr 24 18:47:09 2008 From: skip at pobox.com (skip at pobox.com) Date: Thu, 24 Apr 2008 11:47:09 -0500 Subject: [Pythonmac-SIG] non-framework Python 2.5.2 has empty lib-dynload In-Reply-To: References: Message-ID: <18448.47501.392960.695182@montanaro-dyndns-org.local> Gary> ./configure --prefix=/Users/gary/opt/py25 LDFLAGS=-L/opt/local/lib Gary> OPT=-I/opt/local/include Gary> make Gary> make install Gary> (The LDFLAGS and OPT are there to get readline and zlib from Darwin Gary> Ports in the Python.) Gary> I got some warnings about expat, but nothing serious during configure Gary> and make. Gary> But oddly, /Users/gary/opt/py25/library/python2.5/lib-dynload was Gary> completely empty. So, for instance, I couldn't do basic things Gary> like ``import math``. Works for me. I build a number of different versions on my Mac quite frequently. Just to make sure I wasn't fooling myself, I svn up'd my 2.5 branch, then reran configure make clean make -j2 make altinstall and then checked the lib-dynload timestamps. They looked fine. You can try running make -n altinstall and looking at the end of the output. You should see something like this: for i in X ; do \ if test $i != X; then \ echo /usr/bin/install -c -m 555 $i /Users/skip/local/lib/python2.5/lib-dynload/`basename $i`; \ /usr/bin/install -c -m 555 $i /Users/skip/local/lib/python2.5/lib-dynload/`basename $i`; \ fi; \ done That install command is what populates your lib-dynloads directory. Skip From Chris.Barker at noaa.gov Thu Apr 24 19:02:50 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 24 Apr 2008 10:02:50 -0700 Subject: [Pythonmac-SIG] non-framework Python 2.5.2 has empty lib-dynload In-Reply-To: <18448.47501.392960.695182@montanaro-dyndns-org.local> References: <18448.47501.392960.695182@montanaro-dyndns-org.local> Message-ID: <4810BD3A.5030907@noaa.gov> skip at pobox.com wrote: > make altinstall maybe that's it -- I think the OP was running "install" rather than "altinstall". What is altinstall supposed to do differently? -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From skip at pobox.com Thu Apr 24 19:20:01 2008 From: skip at pobox.com (skip at pobox.com) Date: Thu, 24 Apr 2008 12:20:01 -0500 Subject: [Pythonmac-SIG] non-framework Python 2.5.2 has empty lib-dynload In-Reply-To: <4810BD3A.5030907@noaa.gov> References: <18448.47501.392960.695182@montanaro-dyndns-org.local> <4810BD3A.5030907@noaa.gov> Message-ID: <18448.49473.111178.642831@montanaro-dyndns-org.local> CHB> skip at pobox.com wrote: >> make altinstall CHB> maybe that's it -- I think the OP was running "install" rather than CHB> "altinstall". What is altinstall supposed to do differently? Nah... The install target depends on the altinstall target. All it does beyond that is create a symlink called "python" and install the Python man page. Skip From woklist at kyngchaos.com Thu Apr 24 20:20:38 2008 From: woklist at kyngchaos.com (William Kyngesburye) Date: Thu, 24 Apr 2008 13:20:38 -0500 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <480F6F72.80307@noaa.gov> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> Message-ID: On Apr 23, 2008, at 12:18 PM, Christopher Barker wrote: > Nathan wrote: >> Oh, and if you have any X11-related development questions (libpng, >> for >> example), > > I don't have leopard, so I'll ask you -- does X11 include both > libpng and libfreetype? If so , then I guess that's the way to go > for the Leopard builds -- maybe Apple will make our lives easier > eventually. > > -Chris A couple notes on Apple's X11 Freetype build: * Strangely, Apple doesn't build Freetype with a few Apple-specific options (ftoption.h): - TT_CONFIG_OPTION_BYTECODE_INTERPRETER - to use the TT hinting. As the ftoptions.h note says for this, the hinting (code?) is patented. I take the (very possibly naive) view in my framework that since we Mac users are using this in OSX, we can use this. If others know better, I can always remove this from my framework builds (maybe the FT auto-hinter works well enough). - TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED - affects composite glyphs, the option is a matter or how Apple vs MS defines offsets. So why does Apple not build FT with Apple offsets?! There are some issues in the OSX 10.4 X11 Freetype handling Mac suitcase-packaged fonts, and I think a couple font package formats were left out (dfont?). They are probably fixed in Leopard's X11 FT, since it uses FT 2.3.5. But this leaves a disparity between Tiger and Leopard as to what is supported. ----- William Kyngesburye http://www.kyngchaos.com/ "This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?" - The Ruler of the Universe From Chris.Barker at noaa.gov Thu Apr 24 21:33:58 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 24 Apr 2008 12:33:58 -0700 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> Message-ID: <4810E0A6.9000005@noaa.gov> William Kyngesburye wrote: > This rambling was probably unnecessary, but the upshot is don't expect > Apple to add other image libraries to the system or X11. We're on our own. OK. So I see it this way: For the "MacPython" build (2.5.2, runs on OS-X 10.3.9 and above), we need: libpng libfreetype libjpeg others? For Apple's 2.5 build that comes with leopard, we need: libjpeg (freetype and png can come from X11) Is that right? Or should we just use our own for Apple's build too? William, what do you think of my idea of trying to get distributors to standardize on your Frameworks? I haven't gotten any feedback yet, but I now some folks would rather not have any dependencies, even if they are easy to install. However, it really is a big 'ol pain in the *&^& to build universal versions of all these various libs. Would you consider adding static libs to your Frameworks so that we could at least tell distributor that they can just install a couple Frameworks and have all the static libs they need? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From gary.bernhardt at gmail.com Thu Apr 24 20:54:19 2008 From: gary.bernhardt at gmail.com (Gary Bernhardt) Date: Thu, 24 Apr 2008 14:54:19 -0400 Subject: [Pythonmac-SIG] Nested app bundles Message-ID: <9c34c72e0804241154o1fd513bepaeae9a16c36eb3c2@mail.gmail.com> I want to split my app into multiple independent .apps, but I don't want the user to have to care about that. I could just stick one app inside another's Contents/Resources, but that effectively doubles the total size. Both apps would have full copies of the Python binary, standard library, etc. Is there some way to trick the two apps into using the same binary and standard library? Or is there some other method I'm not seeing? -- Gary http://blog.extracheese.org From woklist at kyngchaos.com Thu Apr 24 20:52:38 2008 From: woklist at kyngchaos.com (William Kyngesburye) Date: Thu, 24 Apr 2008 13:52:38 -0500 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <4810B62F.1020908@noaa.gov> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> Message-ID: <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> Nowhere in the system (at least user-accessible). Generally, Apple only puts stuff it actually uses into its library collection (/usr/lib). X11 includes FT and PNG because they are basic to X11's operation, or at least needed for the most common X11-based software (maybe libjpeg is not used often in X11-based software). Also, PNG is new to Leopard's X11. That said, there are internal copies of libgif, libjpeg, libpng and libtiff (among others) in the ApplicationServices framework (ImageIO subframework, where I got the idea for my UnixImageIO framework). These are not publicly usable because they have no headers, though they appear to be unmodified. They are only used internally by the ApplicationServices API, and noone should attempt to use them directly. Apple made other hidden libraries directly usable, like libGL in the OpenGL framework, but they probably decided to make the image libraries unaccessible to provide a uniform API to image handling (iow, their individual APIs weren't vital to the function of the system or ApplicationServices API). This rambling was probably unnecessary, but the upshot is don't expect Apple to add other image libraries to the system or X11. We're on our own. On Apr 24, 2008, at 11:32 AM, Christopher Barker wrote: > One more, > > How about libjpeg? > > -Chris > Nathan wrote: >> My guess would be yes. >> $ locate *libpng* | grep -Ev 'opt|App|old' >> /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng >> /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng/png.h > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig ----- William Kyngesburye http://www.kyngchaos.com/ All generalizations are dangerous, even this one. From nathan.stocks at gmail.com Thu Apr 24 21:54:46 2008 From: nathan.stocks at gmail.com (Nathan) Date: Thu, 24 Apr 2008 13:54:46 -0600 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <4810B62F.1020908@noaa.gov> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> Message-ID: <96c9d6a80804241254n7eba81c2n386e38f1a51543d0@mail.gmail.com> $ locate *libjpeg* | grep -Ev 'opt|App|old' /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/libjpeg.jnilib /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Libraries/libjpeg.jnilib /System/Library/Tcl/Img1.3/libjpegtcl1.0.dylib On Thu, Apr 24, 2008 at 10:32 AM, Christopher Barker wrote: > One more, > > How about libjpeg? > > -Chris > > Nathan wrote: > > > My guess would be yes. > > > > $ locate *libpng* | grep -Ev 'opt|App|old' > > /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng > > /Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/libpng/png.h > > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > Chris.Barker at noaa.gov > From woklist at kyngchaos.com Thu Apr 24 22:38:08 2008 From: woklist at kyngchaos.com (William Kyngesburye) Date: Thu, 24 Apr 2008 15:38:08 -0500 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <4810E0A6.9000005@noaa.gov> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> <4810E0A6.9000005@noaa.gov> Message-ID: <53FF4D70-9B44-40BD-B802-FDCDA8E2A7E6@kyngchaos.com> On Apr 24, 2008, at 2:33 PM, Christopher Barker wrote: > William Kyngesburye wrote: >> This rambling was probably unnecessary, but the upshot is don't >> expect Apple to add other image libraries to the system or X11. >> We're on our own. > > OK. So I see it this way: > > For the "MacPython" build (2.5.2, runs on OS-X 10.3.9 and above), we > need: > libpng > libfreetype > libjpeg > others? > > For Apple's 2.5 build that comes with leopard, we need: > libjpeg > (freetype and png can come from X11) > > Is that right? Or should we just use our own for Apple's build too? Consistency is nice, especially on older systems that may have an old version where the changes include new features (as opposed to bug fixes). PNG updates are mostly bug fixes these days, but include important security updates that would be nice to have (Apple may update the system PNG but not X11 PNG?). Note: my frameworks are now for Tiger+ only. I dropped the Panther compatibility with the release of Leopard. It is possible to build the frameworks for Panther, though my current Xcode projects will only work on Leopard (you'd have to use the 10.3.9 SDK). I'm working on a non-Xcode method to easily create frameworks from the unix sources (except UnixImageIO, which needs the Xcode project). > William, what do you think of my idea of trying to get distributors > to standardize on your Frameworks? > Thanks. That was generally the idea, but I'm not a very proactive person ;) > I haven't gotten any feedback yet, but I now some folks would rather > not have any dependencies, even if they are easy to install. > However, it really is a big 'ol pain in the *&^& to build universal > versions of all these various libs. Would you consider adding static > libs to your Frameworks so that we could at least tell distributor > that they can just install a couple Frameworks and have all the > static libs they need? Using static libs, even if everyone uses the same binary, is basically what occurs now. All it really does is relieve the developers of compiling dependencies (though that's part of what you're talking about). But, static libs don't really belong in frameworks (and I don't like bloat). An option would be to bundle the frameworks in the Python framework. It would then be a courtesy of the Python packaging, and the Python packagers might not want to do that. If someone distributes a python application bundle (py2app or from Xcode), bundling the frameworks in that app's package would work, since framework bundling is standard stuff in applications. But for a Python extension (and other libraries and CLI programs that have no bundle home), I think worrying about dependency installation may be necessary. Creating an installer for a python extension that includes the necessary frameworks is an option. On Panther it may be tricky to have it install them only when absolutely necessary (ie not overwrite existing installed frameworks), but a Tiger/Leopard installer package can easily be made to do so. When I say existing installed frameworks, I mean compatible, though not necessarily more recent. With a common shared framework I don't think it would be nice to blow away an older version with a newer version if the older one is compatible. The installer can make the "update" optional. ----- William Kyngesburye http://www.kyngchaos.com/ "Those people who most want to rule people are, ipso-facto, those least suited to do it." - A rule of the universe, from the HitchHiker's Guide to the Galaxy From Chris.Barker at noaa.gov Fri Apr 25 01:55:16 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 24 Apr 2008 16:55:16 -0700 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <53FF4D70-9B44-40BD-B802-FDCDA8E2A7E6@kyngchaos.com> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> <4810E0A6.9000005@noaa.gov> <53FF4D70-9B44-40BD-B802-FDCDA8E2A7E6@kyngchaos.com> Message-ID: <48111DE4.1000902@noaa.gov> William Kyngesburye wrote: >> Is that right? Or should we just use our own for Apple's build too? > > Consistency is nice, especially on older systems that may have an old > version where the changes include new features (as opposed to bug > fixes). PNG updates are mostly bug fixes these days, but include > important security updates that would be nice to have (Apple may update > the system PNG but not X11 PNG?). I'm confused -- are you suggesting that we use your Frameworks for all this, even on newer apple systems that have them? > Note: my frameworks are now for Tiger+ only. I dropped the Panther > compatibility with the release of Leopard. I can live with that. > I'm working on a > non-Xcode method to easily create frameworks from the unix sources That would be a nice, A single script that does the whole build would be cool. >> William, what do you think of my idea of trying to get distributors to >> standardize on your Frameworks? >> > Thanks. That was generally the idea, but I'm not a very proactive > person ;) OK, so I'll keep pressing the point, but who knows? It really will only work if it's widely adopted. > Using static libs, even if everyone uses the same binary, is basically > what occurs now. All it really does is relieve the developers of > compiling dependencies (though that's part of what you're talking > about). Yes, that's exactly what I'm talking about. In order to build a package for OS-X, and particularly to do it right (static libs, Universal), is really a pain, so it's generally not done right. I like the dynamic libs in a Framework approach better, but it's an extra dependency, and one that setuptools can't bring in for you. > But, static libs don't really belong in frameworks (and I don't > like bloat). No, but a standard place to get them and put them would be nice, if we need static libs. I thought that building them along with your dynamic ones would be minimal work. I suppose they could be put elsewhere, like in /usr/local or something. The point is that there is now nowhere to download these common static libs, and they are a pain to build. > An option would be to bundle the frameworks in the Python framework. It > would then be a courtesy of the Python packaging, and the Python > packagers might not want to do that. I suggested something like this a while back, but didn't get much support. It's not really python, after all. But I think we could get them put up on pythonmac.org/packages, right along with the python install, and all the packages. > If someone distributes a python application bundle (py2app or from > Xcode), bundling the frameworks in that app's package would work, since > framework bundling is standard stuff in applications. Yup, it seems to be working for me with PIL. > a Tiger/Leopard installer package can easily be made to > do so. yup. I figured that would work, and I don't think there would be any problem if, for instance, the matplotlib and PIL installers both had copies of the same UnixImageIO framework, would it? > When I say existing installed frameworks, I mean compatible, though not > necessarily more recent. With a common shared framework I don't think > it would be nice to blow away an older version with a newer version if > the older one is compatible. The installer can make the "update" optional. can't the newer version and older version live side by side? Anyway, I've almost got PIL tested, maybe you could make an installer from it with the frameworks it needs? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From Chris.Barker at noaa.gov Fri Apr 25 01:57:34 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Thu, 24 Apr 2008 16:57:34 -0700 Subject: [Pythonmac-SIG] Nested app bundles In-Reply-To: <9c34c72e0804241154o1fd513bepaeae9a16c36eb3c2@mail.gmail.com> References: <9c34c72e0804241154o1fd513bepaeae9a16c36eb3c2@mail.gmail.com> Message-ID: <48111E6E.7080604@noaa.gov> Gary Bernhardt wrote: > I want to split my app into multiple independent .apps, but I don't > want the user to have to care about that. I'm confused as to what you want. Do you want the user to have multiple app icons to click on? If not, then what are "independent .apps"? > I could just stick one app > inside another's Contents/Resources, but then the user would never see the inner .app -- what's the point? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From woklist at kyngchaos.com Fri Apr 25 03:28:44 2008 From: woklist at kyngchaos.com (William Kyngesburye) Date: Thu, 24 Apr 2008 20:28:44 -0500 Subject: [Pythonmac-SIG] Dependencies for Python packages on OS-X In-Reply-To: <48111DE4.1000902@noaa.gov> References: <480D3058.8070501@hawaii.edu> <9911419a0804222302x1e417cbdxfde399f1907f5f47@mail.gmail.com> <1d1e6ea70804230201t14a9e381qd3cee6be6ca47224@mail.gmail.com> <480F69B6.6050203@noaa.gov> <96c9d6a80804231001v20d48c0x2463a6f0ec1fc551@mail.gmail.com> <96c9d6a80804231004y16d0d7bbk14f313330676252f@mail.gmail.com> <480F6F72.80307@noaa.gov> <96c9d6a80804231025s13bb7fa7u92b37fdaac3bb8b3@mail.gmail.com> <4810B62F.1020908@noaa.gov> <9A733E3D-A01E-4688-8D3B-7310844BA3DA@kyngchaos.com> <4810E0A6.9000005@noaa.gov> <53FF4D70-9B44-40BD-B802-FDCDA8E2A7E6@kyngchaos.com> <48111DE4.1000902@noaa.gov> Message-ID: <6101F578-702B-4D0C-A4E0-9E137DB7C854@kyngchaos.com> On Apr 24, 2008, at 6:55 PM, Christopher Barker wrote: >> Consistency is nice, especially on older systems that may have an >> old version where the changes include new features (as opposed to >> bug fixes). PNG updates are mostly bug fixes these days, but >> include important security updates that would be nice to have >> (Apple may update the system PNG but not X11 PNG?). > > I'm confused -- are you suggesting that we use your Frameworks for > all this, even on newer apple systems that have them? > For Freetype, I guess it's just a preference - I prefer to leave X11 on its own, if I'm not compiling an app that needs X11, I don't want to depend on anything else related to X11. X11 is still optional on Leopard, even if it's a default install. I'm not sure about Leopard Server, if it's default or not (X11 doesn't make much sense on Server). Also, since libjpeg is needed on both, and the UnixImageIO framework includes the other image libs, might as well use them. >>> William, what do you think of my idea of trying to get >>> distributors to standardize on your Frameworks? >>> >> Thanks. That was generally the idea, but I'm not a very proactive >> person ;) > > OK, so I'll keep pressing the point, but who knows? It really will > only work if it's widely adopted. > I did get a lot of people saying hi at the OSGeo conference last fall, that used my stuff on Macs for web development. > I suggested something like this a while back, but didn't get much > support. It's not really python, after all. But I think we could get > them put up on pythonmac.org/packages, right along with the python > install, and all the packages. > Or links, otherwise I or someone would have to keep them in sync with my updates. >> a Tiger/Leopard installer package can easily be made to do so. > > yup. I figured that would work, and I don't think there would be any > problem if, for instance, the matplotlib and PIL installers both had > copies of the same UnixImageIO framework, would it? > No problem, that's what I meant - the installer can test if a compatible framework version is installed to decide if it needs to install its own bundled copy. > can't the newer version and older version live side by side? > Major versions can. Each has its own subfolder in the Versions folder. But updates within the major version overwrite the binaries. Framework versioning is really separate from library versioning. Apple uses the A, B, C... versioning, and you can have major library version changes within the same framework version (most of Apple's frameworks are still "A" versions, though the library versions in some have gone thru major updates). I went with using the actual library versions as the framework version, at the major.minor level. Except the UnixImageIO framework where there are multiple libraries and thus multiple versions. I could have used just the major version, but with some libraries (like GDAL) the minor version is more like a major version. > Anyway, I've almost got PIL tested, maybe you could make an > installer from it with the frameworks it needs? > I don't know if there is some script (maybe even an option of distutils?) the packagers use to make the installers, or maybe a template. If so it would be best to add the framework stuff that I come up with to that. ----- William Kyngesburye http://www.kyngchaos.com/ "History is an illusion caused by the passage of time, and time is an illusion caused by the passage of history." - Hitchhiker's Guide to the Galaxy From gary.bernhardt at gmail.com Fri Apr 25 17:57:05 2008 From: gary.bernhardt at gmail.com (Gary Bernhardt) Date: Fri, 25 Apr 2008 11:57:05 -0400 Subject: [Pythonmac-SIG] Nested app bundles In-Reply-To: <48111E6E.7080604@noaa.gov> References: <9c34c72e0804241154o1fd513bepaeae9a16c36eb3c2@mail.gmail.com> <48111E6E.7080604@noaa.gov> Message-ID: <9c34c72e0804250857u3be6ac46hc352ec3401079ec9@mail.gmail.com> On Thu, Apr 24, 2008 at 7:57 PM, Christopher Barker wrote: > Gary Bernhardt wrote: > > > I want to split my app into multiple independent .apps, but I don't > > want the user to have to care about that. > > > > I'm confused as to what you want. Do you want the user to have multiple app > icons to click on? If not, then what are "independent .apps"? Sorry, I was trying to keep it short by omitting my motivation. It's a backup app, so you don't want it taking up Dock space 24/7. But occasionally you want to browse your backups or change settings, at which point you *do* want it in the Dock. At least as of Tiger, there's no way to switch the behavior back and forth like that with a single app. To get around this, I want to separate the app into two: one that just has an icon in the status bar, and another one containing the full UI. Most of the time, only the status bar app is active, and it doesn't show up in the Dock. Occasionally the user will want to interact with the app, so he'll hit one of the status bar item's menus and open it. At that point the second app gets spawned, showing up in the Dock. Since the full UI app is only spawned programmatically by the status bar app, it doesn't need to have a user-visible icon. So it's independent in that it's a separate bundle, but it's only launched by the main app. > > I could just stick one app > > inside another's Contents/Resources, > > > > but then the user would never see the inner .app -- what's the point? -- Gary http://blog.extracheese.org From Chris.Barker at noaa.gov Fri Apr 25 21:42:17 2008 From: Chris.Barker at noaa.gov (Christopher Barker) Date: Fri, 25 Apr 2008 12:42:17 -0700 Subject: [Pythonmac-SIG] Nested app bundles In-Reply-To: <9c34c72e0804250857u3be6ac46hc352ec3401079ec9@mail.gmail.com> References: <9c34c72e0804241154o1fd513bepaeae9a16c36eb3c2@mail.gmail.com> <48111E6E.7080604@noaa.gov> <9c34c72e0804250857u3be6ac46hc352ec3401079ec9@mail.gmail.com> Message-ID: <48123419.4060709@noaa.gov> Gary Bernhardt wrote: > Sorry, I was trying to keep it short by omitting my motivation. motivation is critical, often. check out this thread form this list: http://aspn.activestate.com/ASPN/Mail/Message/pythonmac-sig/2784010 It's a similar issue - maybe that will help. For what it's worth, I never implemented it, so I can't help beyond what's there. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker at noaa.gov From hraban at fiee.net Sat Apr 26 20:05:46 2008 From: hraban at fiee.net (Henning Hraban Ramm) Date: Sat, 26 Apr 2008 20:05:46 +0200 Subject: [Pythonmac-SIG] Xcode 3.0 and Compiled Python Files? In-Reply-To: References: <46BDA4CD-298B-463C-B519-D81974BEFC15@brianberliner.com> <480E7C81.1070200@noaa.gov> <480F5E41.6070905@noaa.gov> Message-ID: <529BDBA3-D4AC-462B-BE0D-A2ECE8BC5BC8@fiee.net> Am 2008-04-23 um 19:08 schrieb Brian Berliner: > Now, any advice on an obfuscator? Don't use a scripting language, but e.g. ObjC Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) From ronaldoussoren at mac.com Mon Apr 28 19:20:49 2008 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Mon, 28 Apr 2008 19:20:49 +0200 Subject: [Pythonmac-SIG] Xcode 3.0 and Compiled Python Files? In-Reply-To: <96c9d6a80804231020n5966a23ep149beb05f8dd56d@mail.gmail.com> References: <46BDA4CD-298B-463C-B519-D81974BEFC15@brianberliner.com> <480E7C81.1070200@noaa.gov> <480F5E41.6070905@noaa.gov> <96c9d6a80804231020n5966a23ep149beb05f8dd56d@mail.gmail.com> Message-ID: On 23 Apr, 2008, at 19:20, Nathan wrote: > On Wed, Apr 23, 2008 at 11:08 AM, Brian Berliner > wrote: >> Looks like Xcode 3.0 just copies the .py files directly to the >> Resources >> folder in the bundle. >> No processing whatsoever. >> I can't find any easy way of changing that behaviour. >> Anyone? > > I've never used Xcode, though I've wanted to learn. I bet lots of > people on this list have, though: > > http://lists.apple.com/mailman/listinfo/xcode-users There is no easy way, the Python templates in Xcode don't use py2app. Ronald > > > ~ Nathan > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > http://mail.python.org/mailman/listinfo/pythonmac-sig -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: