Danny, great reply. I have looked a bit at pyObjC, and it does indeed
look cool. I was however hoping to bypass that route altogether and go
for the simplicity (I thought) that came with the html/js route.
Perhaps a cocoa bundle is the only way to get what I'm after. Thanks,
-MH
On Mar 25, 2005, at 1:40 PM, Danny Yoo wrote:
Yikes, that sounds pretty hairy. Maybe this kind of thing is not as
straight forward as anticipated. Why HTML you say? Well I've been
intrigued by Dashboard, which will be in the next OSX release. It
allows
you to create "widgets" which are essentially little html pages that
do
things. This got me thinking how I'd like to tie a small Python
script I
wrote into an html front end (ideally becoming a widget). It's looking
like this may be trickier than anticipated. In any case, thanks.
Hi Mike,
Interesting!
You probably know about this already, but PyObjC allows you to write
Mac
OS X Cocoa applications in Python:
http://pyobjc.sourceforge.net/
and this is a well tested bridge to make Python classes integrate into
Cocoa applications. For example,
http://www.pycs.net/bbum/2004/12/10/#200412101
mentions the use of PyObjC to make a Mac OS X screensaver. So it
appears
to embed very well.
According to the documentation from Apple's Dashboard developer site,
we
can embed Cocoa bundles into Javascript (there's a brief mention of it
under "Custom Code Plug-ins":
http://developer.apple.com/macosx/tiger/dashboard.html
So in theory, we should be able to inject a Pythonified Cocoa bundle
into
Dashboard, but then again, I've never tried this before. *grin*
I haven't dived into doing Mac OS X development yet, but perhaps
someone
on the PyObjC list might be able to cook up a quick-and-dirty example
of
this for you.
Try asking on their list and see if you get some useful responses:
http://lists.sourceforge.net/lists/listinfo/pyobjc-dev
Best of wishes to you!
-MH
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor