[Pythonmac-SIG] Still Unable to get my Python program working on the mac

Mike smartmike1 at gmail.com
Tue May 18 05:04:10 CEST 2010


----- Original Message ----- 
From: "Bill Janssen" <janssen at parc.com>
To: "Mike" <smartmike1 at gmail.com>
Cc: <pythonmac-sig at python.org>; <janssen at parc.com>
Sent: Sunday, May 16, 2010 10:28 PM
Subject: Re: [Pythonmac-SIG] Still Unable to get my Python program working 
on the mac


>I tried pyttsx on a Mac running 10.5.8:
>
> % ls
> MANIFEST.in README pyttsx setup.cfg
> PKG-INFO docs pyttsx.egg-info setup.py
> % python setup.py build
> Traceback (most recent call last):
>  File "setup.py", line 18, in <module>
>    from ez_setup import use_setuptools
> ImportError: No module named ez_setup
> %
>
> So I opened up setup.py, and removed the two lines that read:
>
> from ez_setup import use_setuptools
> use_setuptools()
>
> Then, "python setup.py build", and "python setup.py install".
>
> Then:
>
> % python
> Python 2.5.1 (r251:54863, Jun 17 2009, 20:37:34)
> [GCC 4.0.1 (Apple Inc. build 5465)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import pyttsx
>>>> eng = pyttsx.init()
>>>> eng.say("hello hello hello")
>>>> eng.runAndWait()
> # and "hello hello hello" comes out of the speakers
>>>>
>
> Seems to work.  No additional downloads needed.
>
> Bill

Hi,
I have found an example that uses CTypes and the NSSpeechSynthesizer, but it 
doesn't seem to work. (I am not getting any errors)
. The only feature we really need from this file is the SpeakString() and 
the stopping of speech. You can find the example here:
 http://www.mail-archive.com/pythonmac-sig@python.org/msg02231.html
As I indicated in my previous message I commented out of all the speech 
related stuff and the app worked. So I'm assuming it's the combination of 
PyObjC and wx.

Mike 



More information about the Pythonmac-SIG mailing list