我的站点包中有 pywin32,而我的 pyttsx 位于单独的文件夹中。这是我收到以下错误的原因吗?
import win32api, sys, os
ImportError: DLL load failed: The specified module could not be found
代码如下,
import pyttsx
def onStart(name):
print 'starting', name
def onWord(name, location, length):
print 'word', name, location, length
def onEnd(name, completed):
print 'finishing', name, completed
engine = pyttsx.init()
engine.connect('started-utterance', onStart)
engine.connect('started-word', onWord)
engine.connect('finished-utterance', onEnd)
engine.say('The quick brown fox jumped over the lazy dog.')
engine.runAndWait()
从这里,http ://pyttsx.readthedocs.org/en/latest/engine.html#examples
我的 pywin32 来自这里,
http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/
对于 Py 2.7