[Pythonmac-SIG] Embedding Python in Cocoa

Michael Terry formido at gmail.com
Mon Dec 3 08:07:46 CET 2007


Hi,

Suppose you had a Cocoa program that executed Python scripts
periodically. If global variables were set, they'd retain their values
between script runs. What would be the best approach to make this
happen?

Call the C APIs? If so, do I just need to initialize a Python
interpreter when the program starts and not finalize it until the
program closes--or will it be more complicated than that?

Control interactive Python with Expect?

Something else?

Thanks,
Michael Terry


More information about the Pythonmac-SIG mailing list