Some programmers see the advantage of combining Python and Objective-C in the same environment, believing that a bridge between the two languages provides tremendous power and advantages to either language. For the Objective-C developer, access to Python provides a rapid application-development solution that’s far more efficient than one requiring a compiler. For the Python developer, transparent access to Objective-C would allow the developer’s scripts to leverage the full power and elegance of the MacOSX environment. In this article, Bill Bumgarner shows you how to bring these worlds together.
It’s really good to see this project get a little life breathed back into it, complete with a disk image installer for users of 10.2. I had tried dicking around with it some in the past to find that it was a pain to get working.
For anyone wondering about it, there are some other ObjC language bridges worth noting:
Squeak (Metaobject’s ObjCBridge), Perl (via CamelBones), Lua (Dekorte’s Lua-ObjC), Java (comes with OS X, may be confined to Cocoa libs), F-Script, and Joy.
Anyone know any others?
I’d rather learn how to code Python if you have any links?
Here’s one from the man himself …
http://www.python.org/doc/current/tut/tut.html
Thankyou
Any good Python community that I can find and visit? Like Perl Monks, PHPBuilder and etc..
Here’s a few
Python cookbook: http://aspn.activestate.com/ASPN/Python/Cookbook/
Free book online: http://www.ibiblio.org/obp/thinkCSpy/
Another free book: http://diveintopython.org/
PyZine: http://www.pyzine.com/
The last two links contain links to other sites. It should get you started.
PyZine: http://www.pyzine.com
Ahh, thanks! That’s almost like Perl Monks, but fewer people and features in website. It’s not bad..
Heck yes there is…the news groups are busy and helpfull and there is a TON of documentation….no elitism in this community.
comp.lang.python – one of the friendliest newsgroups around. No (rather, very few) egos. Just remember to post any wxPython questions to the wxPython mailing list!
There is also the Python Wiki which is useful – Mhttp://www.python.org/cgi-bin/moinmoin“ http://www.uselesspython.com/&e=912“>Useless” . Hope this helps, and welcome!
Damn Opera is screwing up my copy & paste.
http://www.python.org/cgi-bin/moinmoin“>Python
No.
LEAVE SPACES around URLs to autoparse. No more than 8,000 characters are allowed.
The only HTML/UBB tags allowed are for bold and italics.
Your comment will not show up immediately.
The python list may be good, but I personally would steer clear of the #python IRC channel on irc.freenode.net (nee irc.openprojects.net). Bad combination of big ego and ignorance. May not be so bad if you’re just in there asking some newbie questions (and there’s nothing wrong with that), but if you have anything meatier, definately seek out the Usenet group.
If you want to know specifics, I wrote some about it here:
http://lambda.weblogs.com/discuss/msgReader$5318?mode=topic&print-f…
From my other contacts, it sounds like the #python channel isn’t representative of the Python community at large. And thank god for that!
ack. apparently URLs have to be on one line. a shorter one:
http://lambda.weblogs.com/discuss/msgReader$5318
Here’s another good link: http://www.faqts.com/knowledge_base/index.phtml/fid/199/
I love python, and I really like Cocoa, but I dislike objective C. I was really hoping that PyObjC would be the final Killer development environment for me. Unfortunately, three issues keep me from loving it:
1) It is slow. Dog slow. My mac is a g4 400, not a great machine, but the performance was rediculous even for a machine like that.
2) A massive disconnect occurs in the Obj-c -> python translation of the Cocoa APIs. Basically, Obj-c, with its bizzare naming conventions, junks up python, making it look silly. You can see it when you look at the method invocations in the article:
sharedWorkspace.getInfoForFile_application_type_(pathToQuery)
I know that they pyobjc guys put a lot of thougt into this area, and this was the best they (or perhaps anyone) could come up with. (Certainly *I* couldn’t come up with anything better.) But it just looks wrong.
3) Memory management isn’t automatic. I tend to think that memory management should be all or nothing: either use C, where you are constantly on edge thinking who is responsible for to release the memory you just allocated, or program in Java/Python/etc, where you are freed from this burden. The inbetween state of Obj-c and PyObjC doesn’t gel with how I use the languages. YMMV, of course.
All, in all, though, an impressive project. And I hope it does get better, perhaps some support from Apple, and perhaps a better syntax.
Cheers,
eh
Thanks people! As for IRC, I never like IRC when it’s relating with programming. I prefer board, website or whatever that where I can submit. It’s easier to leave message to allow more people to read and give the feedbacks and etc. Also, lesser confuse for me. 🙂
You can also check out Ruby ( http://www.ruby-lang.org ) in addition to python and the other languages mentioned above. Ruby is a very high level object oriented programming language. Objective-C can be bridged using RubyCocoa. RubyCocoa is a framework for Mac OS X that allows Cocoa programming in Ruby, allows you to create and use a Cocoa object in a Ruby program and write a Cocoa application that mixes Ruby and Objective-C code. RubyCocoa screenshots, information and download is available here:
http://www.imasy.or.jp/~hisa/mac/rubycocoa/index.en.html
Have fun!