Hello guys,
I've been searching for a method to hide the console (as c/c++ user would say) under windows, but i found nothing really helpful.
What I found is:
1) I need to rename file as pyw. But when I do so, code just doesn't give any output or open windows, it just close itself...
2) I need to create a "python" service...But how?
Is there another simpler method to tell python that my main window is the frame and not the console? I'm working with boa, and my app code is that: -
import wx
-
-
import fatturefr1
-
-
modules ={'fatturefr1': [1, 'Main frame of Application', 'fatturefr1.py']}
-
-
class BoaApp(wx.App):
-
def OnInit(self):
-
self.main = fatturefr1.create(None)
-
self.main.Show()
-
self.SetTopWindow(self.main)
-
return True
-
-
def main():
-
application = BoaApp(0)
-
application.MainLoop()
-
-
if __name__ == '__main__':
-
main()
-
Thanks and greetings,
Luke
2 11425
The only way that I've been able to hide the console window was to use PyInstaller to convert my python script into an executable. It has an option to keep the console from opening when you run the program (and many other options, like packing everything into a single file). This is probably not the kind of solution you are looking for, but maybe you can use it as a last resort if it's necessary that there's no console window.
Hello guys,
I've been searching for a method to hide the console (as c/c++ user would say) under windows, but i found nothing really helpful.
What I found is:
1) I need to rename file as pyw. But when I do so, code just doesn't give any output or open windows, it just close itself...
2) I need to create a "python" service...But how?
Is there another simpler method to tell python that my main window is the frame and not the console? I'm working with boa, and my app code is that: -
import wx
-
-
import fatturefr1
-
-
modules ={'fatturefr1': [1, 'Main frame of Application', 'fatturefr1.py']}
-
-
class BoaApp(wx.App):
-
def OnInit(self):
-
self.main = fatturefr1.create(None)
-
self.main.Show()
-
self.SetTopWindow(self.main)
-
return True
-
-
def main():
-
application = BoaApp(0)
-
application.MainLoop()
-
-
if __name__ == '__main__':
-
main()
-
Thanks and greetings,
Luke
- I use the .pyw (python - no console window) trick all the time.
- I don't know where you get that "create a python process" from.
- Boa Constructor will consume the output intended for the output. Make sure that you have split the editor window to show (Traceback) (Output), etc. tabs.
- Play with
- application = BoaApp(redirect=False) # True
while using .pyw. Due to #3, do this from the command-line.
??? This is windows, right ???
Sign in to post your reply or Sign up for a free account.
Similar topics
by: hokiegal99 |
last post by:
How can I make this script run w/o seeing a cmd popup window on the
screen? The script works well, but each hour (when the task scheduler
runs it) a brief cmd window appears and then goes away....
|
by: Gropius |
last post by:
Hi
i've a problem, i'd like that my application (for winxp) works in background
in the taskmanager (or in the systray) instead of in a window. How can i do?
Thanks!
|
by: spifster |
last post by:
Hello all,
I am building a collapsable tree using Javascript with DOM in IE. In
order to make collapsed cells disappear I have been hiding the text.
The cells collapse but still leave borders...
|
by: js |
last post by:
HI guys,
How do you write Perl's
print a ... z, A ... Z, "\n"' in Python
In Python?
|
by: adamurbas |
last post by:
ya so im pretty much a newb to this whole python thing... its pretty
cool but i just started today and im already having trouble. i
started to use a tutorial that i found somewhere and i followed...
|
by: Steven W. Orr |
last post by:
python-2.3.5
wx-2.6
I just bought the wxPython In Action book and I see that all the examples
say to
import wx
All of our pre-existing code was horribly doing a
from wxPython import *
I...
|
by: mac_the_scotte |
last post by:
Hi there.
I downloaded python a couple of days ago from the official site and
have started writing simple programs in the python gui (this being my
first attempt at programming ever). The only...
|
by: Curious |
last post by:
I''ve created a simple Console Application in C#.NET (.NET 2.0), and I
have the following code:
Console.WriteLine("Now let us begin!");
However, the string, "Now let us begin!", never shows up...
|
by: icarus |
last post by:
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...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
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,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |