[Pythonmac-SIG] Using a unix Python with a MacPython Lib tree

Jonathan Wight JWight@bigfoot.com
Wed, 04 Apr 2001 16:27:52 -0500


On 04/04/2001 16:17, "Just van Rossum" <just@letterror.com> wrote:

> I don't know the exact problems you're facing but it sure sounds like you
> should
> do more in Python! There are several console emulators out there, there's even
> one in the std lib: code.py. Assigning to sys.stdout is no effort from Python.
> All you need is _one_ wrapped C function that sends data to your console, the
> rest can all be done in Python.

Well I was going to do more in Python. Originally I had just intended to
extend python with single C function that sent it's input to the Cocoa
NSTextView. And then create a Python file object to pipe data through that C
function.

But then I decided to have multiple NSTextViews so I had to store a pointer
to the relevent NSTextView seperately inside my fake file objects.

Anyway. It works, and that code.py looks like it's exactly what I need to
implement a interactive mode. I promise I'll stop bitching now! :-)

Thanks for the help.

    Jon.