Python论坛  - 讨论区

标题:Re: Re[2]: [python-chinese] 可不可以禁止MS-DOS窗口的出现?或者让它自动最小化?

2004年03月04日 星期四 09:56

kongx kongx at necas.nec.com.cn
Thu Mar 4 09:56:40 HKT 2004

如果是纯脚本,只要把扩展名从.py 改成 .pyw 就没有控制台窗口了
因为 .py 是与 python.exe 关联,.pyw 与 pythonw.exe 关联。
py2exe 转成 exe 之后
不能用 pythonw myscript.exe 的方式执行,pythonw只认脚本(刚刚测试的:p


----- Original Message -----
From: "Zoom.Quiet" <zoomq at infopro.cn>
To: "CHEN Guang (Oliver)" <oliver_guang_chen at yahoo.com.cn>
Cc: "@Chinese-python" <python-chinese at lists.python.cn>
Sent: Wednesday, March 03, 2004 9:33 PM
Subject: Re[2]: [python-chinese] 可不可以禁止MS-DOS窗口的出现?或者让它自动
最小化?


> Hello CHEN,
>
> 如果你安装过其它Python 发布的win32 工具就会自然的想到
> 定义一日快捷方式是也乎!
> 比如说:
> E:\LAMPS\Python23\pythonw.exe "E:\GNU\Leo\src\leo.py"
> 是我的Leo 自动创建的快捷方式
>
> 你的也一样
> 右击选
> 发送到桌面快捷方式
> 然后编辑属性为
>
> where\is\u\pythonw.exe "where\is\u\hello.py"
>
> 至于 pyExe 之后的 .exe
> 应该也可以!
>
> 我之前使用 Bao 编写的 wxPythoh 软件,
> 运行时没有DOS窗口的
>
> === [ 21:05 ; 04-03-03 ] you wrote:
>
> CGO> Zoom.Quiet  您好:
>
> CGO>   谢谢您回答我的问题,但我还是不明白如何使用
> CGO> pythonw.exe 执行。例如我将脚本  hello.py  编译成了
> CGO> hello.exe,  下一步该怎么办呢? 显然不是先打开  MS-DOS
> CGO> 窗口,然后键入  pythonw hello.exe  吧?
> CGO>   麻烦您讲解一下好吗?不胜感激。
>
> CGO>  --- "Zoom.Quiet" <zoomq at infopro.cn> 的正文:> Hello
> CGO> CHEN,
> >>
> >> 调试完成后使用 pythonw.exe 执行就不会有DOS 窗口了
> >>
> >> === [ 13:53 ; 04-03-03 ] you wrote:
> >>
> >> CGO>
> >>
> CGO> 我的Python脚本中已经包含了用Tkinter编写的图形化界面,然而编译成的EXE
文件后在Win98下运行时出现的不仅有我想要的图形化界面,还自动蹦出一个黑乎乎的
MS-DOS窗口。可不可以禁止MS-DOS窗口的出现?或者让它自动最小化?
> >>
> >> CGO>
> >>
> CGO> _________________________________________________________
> >> CGO> Do You Yahoo!?
> >> CGO>
> >> 完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间
> >> CGO>
> >>
> 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![
> >>  \=======================================/
> >>
>
> CGO> _________________________________________________________
> CGO> Do You Yahoo!?
> CGO> 完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间
> CGO> http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.mail.yahoo.com
>
> === === === === === === === === === ===
>
> --
> Best regards,
>  Zoom.Quiet
>
>  /=======================================\
> ]Time is unimportant, only life important![
>  \=======================================/
>
> _______________________________________________
> python-chinese mailing list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese




[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年03月04日 星期四 10:59

Jacob Fan jacob at exoweb.net
Thu Mar 4 10:59:20 HKT 2004

-----Original Message-----
From: CHEN Guang (Oliver) [mailto:oliver_guang_chen at yahoo.com.cn] 
Sent: 2004年3月3日 13:53
To: python-chinese at lists.python.cn
Subject: [python-chinese] ?é2??éò????1MS-DOS′°?úμ?3???£??ò??è??ü×??ˉ×?D??ˉ£?


>我的Python脚本中已经包含了用Tkinter编写的图形化界面,
>然而编译成的EXE文件后在Win98下运行时出现的不仅有我想
>要的图形化界面,还自动蹦出一个黑乎乎的MS-DOS窗口。
>可不可以禁止MS-DOS窗口的出现?或者让它自动最小化?

我要指出一点:py2exe之类的工具做的不是将Python脚本编译成EXE文件。
它做的是将Python脚本编译成字节码,然后打包到一个压缩文件里,附加到
一个特制的exe文件的后面。这个exe文件启动时,会初始化Python解释器,
从那个压缩文件里载入需要的各个模块。


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年03月04日 星期四 11:38

Zoom.Quiet zoomq at infopro.cn
Thu Mar 4 11:38:10 HKT 2004

Hello Jacob,

哇哇!
明了!! 在下用了这么久 PyExe
这次才算真正明白!

=== [ 10:59 ; 04-03-04 ] you wrote:

JF> -----Original Message-----
JF> From: CHEN Guang (Oliver) [mailto:oliver_guang_chen at yahoo.com.cn] 
JF> Sent: 2004年3月3日 13:53
JF> To: python-chinese at lists.python.cn
JF> Subject: [python-chinese]
JF> ?é2??éò????1MS-DOS′°?úμ?3???£??ò??è??ü×??ˉ×?D??ˉ£?


>>我的Python脚本中已经包含了用Tkinter编写的图形化界面,
>>然而编译成的EXE文件后在Win98下运行时出现的不仅有我想
>>要的图形化界面,还自动蹦出一个黑乎乎的MS-DOS窗口。
>>可不可以禁止MS-DOS窗口的出现?或者让它自动最小化?

JF> 我要指出一点:py2exe之类的工具做的不是将Python脚本编译成EXE文件。
JF> 它做的是将Python脚本编译成字节码,然后打包到一个压缩文件里,附加到
JF> 一个特制的exe文件的后面。这个exe文件启动时,会初始化Python解释器,
JF> 从那个压缩文件里载入需要的各个模块。
JF> _______________________________________________
JF> python-chinese mailing list
JF> python-chinese at lists.python.cn
JF> http://python.cn/mailman/listinfo/python-chinese

=== === === === === === === === === === 

-- 
Best regards,
 Zoom.Quiet                            

 /=======================================\
]Time is unimportant, only life important![
 \=======================================/



[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2024

    京ICP备05028076号