2004年03月05日 星期五 11:52
CHEN Guang (Oliver),您好! 我手头没有tk的程序,不过我在tools目录下找了webchecker里的wsgui.py,应该是tk的程序, 试了一下很正常,没有dos窗口弹出,不知你的问题是什么原因 我的setup.py如下: from distutils.core import setup import py2exe setup( version = "0.5.0", description = "TK Sample", name = "TK Sample", # targets to build windows = ["wsgui.py"] ) 如果实在不行,你可以尝试一下另外一个exe打包工具cx_freeze,也是不错的 http://sourceforge.net/projects/cx-freeze/ ======= 2004-03-05 09:42:09 您在来信中写道:======= >Zhao 您好: > >我在自己的机器上找了一下,发现了那几个文件,但都是基于 > wxpython 的。 > 能不能将基于 Tkinter 的 GUI 编译成不弹出 DOS >窗口的 EXE 文件?毕竟 Tkinter >用起来简单得多,据说通用性也好于 wxpython. > 再次感谢。 > > > --- zhao <bear_sh at eastday.com> 的正文:> CHEN Guang >(Oliver),您好! >> 我机子上安装的是py2exe 0.5 >> >,然后执行了它目录下sample中的simple例子,发现一切都是正常的 >> >看来py2exe要么是自己根据是否用了gui包来判断的(这里它用的wxpython), >> >> 要么是根据setup.py中下面两行来指定的: >> # targets to build >> windows = ["test_wx.py"], >> console = ["hello.py"], >> >> 你自己在试一试 >> >> >> ======= 2004-03-04 18:44:36 您在来信中写道:======= >> >> >Zhao您好: >> > >> 谢谢您热心解答我的问题,可我仍不知道如何指定使用 >> >run_w.exe, 我编写的 setup.py >> >如下,当如何改动?如蒙明释,不胜感激。 >> > >> ># setup.py >> >from distutils.core import setup >> >import glob >> >import py2exe >> >setup(console=["hello.py"], >> >data_files=[("fonts", >> glob.glob("fonts\\TIMES.TTF"))]) >> > >> > >> >您的贴子: >> > >> > >> 在py2exe的目录中有两个可执行文件run.exe和run_w.exe >> > >> >>生成的exe都是已这两个文件为母本的(把code添加在他们之后) >> > >> > >> >>如果执行时出现了dos窗口应该是使用了run.exe的缘故,指定使用run_w.exe就可以了 >> > >> > >> >>_________________________________________________________ >> >Do You Yahoo!? >> >>完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间 >> >>http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com >> >> = = = = = = = = = = = = = = = = = = = = >> >> >> 致 >> 礼! >> >> >> zhao >> bear_sh at eastday.com >> 2004-03-05 >> >> > >> ATTACHMENT part 2 image/gif name=fox.GIF >> _______________________________________________ >> python-chinese mailing list >> python-chinese at lists.python.cn >> http://python.cn/mailman/listinfo/python-chinese >> > >_________________________________________________________ >Do You Yahoo!? >完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间 >http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com = = = = = = = = = = = = = = = = = = = = 致 礼! zhao bear_sh at eastday.com 2004-03-05 -------------- next part -------------- A non-text attachment was scrubbed... Name: fox.gif Type: image/gif Size: 9519 bytes Desc: not available Url : http://lists.exoweb.net/pipermail/python-chinese/attachments/20040305/61a695b7/fox.gif
Zeuux © 2025
京ICP备05028076号