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 11407
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: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM).
In this month's session, the creator of the excellent VBE...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
| |