| | |
wxpython and py2exe
![]() |
Hi
i am making a simle gui using wxpython and here is the script
i am converting this to an exe using this code
Now when i am running it from the generated exe... the console window also pops up. i want the console window to be running in the background. any suggestions?
thanks in advance
i am making a simle gui using wxpython and here is the script
Python Syntax (Toggle Plain Text)
import wx class bide(wx.Frame): def __init__(self): wx.Frame.__init__(self, None, -1, "just a test", pos=(0, 0), size=wx.DisplaySize()) panel = wx.Panel(self, -1) statusBar = self.CreateStatusBar() toolbar = self.CreateToolBar() #toolbar.AddSimpleTool(wx.NewId(), images.getNewBitmap(),"New", "Long help for 'New'") toolbar.Realize() menuBar = wx.MenuBar() menu1 = wx.Menu() menu1.Append(1, "&New Project","") menu1.Append(2, "&Open Project", "") menu1.Append(3, "Exit", "") menuBar.Append(menu1, "&File") menu2 = wx.Menu() menu2.Append(11, "&Copy", "Copy in status bar") menu2.Append(22, "C&ut", "") menu2.Append(33, "Paste", "") menu2.AppendSeparator() menu2.Append(wx.NewId(), "&Options...", "Display Options") menuBar.Append(menu2, "&Edit") self.SetMenuBar(menuBar) self.Bind(wx.EVT_MENU,self.onQuit,id=3) def onQuit(self,event): self.Close() if __name__== '__main__': app=wx.PySimpleApp() frame=bide() frame.Show(True) app.MainLoop()
i am converting this to an exe using this code
Python Syntax (Toggle Plain Text)
from distutils.core import setup import py2exe setup(console=['bide.py'])
Now when i am running it from the generated exe... the console window also pops up. i want the console window to be running in the background. any suggestions?
thanks in advance
My advice, use the little utility at:
http://www.daniweb.com/code/snippet499.html
Since this is GUI program you need to change 'console' to 'window' and give your filename .pyw extension.
http://www.daniweb.com/code/snippet499.html
Since this is GUI program you need to change 'console' to 'window' and give your filename .pyw extension.
![]() |
Similar Threads
- Instal of wxPython (Python)
- no WxPython here? (Python)
- more information about python (Python)
- Running Python (Python)
Other Threads in the Python Forum
- Previous Thread: Python Byte Code
- Next Thread: Tkinter Application with PyGame Sound
| Thread Tools | Search this Thread |
alarm app beginner cipher cmd coordinates cx-freeze data decimals development dictionary directory dynamic error examples feet file float format function generator getvalue gui halp homework http images import input ip itunes java keycontrol leftmouse line linux list lists loop maintain maze millimeter module mouse mysqldb number numbers output parsing path port prime programming projects push py2exe pygame pyglet pymailer pyqt python queue random recursion schedule screensaverloopinactive script scrolledtext slicenotation split sqlite ssh string strings sudokusolver table terminal text thread threading time tlapse tuple tutorial ubuntu unicode url urllib urllib2 variable variables ventrilo verify vigenere web webservice wikipedia wx.wizard wxpython xlwt






