Re: [Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?

2007-10-26 Thread Dethe Elza
If you write an Objective-C framework, the python code to wrap it using PyObjC is very short. Here is an example I use to expose Tim Omernick's CocoaSequenceGrabber framework to capture images from the iSight camera: import objc, AppKit, Foundation, os if 'site-packages.zip' in __file__: base

Re: [Pythonmac-SIG] readline support for OS X Leopard

2007-10-26 Thread Boyd Waters
On Oct 26, 2007, at 7:50 PM, [EMAIL PROTECTED] wrote: > It right there in my original message > You have to use EditLine syntax: > > readline.parse_and_bind ("bind ^I rl_complete") Oh good grief... I'm a *user*. You can't expect me to *read*... um.. what is the smiley-thing for hanging my head

Re: [Pythonmac-SIG] readline support for OS X Leopard

2007-10-26 Thread Brian Granger
The rlineimpl.py module is the place in python where readline gets imported. I would look there and also I would look to see where ipython is doing its equivalent of parse_and_bind. Brian On 10/26/07, Noah Gift <[EMAIL PROTECTED]> wrote: > Ed, > > You are a genius! Thanks, I totally forgot you t

Re: [Pythonmac-SIG] readline support for OS X Leopard

2007-10-26 Thread Noah Gift
Ed, You are a genius! Thanks, I totally forgot you told me that. So for the record when you launch IPython: import readline readline.parse_and_bind ("bind ^I rl_complete") Then do something like: import os and you will get In [5]: os. Display all 234 possibilities? (y or n) Ok, what is the e

Re: [Pythonmac-SIG] readline support for OS X Leopard

2007-10-26 Thread emoy
It right there in my original message (and in the python man page). You have to use EditLine syntax: readline.parse_and_bind ("bind ^I rl_complete") Ed On Oct 26, 2007, at 6:46 PM, Noah Gift wrote: I was just going to say the same thing. Getting this to work and then GVim, and I will be

Re: [Pythonmac-SIG] readline support for OS X Leopard

2007-10-26 Thread Noah Gift
I was just going to say the same thing. Getting this to work and then GVim, and I will be quite happy. On 10/26/07, Boyd Waters <[EMAIL PROTECTED]> wrote: > > Oops, I spoke too soon when I said that readline support with > Leopard's Python works for me with IPython. > > Many things DO work, but t

Re: [Pythonmac-SIG] readline support for OS X Leopard

2007-10-26 Thread Boyd Waters
Oops, I spoke too soon when I said that readline support with Leopard's Python works for me with IPython. Many things DO work, but tab-completion does NOT. I am trying to get tab completion working. Forget IPython, just try this "unit test" of rlcompleter with the Python that ships with Leop

Re: [Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?

2007-10-26 Thread Darran Edmundson
Jack and Has, thanks very much for the valuable advice. This weekend one of the developers is going to have a first crack at implementing option 1, namely a library that we can invoke from python. I've recommended that Douglas join this mailing list and ask questions. My only concern is tha

Re: [Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?

2007-10-26 Thread has
Darran Edmundson wrote: > I have a python program on the Mac that determines, among other > things, the screen location. The OS X developers are going to > write a full-screen Cocoa application [...] The question then: how > to join these two codes? > 1) Get the Mac guys to write their ap

Re: [Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?

2007-10-26 Thread Jack Jansen
If I understand the architecture correctly I would go with option 1. And get the Mac guys to write their code in a reusable way, i.e. have them export enough low-level functionality in their API. This should be easy enough in ObjC. It'll allow tweaking from the Python side, and if you're luck

[Pythonmac-SIG] Python control/integration of a Cocoa/Quicktime application?

2007-10-26 Thread Darran Edmundson
I have a couple of Cocoa/Quicktime developers working on a small custom application. These guys are very capable at OS X programming but don't have any python experience. I, on the other hand, have a lot of python experience but virtually no Mac development experience. I could really do wit