473,606 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wxpython ms-dos black window popping up in background

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( )
Sep 9 '08 #1
12 2774
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.c omwrote:
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
Sep 9 '08 #2
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.c omwrote:
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
Sep 9 '08 #3
On 9 sep, 23:35, icarus <rsa...@gmail.c omwrote:
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.c omwrote:
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.
Sep 9 '08 #4
icarus wrote:
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.c omwrote:
>>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.MainLoo p()
--
http://mail.python.org/mailman/listinfo/python-list
--
Follow the path of the Iguana...http://rebertia.com
On Windows use py2exe and Inno Setup to create "frozen" application that is easy
to distribute. On Mac/Linux there are other solutions.

-Larry
Sep 9 '08 #5
icarus top-posted:
one more question...
....deserves a separate thread.
how do I create a pythonw standalone executable that works on w32,
linux, mac, etc..?
Either it is Python, then it is portable but no executable, or it is an
executable, then it is standalone but not portable. I'm afraid what you are
asking for is not possible. Other than that, others told you how to easily
get a standalone executable.

Uli

[ 35 lines of uselessly quoted content removed ]

--
Sator Laser GmbH
Geschäftsführ er: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

Sep 10 '08 #6
On Tue, 9 Sep 2008 14:35:13 -0700 (PDT), icarus <rs****@gmail.c om>
wrote:
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..?
I have noticed that when applications are written in Python with the
GUI created by PyGTK, it seems that to install the application on each
slightly different version of unix is a fairly major task - although
the creators of PyGTK proudly say that the code will run anywhere, it
definitely will not install anywhere - the code will only run on a
slightly different system after a massive and major rewrite of the
install for that target system.

Horrible installs are a chronic problem GUI programs driven by
interpreted languages Installing visual basic programs that worked on
one Windows machine to work on a very slightly different windows
machine was also a nightmare.

I have not attempted to create installable wxPython windows, but
generally, "run anywhere" will bite you. Still looking for a good
solution to "run anywhere".
--
----------------------
We have the right to defend ourselves and our property, because
of the kind of animals that we are. True law derives from this
right, not from the arbitrary power of the omnipotent state.

http://www.jim.com/ James A. Donald
Sep 10 '08 #7
On Sep 10, 6:48*am, James A. Donald <jam...@echeque .comwrote:
On Tue, 9 Sep 2008 14:35:13 -0700 (PDT), icarus <rsa...@gmail.c om>
wrote:
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..?

I have noticed that when applications are written in Python with the
GUI created by PyGTK, it seems that to install the application on each
slightly different version of unix is a fairly major task - although
the creators of PyGTK proudly say that the code will run anywhere, it
definitely will not install anywhere - the code will only run on a
slightly different system after a massive and major rewrite of the
install for that target system.

Horrible installs are a chronic problem GUI programs driven by
interpreted languages *Installing visual basic programs that worked on
one Windows machine to work on a very slightly different windows
machine was also a nightmare.

I have not attempted to create installable wxPython windows, but
generally, "run anywhere" will bite you. *Still looking for a good
solution to "run anywhere".

--
* ----------------------
We have the right to defend ourselves and our property, because
of the kind of animals that we are. True law derives from this
right, not from the arbitrary power of the omnipotent state.

http://www.jim.com/* * *James A. Donald
I haven't had much trouble getting wxPython applications to run in
Windows XP and Ubuntu Hardy Heron. Of course, my GUIs aren't extremely
complex, but I did make use of Hammond's PyWin32 package and had to
wrap those in Platform aware conditional statements. Plus wx was
pretty easy to install in Ubuntu, so that was cool.

I can't really comment on other toolkits though.

Mike
Sep 10 '08 #8
Mike Driscoll wrote:
On Sep 10, 6:48 am, James A. Donald <jam...@echeque .comwrote:
>On Tue, 9 Sep 2008 14:35:13 -0700 (PDT), icarus <rsa...@gmail.c om>
wrote:

>>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..?
I have noticed that when applications are written in Python with the
GUI created by PyGTK, it seems that to install the application on each
slightly different version of unix is a fairly major task - although
the creators of PyGTK proudly say that the code will run anywhere, it
definitely will not install anywhere - the code will only run on a
slightly different system after a massive and major rewrite of the
install for that target system.

Horrible installs are a chronic problem GUI programs driven by
interpreted languages Installing visual basic programs that worked on
one Windows machine to work on a very slightly different windows
machine was also a nightmare.

I have not attempted to create installable wxPython windows, but
generally, "run anywhere" will bite you. Still looking for a good
solution to "run anywhere".

--
----------------------
We have the right to defend ourselves and our property, because
of the kind of animals that we are. True law derives from this
right, not from the arbitrary power of the omnipotent state.

http://www.jim.com/ James A. Donald

