2004年03月06日 星期六 11:40
我刚刚按着http://starship.python.net/crew/theller/moin.cgi/CustomIcons上面的方法试过了,完全可以. 首先找一个icon放在setup.py所在目录, 然后修改setup 文件 我的例子如下 setup( # The first three parameters are not required, if at least a # 'version' is given, then a versioninfo resource is built from # them and added to the executables. version = "0.0.0.3", #-->版本 description = "error finder from lin.li at samsung.com",#-->描述 name = "errorfinder",#-->名称 # targets to build #windows = ["test_wx.py"], console = [{"script":"GO.py", "icon_resources": [(1, "py.ico")]}# 这一行就是添加icon, ] ) lilin lin.li at samsung.com Python is designed to save time
2004年03月06日 星期六 15:11
我按您的方法试了一下, DOS 窗口出现了如下提示: File "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", line 577, in build_e xecutable add_icon(unicode(exe_path), unicode(ico_filename), ico_id) RuntimeError: MapExistingFile: 句柄无效。 EXE 文件编译成功了,但图标还是老样子,没变成卡通蛇,这是怎么回事? --- Lilin <lin.li at samsung.com> 的正文:> 我刚刚按着http://starship.python.net/crew/theller/moin.cgi/CustomIcons上面的方法试过了,完全可以. > 首先找一个icon放在setup.py所在目录, 然后修改setup > 文件 > 我的例子如下 > setup( > # The first three parameters are not required, > if at least a > # 'version' is given, then a versioninfo > resource is built from > # them and added to the executables. > version = "0.0.0.3", #-->版本 > description = "error finder from > lin.li at samsung.com",#-->描述 > name = "errorfinder",#-->名称 > # targets to build > #windows = ["test_wx.py"], > console = [{"script":"GO.py", > "icon_resources": [(1, "py.ico")]}# > 这一行就是添加icon, > ] > ) > > > lilin > lin.li at samsung.com > Python is designed to save time> _______________________________________________ > 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
2004年03月06日 星期六 18:52
Hello CHEN, 不用那么复杂的吧? 我的: """ # setup.py from distutils.core import setup import py2exe setup(name="getSHwunderground", scripts=["getSHwunderground.py"], version="2.0", description="上海天气预报CVS生成器 Py版 ", author="Zoom.Quiet", author_email="zoomq at itcase.com", # url="http://www.python.org/sigs/distutils-sig/", # packages=['distutils', 'distutils.command'], ) """ 打包命令: python setup.py py2exe --icon ActPython.ico 就行了! 如果可以的话,看附件效果! === [ 15:11 ; 04-03-06 ] you wrote: CGO> 我按您的方法试了一下, DOS 窗口出现了如下提示: CGO> File CGO> "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", CGO> line 577, in build_e CGO> xecutable CGO> add_icon(unicode(exe_path), unicode(ico_filename), CGO> ico_id) CGO> RuntimeError: MapExistingFile: 句柄无效。 CGO> EXE CGO> 文件编译成功了,但图标还是老样子,没变成卡通蛇,这是怎么回事? CGO> --- Lilin <lin.li at samsung.com> 的正文:> CGO> 我刚刚按着http://starship.python.net/crew/theller/moin.cgi/CustomIcons上面的方法试过了,完全可以. >> 首先找一个icon放在setup.py所在目录, 然后修改setup >> 文件 >> 我的例子如下 >> setup( >> # The first three parameters are not required, >> if at least a >> # 'version' is given, then a versioninfo >> resource is built from >> # them and added to the executables. >> version = "0.0.0.3", #-->版本 >> description = "error finder from >> lin.li at samsung.com",#-->描述 >> name = "errorfinder",#-->名称 >> # targets to build >> #windows = ["test_wx.py"], >> console = [{"script":"GO.py", >> "icon_resources": [(1, "py.ico")]}# >> 这一行就是添加icon, >> ] >> ) >> >> >> lilin >> lin.li at samsung.com >> Python is designed to save time> CGO> _______________________________________________ >> python-chinese mailing list >> python-chinese at lists.python.cn >> http://python.cn/mailman/listinfo/python-chinese >> CGO> _________________________________________________________ CGO> Do You Yahoo!? CGO> 完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间 CGO> http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com CGO> _______________________________________________ CGO> python-chinese mailing list CGO> python-chinese at lists.python.cn CGO> http://python.cn/mailman/listinfo/python-chinese === === === === === === === === === === -- Best regards, Zoom.Quiet /=======================================\ ]Time is unimportant, only life important![ \=======================================/ -------------- next part -------------- A non-text attachment was scrubbed... Name: getSHwunderground.exe Type: application/x-msdownload Size: 296156 bytes Desc: not available Url : http://lists.exoweb.net/pipermail/python-chinese/attachments/20040306/4fd7e69c/getSHwunderground.bin
2004年03月06日 星期六 20:17
能不能把你的setup文件看一下. 我用的是activepython 2.3 py2exe 是0.5 lilin lin.li at samsung.com Python is designed to save time ----- Original Message ----- From: "CHEN Guang (Oliver)" <oliver_guang_chen at yahoo.com.cn> To: <python-chinese at lists.python.cn> Sent: Saturday, March 06, 2004 3:11 PM Subject: Re: [python-chinese] 밑黨警속icon > 我按您的方法试了一下, DOS 窗口出现了如下提示: > File > "C:\PYTHON23\Lib\site-packages\py2exe\build_exe.py", > line 577, in build_e > xecutable > add_icon(unicode(exe_path), unicode(ico_filename), > ico_id) > RuntimeError: MapExistingFile: 句柄无效。 > > EXE > 文件编译成功了,但图标还是老样子,没变成卡通蛇,这是怎么回事? > > --- Lilin <lin.li at samsung.com> 的正文:> > 我刚刚按着http://starship.python.net/crew/theller/moin.cgi/CustomIcons上面的方法试过了,完全可以. > > 首先找一个icon放在setup.py所在目录, 然后修改setup > > 文件 > > 我的例子如下 > > setup( > > # The first three parameters are not required, > > if at least a > > # 'version' is given, then a versioninfo > > resource is built from > > # them and added to the executables. > > version = "0.0.0.3", #-->版本 > > description = "error finder from > > lin.li at samsung.com",#-->描述 > > name = "errorfinder",#-->名称 > > # targets to build > > #windows = ["test_wx.py"], > > console = [{"script":"GO.py", > > "icon_resources": [(1, "py.ico")]}# > > 这一行就是添加icon, > > ] > > ) > > > > > > lilin > > lin.li at samsung.com > > Python is designed to save time> > _______________________________________________ > > 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 > _______________________________________________ > python-chinese mailing list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > >
Zeuux © 2024
京ICP备05028076号