wxpython ms-dos黑色窗口弹出背景 [英] wxpython ms-dos black window popping up in background

查看:77
本文介绍了wxpython ms-dos黑色窗口弹出背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

平台:windows xp专业版,python 2.5版,wxpython


当我仔细检查我的程序文件test.py时(为简单起见,我会是

使用下面的代码),我看到窗口很好。但是ms-dos

黑色窗口会在后台弹出。在Linux上,没有任何问题。


如何在后台摆脱那个ms-dos黑色窗口?

我需要添加的东西我的代码?在Windows中进行调整的设置?

提前感谢。

#!/ usr / bin / python

import wx


appwx = wx.App()


frame = wx.Frame(无,-1,''test.py'')

frame.Show()


appwx.MainLoop()

解决方案

你需要有该脚本由pythonw.exe运行,而不是python.exe

pythonw.exe禁止DOS框出现,应该使用

来运行GUI应用程序,如你的。


问候,

克里斯


2008年9月9日星期二下午1:33, icarus< rs **** @ gmail.comwrote:


platform:windows xp professional,python 2.5,wxpython


当我仔细检查我的程序文件test.py时(为简单起见,我将使用下面的代码获得
),我看到窗口就好了。但是ms-dos

黑色窗口会在后台弹出。在Linux上,没有任何问题。


如何在后台摆脱那个ms-dos黑色窗口?

我需要添加的东西我的代码?在Windows中进行调整的设置?

提前感谢。


#!/ usr / bin / python

import wx


appwx = wx.App()


frame = wx.Frame(无,-1,''test.py'')

frame.Show()


appwx.MainLoop()

-
http://mail.python.org/mailman/listinfo/python-list




-

沿着鬣蜥的路径......
http://rebertia.com


哦好的。谢谢。在windows xp中我只是将文件扩展名重命名为.pyw

这样做了。


还有一个问题...


如何创建一个可以在w32上工作的pythonw独立可执行文件,


我的意图是该过程对用户透明。即使知道应用程序是用python编写的,他也不会b
。所有他都知道,当他双击b / b
时,应用程序弹出后台没有DOS黑色

屏幕(对于w32用户)。



9月9日上午10点49分,Chris Rebert < c ... @ rebertia.comwrote:


您需要让脚本由pythonw.exe运行而不是python.exe

pythonw.exe禁止DOS框出现,应该使用

来运行你的GUI应用程序。


问候,
Chris


2008年9月9日星期二下午1:33,icarus< rsa ... @ gmail.comwrote:


平台:windows xp专业版,python 2.5版,wxpython


当我仔细检查我的程序文件测试时。 py(为了简单起见,我将使用下面的代码获得
),我看到窗口就好了。但是ms-dos

黑色窗口会在后台弹出。在Linux上,没有任何问题。


如何摆脱背景中的ms-dos黑色窗口?

我需要添加的东西我的代码?在Windows中进行调整的设置?

提前感谢。


#!/ usr / bin / python

import wx


appwx = wx.App()


frame = wx.Frame(None,-1,''test。 py'')

frame.Show()


appwx.MainLoop()

-
http://mail.python.org/ mailman / listinfo / python-list



-

沿着Iguana的路径...... http://rebertia.com


9 sep,23:35, icarus< rsa ... @ gmail.comwrote:


哦好的。谢谢。在windows xp中我只是将文件扩展名重命名为.pyw

这样做了。


还有一个问题...


如何创建一个可以在w32上工作的pythonw独立可执行文件,


我的意图是该过程对用户透明。即使知道应用程序是用python编写的,他也不会b
。所有他都知道,当他双击b / b
时,应用程序弹出后台没有DOS黑色

屏幕(对于w32用户)。


9月9日上午10点49分,Chris Rebert < c ... @ rebertia.comwrote:


您需要让脚本由pythonw.exe运行而不是python.exe

pythonw.exe禁止DOS框出现,应该使用

来运行你的GUI应用程序。


问候,

Chris


2008年9月9日星期二下午1:33,icarus< rsa ... @ gmail.comwrote:


platform:windows xp professional,python 2.5 ,wxpython


当我仔细检查我的程序文件test.py时(为简单起见,我使用下面的代码将会是

),我看到窗口就好了。但是ms-dos

黑色窗口会在后台弹出。在Linux上,没有任何问题。


如何摆脱背景中的ms-dos黑色窗口?

我需要添加到我的代码中的东西?在Windows中进行调整的设置?

提前感谢。


#!/ usr / bin / python

import wx


appwx = wx.App()


frame = wx.Frame(None,-1,''test.py'')

frame。 Show()


appwx.MainLoop()

-

> http:// mail。 python.org/mailman/listinfo/python-list


-

按照路径Iguana ...... http://rebertia.com



py2exe可能就是你想要的。


platform: windows xp professional, python 2.5, wxpython

When I double-check on my program file test.py (for simplicity I''ll be
using this code below), I see the window just fine. But the ms-dos
black window pops up in the background. On Linux, no issues at all.

How can I get rid of that ms-dos black window in the background?
something I need to add to my code? a setting to adjust in windows?
thanks in advance.
#!/usr/bin/python
import wx

appwx = wx.App()

frame = wx.Frame(None, -1, ''test.py'')
frame.Show()

appwx.MainLoop()

解决方案

You need to have the script be run by pythonw.exe as opposed to python.exe
pythonw.exe suppresses the DOS box from coming up and should be used
for running GUI applications such as yours.

Regards,
Chris

On Tue, Sep 9, 2008 at 1:33 PM, icarus <rs****@gmail.comwrote:

platform: windows xp professional, python 2.5, wxpython

When I double-check on my program file test.py (for simplicity I''ll be
using this code below), I see the window just fine. But the ms-dos
black window pops up in the background. On Linux, no issues at all.

How can I get rid of that ms-dos black window in the background?
something I need to add to my code? a setting to adjust in windows?
thanks in advance.
#!/usr/bin/python
import wx

appwx = wx.App()

frame = wx.Frame(None, -1, ''test.py'')
frame.Show()

appwx.MainLoop()
--
http://mail.python.org/mailman/listinfo/python-list



--
Follow the path of the Iguana...
http://rebertia.com


Oh ok. Thanks. In windows xp I just renamed the file extension to .pyw
That did it.

one more question...

how do I create a pythonw standalone executable that works on w32,
linux, mac, etc..?

My intent is to have the process transparent to the user. He wouldn''t
even know the app was written in python. All he knows that when he
double-clicks on it, the application pops up without the DOS black
screen in the background (for w32 users.)


On Sep 9, 10:49 am, "Chris Rebert" <c...@rebertia.comwrote:

You need to have the script be run by pythonw.exe as opposed to python.exe
pythonw.exe suppresses the DOS box from coming up and should be used
for running GUI applications such as yours.

Regards,
Chris

On Tue, Sep 9, 2008 at 1:33 PM, icarus <rsa...@gmail.comwrote:

platform: windows xp professional, python 2.5, wxpython

When I double-check on my program file test.py (for simplicity I''ll be
using this code below), I see the window just fine. But the ms-dos
black window pops up in the background. On Linux, no issues at all.

How can I get rid of that ms-dos black window in the background?
something I need to add to my code? a setting to adjust in windows?
thanks in advance.

#!/usr/bin/python
import wx

appwx = wx.App()

frame = wx.Frame(None, -1, ''test.py'')
frame.Show()

appwx.MainLoop()
--
http://mail.python.org/mailman/listinfo/python-list


--
Follow the path of the Iguana...http://rebertia.com


On 9 sep, 23:35, icarus <rsa...@gmail.comwrote:

Oh ok. Thanks. In windows xp I just renamed the file extension to .pyw
That did it.

one more question...

how do I create a pythonw standalone executable that works on w32,
linux, mac, etc..?

My intent is to have the process transparent to the user. He wouldn''t
even know the app was written in python. All he knows that when he
double-clicks on it, the application pops up without the DOS black
screen in the background (for w32 users.)

On Sep 9, 10:49 am, "Chris Rebert" <c...@rebertia.comwrote:

You need to have the script be run by pythonw.exe as opposed to python.exe
pythonw.exe suppresses the DOS box from coming up and should be used
for running GUI applications such as yours.

Regards,
Chris

On Tue, Sep 9, 2008 at 1:33 PM, icarus <rsa...@gmail.comwrote:

platform: windows xp professional, python 2.5, wxpython

When I double-check on my program file test.py (for simplicity I''ll be
using this code below), I see the window just fine. But the ms-dos
black window pops up in the background. On Linux, no issues at all.

How can I get rid of that ms-dos black window in the background?
something I need to add to my code? a setting to adjust in windows?
thanks in advance.

#!/usr/bin/python
import wx

appwx = wx.App()

frame = wx.Frame(None, -1, ''test.py'')
frame.Show()

appwx.MainLoop()
--
>http://mail.python.org/mailman/listinfo/python-list

--
Follow the path of the Iguana...http://rebertia.com

py2exe could be what you are looking for.


这篇关于wxpython ms-dos黑色窗口弹出背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