擅长:python、mysql、java
<p>查看您的导入,您需要添加<code>import time</code></p>
<p>如果你的问题是使用cx-freeze,就像py-to-exe一样,使用这样的代码。在</p>
<p>升级到python3.3可能也是个好主意。这可能会解决一些问题。在</p>
<p>这可能有助于它是一篇关于你的错误的文章。<a href="https://mail.python.org/pipermail/python-win32/2006-January/004184.html" rel="nofollow">https://mail.python.org/pipermail/python-win32/2006-January/004184.html</a></p>
<pre><code>import pyttsx
import pyttsx.drivers.sapi5
import win32com
from time import sleep
import sys
from cx_Freeze import setup, Executable
setup(
name = "tt.py",
version = "0.1",
description = "your discription",
executables = [Executable("The file name", base = "Win32GUI")])
</code></pre>
<p>以下是指向cx freeze<a href="http://cx-freeze.sourceforge.net/" rel="nofollow">http://cx-freeze.sourceforge.net/</a>的链接</p>
<p>下面是关于如何使用它的教程<a href="http://cx-freeze.readthedocs.org/en/latest/overview.html" rel="nofollow">http://cx-freeze.readthedocs.org/en/latest/overview.html</a></p>