How do I start Mac Python scripts from Excel?

Just just at xs4all.nl
Mon Jan 6 17:12:48 EST 2003


In article <c9d82136.0301061329.45a09a71 at posting.google.com>,
 noah at noah.org (Noah) wrote:

> I'm a Macintosh newbie. I wrote a script for a client
> that compresses and encrypts an Excel spreadsheet and
> then posts it to a web site. It runs great as a 
> stand-alone Python Applet on MacOS 9.1. 
> I'm using Jack Jansen's MacPython 2.22 distribution.
> 
> The client would like a button on their Excel spreadsheet 
> that activates a Python script. I'm fairly experienced with 
> VBA on Windows, but I have no Mac experience. 
> I can create a button and edit the VBA code on Mac, so 
> there are no problems there.
> 
> 1. How do I launch the Python applet from Excel?

Can Excel execute AppleScript? If so, you should launch your applet with 
a small AppleScript.

> 2. How do I prevent or dismiss the "Output" window that
> always comes up when I run a Python Applet on Mac?

Drop your applet onto the EditPythonPrefs app in the MacPython distro. 
Look for a setting "delay output window until needed". And then make 
sure you don't print anything...

Just




More information about the Python-list mailing list