I haven't had much trouble getting wxPython applications to run in
Windows XP and Ubuntu Hardy Heron. Of course, my GUIs aren't extremely
complex, but I did make use of Hammond's PyWin32 package and had to
wrap those in Platform aware conditional statements. Plus wx was
pretty easy to install in Ubuntu, so that was cool.

same with me,
wxPython, packed with py2exe + ino setup,
runs out of the box on XP, Vista, Ubuntu without any problem.

cheers,
Stef
I can't really comment on other toolkits though.

Mike
--
http://mail.python.org/mailman/listinfo/python-list
Sep 10 '08 #9
James A. Donald
Horrible installs are a chronic problem of GUI programs driven by
interpreted languages Â*Installing visual basic programs that worked on
one Windows machine to work on a very slightly different windows
machine was also a nightmare.

I have not attempted to create installable wxPython windows, but
generally, "run anywhere" will bite you. Â*Still looking for a good
solution to "run anywhere".
Mike Driscoll
I haven't had much trouble getting wxPython applications to run in
Windows XP and Ubuntu Hardy Heron.
Did you attempt to create proper install packages that show up in the
Linux package managers, and the windows add/remove programs tool?
--
----------------------
We have the right to defend ourselves and our property, because
of the kind of animals that we are. True law derives from this
right, not from the arbitrary power of the omnipotent state.

http://www.jim.com/ James A. Donald
Sep 10 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2896
by: Grant Edwards | last post by:
Can anybody recommend a good book on wxPython? Are there any books on wxPython? I've been trying to learn wxPython and/or wax for a few weeks, and I'm just not getting it. wxWindows seems to be more low-level than the other GUI toolkits I've used (Tk, GTK, and Trestle), and there are all sorts exposed details in wxWindows/wxPython that I find weird.
25
3339
by: BJörn Lindqvist | last post by:
See: http://www.wxpython.org/quotes.php. especially: "wxPython is the best and most mature cross-platform GUI toolkit, given a number of constraints. The only reason wxPython isn't the standard Python GUI toolkit is that Tkinter was there first." - Guido van Rossum Guess, that answers my question, but isn't "Tkinter was there first" a very bad answer? :) It is kinda ugly too, so I wonder why it can't be replaced? Or maybe another GUI...
1
2558
by: timothy.williams | last post by:
I'm trying to install wxPython 2.5.3.1 using Python 2.3.2 on a Fedora 2 machine. I have python in a non-standard place, but I'm using --prefix with the configure script to point to where I have everything. The make install in $WXDIR seemed to go fine. I have the libxw* libraries in my lib/ directory libwx_base-2.5.so@ libwx_gtk_adv-2.5.so.3.0.0* libwx_base-2.5.so.3@ libwx_gtk_core-2.5.so@
1
2974
by: James Stroud | last post by:
Hello All, I will soon have an excuse to install a new operating system on my computer. I would like to know exactly what operating system I should have so that I can get wxPython going. wxPython is my only hold-out on my current system. wxPython seems to need gnome. So I have tried to build garnome and it didn't build all the way..and, well, I've tried so many things trying to get wxPython built that I really don't care to relive the...
25
4267
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK on Windows "(...) > can i use pyGTK under > Windows???
3
1351
by: John Salerno | last post by:
I just realized that after installing wxPython, it did not add the usual menu item to my Start menu (Windows), where I can access the docs and demo. I searched through the wxPython folder in the site-packages directory, but I can't seem to find it. Anyone know how I can get this back? Thanks.
7
2310
by: Mr. Roboto | last post by:
Folks: I want to embark on a project to add Python (actually, wxPython or PythonWin) to a new Windows app I want to start writing soon. Essentially, I want to take VB6 (or pos Delphi) and construct the app framework/core functionality using one of those languages, then extend the app w/ Python, the same way one can extend the MS Office apps using VBA. The core Python docs provide the fundamental info one needs to get started. But, I've...
10
3939
by: Vincent Delporte | last post by:
Hi I browsed the archives, but since some messages date back a bit, I wanted to make sure that - py2exe is still the best tool in town to compile Python scripts to run on a Windows host that doesn't have Python installed, including wxWidgets/wxPython - there's no way to build a single EXE, to make deployment easier (if
1
2550
by: PAllen | last post by:
Hi all, I am trying to get rid of a few of my old MS Access applications and move them to PostgreSQL and Python/wxpython. Does anyone have any suggestions on the easiest way to learn to program small database applications with python & wxpython? Does anyone have a few small examples at least? I will mainly need forms with/without subforms for viewing and inserting data into the database. Nothing too complicated to get
4
2971
by: stef | last post by:
hello, I'm trying to move from Delphi to Python (move from MatLab to Python already succeeded, also thanks to this discussion group). From the discussions in this list about "the best" GUI for Python, it now seems to me that wxPython is thé choice for my kind of applications. I've no experience with wxPython yet, I just run a few examples and indeed it looks good (as expected from the
0
8015
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7951
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8430
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6770
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5465
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3977
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1296
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.