wxpython and py2exe

Reply

Join Date: Nov 2006
Posts: 7
Reputation: sliver_752 is an unknown quantity at this point 
Solved Threads: 0
sliver_752's Avatar
sliver_752 sliver_752 is offline Offline
Newbie Poster

wxpython and py2exe

 
0
  #1
Nov 14th, 2006
Hi

i am making a simle gui using wxpython and here is the script

  1. import wx
  2.  
  3. class bide(wx.Frame):
  4. def __init__(self):
  5. wx.Frame.__init__(self, None, -1, "just a test", pos=(0, 0), size=wx.DisplaySize())
  6. panel = wx.Panel(self, -1)
  7. statusBar = self.CreateStatusBar()
  8. toolbar = self.CreateToolBar()
  9. #toolbar.AddSimpleTool(wx.NewId(), images.getNewBitmap(),"New", "Long help for 'New'")
  10. toolbar.Realize()
  11. menuBar = wx.MenuBar()
  12. menu1 = wx.Menu()
  13. menu1.Append(1, "&New Project","")
  14. menu1.Append(2, "&Open Project", "")
  15. menu1.Append(3, "Exit", "")
  16. menuBar.Append(menu1, "&File")
  17. menu2 = wx.Menu()
  18. menu2.Append(11, "&Copy", "Copy in status bar")
  19. menu2.Append(22, "C&ut", "")
  20. menu2.Append(33, "Paste", "")
  21. menu2.AppendSeparator()
  22. menu2.Append(wx.NewId(), "&Options...", "Display Options")
  23. menuBar.Append(menu2, "&Edit")
  24. self.SetMenuBar(menuBar)
  25. self.Bind(wx.EVT_MENU,self.onQuit,id=3)
  26.  
  27. def onQuit(self,event):
  28. self.Close()
  29.  
  30. if __name__== '__main__':
  31. app=wx.PySimpleApp()
  32. frame=bide()
  33. frame.Show(True)
  34. app.MainLoop()

i am converting this to an exe using this code

  1. from distutils.core import setup
  2. import py2exe
  3. 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
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,221
Reputation: bumsfeld will become famous soon enough bumsfeld will become famous soon enough 
Solved Threads: 137
bumsfeld's Avatar
bumsfeld bumsfeld is offline Offline
Nearly a Posting Virtuoso

Re: wxpython and py2exe

 
0
  #2
Nov 14th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 7
Reputation: sliver_752 is an unknown quantity at this point 
Solved Threads: 0
sliver_752's Avatar
sliver_752 sliver_752 is offline Offline
Newbie Poster

Re: wxpython and py2exe

 
0
  #3
Nov 15th, 2006
cool... it works!
thanks again.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC