Re: [Pyobjc-dev] re PyObjC Debuggin Best Practices
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2008-02-06 16:35:26
|
On 6 Feb, 2008, at 4:20, Daniel Lord wrote: > Well, seeing as no one answered at all (except one other soul > looking for information), I am assuming that there isn't anything > substantial. > > So for my apps, to maximize the size of my tool set, I have decided > to minimize the PyObj portions as much as possible (just the View > and small UI Controllers and Models where handy like tables, etc. ) > and implement the rest of the code in standalone straight Python > classes which I can source-level debug easily in Komodo using unit > tests. I can debug the UI in Xcode and then when I combine > everything in Xcode, I only have small bits of code that are opaque > to source-level debugging if I even need it. Now that I think about > it, that makes the most sense anyway. Assuming py2app does the right > things with XCode builds to bring in third-party modules like > appscript which I like to use a lot--I've been "chickening out" so > far and writing a setup and using py2app from the command line. > I am sure I can figure out how to add the scripting to XCode as a > shell script at some point. I don't use Xcode for Python development at all, Xcode is a nice IDE for Objective-C but offers limited support for Python. When I need to debug python code I tend to use print statements. That said, you should be able to use your favorite Python debuggers with PyObjC just like you can use them to debug wxPython programs. > > > I might try Eclipse are well, but I have become used to Komodo after > a year or so of using it and so reluctant to tackle the Eclipse > learning curve unless it offers more than Komodo. Komodo works great > for wxPython debugging and I may just use wxPython instead of PyObjC > for UI components. I am concerned that PyObjC is second-class on OS > X just like the Java-Cocoa bridge was--and we all know how that > turned out in the end. Anyone know of any commitments to do so, or > is PyObjC reached its zenith given Apple is dropping other non-Cocoa > things such as public Carbon-64 to focus on Cocoa? There are two major differences between PyObjC and the Java-Cocoa bridge: 1) PyObjC is a straight 1-1 bridge which seriously reduces the amount of work needed to add support for new APIs to PyObjC. The Java-Cocoa bridge tried to map the ObjC API's to something closer to Java's conventions and that required a lot of manual labor. That's one reason I've been negative about adding something simular to PyObjC in the past. 2) PyObjC is developed outside of Apple, Java-Cocoa was a pure Apple project. This has advantages and disadvantages of course, there is no risk that PyObjC will completely disappear but on the other hand the development team is rather tiny (basicly just me). It would definitely be nice to be able to use the Xcode tools like the debugger and profiler GUI's on Python scripts and I have filed feature requests that asked for this. If more people do this we might even get somewhere. Ronald P.S. In case you don't know: you can file bugs and feature requests at bugreport.apple.com, all you need for that is a (free) ADC account. |