Re: [Pythonmac-SIG] Simple PyObjC question: real or vapor?
On 7 Apr, 2011, at 0:01, Kevin Walzer wrote: On 4/6/11 4:33 PM, Ronald Oussoren wrote: But at least wxWidgets isn't Tk, the OSX port of Tk seems to get worse over time:-(. We've moved from IDLE not looking quite right to IDLE just crashing with TkCocoa (for example when using a number of keyboard shortcuts). I think, to be fair, that it should be pointed out that the version of Tk shipping with SL is quite buggy--as is usually the case with Apple, they do not update such libraries with OS update. Users report that recent versions of ActiveTcl's Cocoa build work quite well with IDLE--a lot of bug fixing has gone on with both Tk and Tkinter's integration of the Cocoa version of Tk. The crashes also happen with the latest ActiveState build of TkCocoa. As an example you could try to run a script using F5. I have a workaround for that, which I really need to commit soon, but the root cause of the crash is a bug in TkCocoa. Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
[Pythonmac-SIG] Simple PyObjC question: real or vapor?
3 April 2011 My goal: Using my MacBook (intel 64 bit dual core), OSX 10.6.7, standard System python frameworks (2.6,2.5,2.3), a standard python install of 2.7 (32 bit) in a Library framework, Xcode 3.2.5, I would like to write some GUI based python programs for the Mac. My problem: 1) The Apple developer article Using PyObjC for Developing Cocoa Applications with Python is hopelessly outdated. PyObjC and py2app are not under the Developer folder but are under the System/Library/Frameworks/.../Extras/lib/python folder. Xcode new project has no option for selecting a PyObjC application, etc. 2) The PyObjC website ambiguously states The stable release front is rather hazy at the moment, I'm sorry for that and intend to fix that in the near feature. The indications are, this was composed some time ago, as 2.3 appears to be the current package. The web site advises using easy_install, but the web has widely conflicting opinions on easy_install's value, and moreover the recommended command $ easy_install pyobjc=2.2b1 fails. 3) I've used easy_install successfully exactly once to install lxml. I've shunned MacPorts and Fink because of the various web reports about their frailty, and also because using them seems to be incomprehensibly complex. I tried a variation on the PyObjC command: $easy_install pyobjc which runs, giving a plethora of errors, and installs various eggs in /Library/Python/2.6/site-packages, this despite $which python offers up python 2.7 as the default python. Moreover, as reported in another thread, _ScreenSaver fails to install. _2to3 is not recognized as a distribution option, suggesting that perhaps python 3 needs to be installed, but logically, if that were the case, it should be so reported by easy_install. Or, perhaps it can't find 2to3 which is in the standard Mac python distribution. Using $easy_install py2app works except for failing to install macholib, which is apparently crucial to running /usr/local/bin/py2applet, which it also installs. 4) Xcode 4, which I just learned about, seems to not support python at all, according to threads here. 5) Contributions to the various threads in this forum seem to be divided among those who, like me, are completely confused and frustrated, and those who seem to have working useful systems up and running and don't see any issues at all. My request: So in summary, in very simple terms, can anyone tell me how to accomplish my goal or tell me why my goal is unachievable with my existing tools, and what if anything can be done to correct the situation? I've probably put 40 hours of time into web searches and trying various things. It can't be this hard, and if it really is this hard, I just won't be writing GUI apps for the Mac, because I really like python, more than any other language I've used. I like python because it is clear, it works, it is well documented, and it is complete. Thus far, PyObjC is none of these. -- View this message in context: http://old.nabble.com/Simple-PyObjC-question%3A-real-or-vapor--tp31311493p31311493.html Sent from the Python - pythonmac-sig mailing list archive at Nabble.com. ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Simple PyObjC question: real or vapor?
Disclaimer: I know nothing about PyObjC. Am 2011-04-04 um 07:24 schrieb Temescal: 3) I've used easy_install successfully exactly once to install lxml. I've shunned MacPorts and Fink because of the various web reports about their frailty, and also because using them seems to be incomprehensibly complex. I use MacPorts all the time and used Fink on earlier systems. (And I guess Homebrew is similar.) I don’t know what you would call incomprehensibly complex about any of them. It’s normally not advised to use Port’s or Fink’s python, esp. to do any Mac-specific stuff, because they follow a general UNIX/Linux approach, i.e. use X11. If you don’t need any other ported stuff, you might be annoyed that they pull in a complete Linux system. Normally the best advice is to use python.org’s distribution. Sometimes ActiveState’s may be better. 4) Xcode 4, which I just learned about, seems to not support python at all, according to threads here. Probably not true - python support in XCode 4 seems different than in previous versions, but it’s there. (As far as I read the latest thread on that subject - never tried python with any XCode myself.) be this hard, and if it really is this hard, I just won't be writing GUI apps for the Mac, because I really like python, more than any other language I've used. I like python because it is clear, it works, it is well documented, and it is complete. Thus far, PyObjC is none of these. Why don’t you use wxPython? (I suggest to use it via the dabo wrapper, esp. for data-centric applications; see http://dabodev.com) There *are* reasons against wx, but perhaps none of them is yours. Greetlings from Lake Constance! Hraban --- http://www.fiee.net https://www.cacert.org (I'm an assurer) ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Simple PyObjC question: real or vapor?
(Sorry about the formatting of the e-mail, MobileMe's webmail and mailinglists don't like each other)On 06 Apr, 2011,at 01:10 PM, Temescal pham...@cardious.com wrote: 3 April 2011 My goal: Using my MacBook (intel 64 bit dual core), OSX 10.6.7, standard System python frameworks (2.6,2.5,2.3), a standard python install of 2.7 (32 bit) in a Library framework, Xcode 3.2.5, I would like to write some GUI based python programs for the Mac. My problem: 1) The Apple developer article "Using PyObjC for Developing Cocoa Applications with Python" is hopelessly outdated. PyObjC and py2app are not under the Developer folder but are under the System/Library/Frameworks/../Extras/lib/python folder. Xcode new project has no option for selecting a PyObjC application, etc.Xcode no longer includes the PyObjC templates and I haven't packaged them yet (mostly because they IMO need changes and I haven't had time to dig into that yet, and changing templates requires a lot of time because there are no useful tools that make it easier to work with templates). 2) The PyObjC website ambiguously states "The stable release front is rather hazy at the moment, I'm sorry for that and intend to fix that in the near feature." The indications are, this was composed some time ago, as 2.3 appears to be the current package. The web site advises using easy_install, but the web has widely conflicting opinions on easy_install's value, and moreover the recommended command "$ easy_install pyobjc=2.2b1" fails.Easy_install for version 2.3 should work. I finally have a working test setup again and hope to start working on pyobjc 2.4 again. 3) I've used easy_install successfully exactly once to install lxml. I've shunned MacPorts and Fink because of the various web reports about their frailty, and also because using them seems to be incomprehensibly complex. I tried a variation on the PyObjC command: "$easy_install pyobjc" which runs, giving a plethora of errors, and installs various eggs in /Library/Python/2.6/site-packages, this despite "$which python" offers up python 2.7 as the default python. Moreover, as reported in another thread, _ScreenSaver fails to install. _2to3 is not recognized as a distribution option, suggesting that perhaps python 3 needs to be installed, but logically, if that were the case, it should be so reported by easy_install. Or, perhaps it can't find 2to3 which is in the standard Mac python distribution.I don't use fink or macports myself, but appearently these work just fine if you don't care about having a separate unix install in their package tree. Using "$easy_install py2app" works except for failing to install macholib, which is apparently crucial to running /usr/local/bin/py2applet, which it also installs.Easy_install py2app should work, please send my the output of the failing easy_install. 4) Xcode 4, which I just learned about, seems to not support python at all, according to threads here.The last preview I checked didn't support Python, but recently someone mentioned that the final release does support Python. 5) Contributions to the various threads in this forum seem to be divided among those who, like me, are completely confused and frustrated, and those who seem to have working useful systems up and running and don't see any issues at all. My request: So in summary, in very simple terms, can anyone tell me how to accomplish my goal or tell me why my goal is unachievable with my existing tools, and what if anything can be done to correct the situation? I've probably put 40 hours of time into web searches and trying various things. It can't be this hard, and if it really is this hard, I just won't be writing GUI apps for the Mac, because I really like python, more than any other language I've used. I like python because it is clear, it works, it is well documented, and it is complete. Thus far, PyObjC is none of these.The installation of PyObjC should, and shall, be improved but there is documentation. The most important documentation page is http://pyobjc.sourceforge.net/documentation/pyobjc-core/intro.html, which explains how PyObjC works. There is no documentation on Apple's frameworks beyond listing unsupported features, and that's by design: the existing ObjC documentation is easy to read and it should be easy enough to mentally translate the ObjC idioms in Apple's documentation to Python.A big issue w.r.t. PyObjC and py2app is that this is a pretty large project with a single maintainer. What doesn't help is that I barely have time to work PyObjC, which is why development is going slowly and the website hasn't been updated in ages. Development speed is unlikely to change in the forseeable future.Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Simple PyObjC question: real or vapor?
just one more note: On 4/3/11 10:24 PM, Temescal wrote: I tried a variation on the PyObjC command: $easy_install pyobjc which runs, giving a plethora of errors, and installs various eggs in /Library/Python/2.6/site-packages, this despite $which python offers up python 2.7 as the default python. you need $which easy_install to make sure you are running the right easy-install. It's possible you have not installed setuptools properly (or at all) in your python2.7 Don't know anythign about pyObjC, sorry. wxPython is a pretty good option, though. Probably not as good as pyObjC for Mac-only stuff, but it's great for multi platform development, and does work quite well on OS-X. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Simple PyObjC question: real or vapor?
On 6 Apr, 2011, at 18:15, Christopher Barker wrote: wxPython is a pretty good option, though. Probably not as good as pyObjC for Mac-only stuff, but it's great for multi platform development, and does work quite well on OS-X. I don't agree with your opionion on wxPython, last time I checked it sucked for cross platform development because code doesn't always work the same way on different platforms (one example I remember from the last time I fought with wxWidgets is the background color of text entry fields, changing that on Windows is easy enough but the same code doesn't work on OSX). I must admit that I haven't worked with the OSX version of wx for a couple of years though, because of x-platform issues I switched to running a Windows VM whenever I need to write GUI code that might need to run on Windows. But at least wxWidgets isn't Tk, the OSX port of Tk seems to get worse over time :-(. We've moved from IDLE not looking quite right to IDLE just crashing with TkCocoa (for example when using a number of keyboard shortcuts). Ronald ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Simple PyObjC question: real or vapor?
On 4/6/11 4:33 PM, Ronald Oussoren wrote: But at least wxWidgets isn't Tk, the OSX port of Tk seems to get worse over time:-(. We've moved from IDLE not looking quite right to IDLE just crashing with TkCocoa (for example when using a number of keyboard shortcuts). I think, to be fair, that it should be pointed out that the version of Tk shipping with SL is quite buggy--as is usually the case with Apple, they do not update such libraries with OS update. Users report that recent versions of ActiveTcl's Cocoa build work quite well with IDLE--a lot of bug fixing has gone on with both Tk and Tkinter's integration of the Cocoa version of Tk. -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Simple PyObjC question: real or vapor?
On 4/6/11 1:33 PM, Ronald Oussoren wrote: I don't agree with your opinion on wxPython, last time I checked it sucked for cross platform development because code doesn't always work the same way on different platforms (one example I remember from the last time I fought with wxWidgets is the background color of text entry fields, changing that on Windows is easy enough but the same code doesn't work on OSX). Well, all that is true, but what that tells me is that cross-platform development sucks. wxWidgets does it pretty well, considering. You could go with QT, and then things will probably work pretty much the same on all platforms, but they won't look or act native (particularly on the Mac) I must admit that I haven't worked with the OSX version of wx for a couple of years though, because of x-platform issues I switched to running a Windows VM whenever I need to write GUI code that might need to run on Windows. Well, you certainly want to test early and often on all the platforms you want to support. In general, if you do things the recommended way, it will work on all platforms, but it is pretty easy to do something in a way that only works in one place -- in that case, you want to catch those things early by testing early. That's all a bit of a pain, but a LOT easier than writing 3 GUIs. If you only want to develop Mac apps, Cocoa (via PyObjC) is the way to go. But at least wxWidgets isn't Tk, the OSX port of Tk seems to get worse over time :-(. We've moved from IDLE not looking quite right to IDLE just crashing with TkCocoa (for example when using a number of keyboard shortcuts). yeach. In fact, the latest wx uses Cocoa (oit had been Carbon). I haven't used it yet, but once the bugs get ironed out, it should take us well into the future on the Mac. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG