Using wxPython

Mike mbthorn at gmail.com
Wed May 21 06:13:38 PDT 2008


I just tried:

>>> import wx
>>>
>>> class Frame(wx.App) :
>>>   pass
>>>
>>> class App(wx.App) :
>>>   def OnInit(self) :
>>>     self.frame = wx.Frame(parent=None, title='Bare')
>>>     self.frame.Show()
>>>     self.SetTopWindow(self.frame)
>>>     return True
>>>
>>> if __name__ == '__main__':
>>>   app = App()
>>>   app.MainLoop()

and it worked fine.  I am not a python programmer so I don't know if  
there is a significant difference between our programs.  I am using  
pretty much the same thing in terms of software, only I didn't use  
ports/fink to get it.  I went to wxpython.org and followed their  
instructions.  Apparently there are some idiosyncrasies with the mac  
os install.

-mike


On May 20, 2008, at 6:28 PM, Frank Schima wrote:

> Hi all,
>
>
> I'm trying to run a simple wxPython program, but I get a strange  
> error:
>
> This program needs access to the screen.
> Please run with 'pythonw', not 'python', and only when you are logged
> in on the main display of your Mac.
>
> The program is as follows:
>
> import wx
> class App(wx.App):
>     def OnInit(self):
>         frame = wx.Frame(parent=None, title='Bare')
>         frame.Show()
>         return True
> app = App()
> app.MainLoop()
>
> There is no "pythonw" in the MacPorts version of Python 2.5. Does  
> anyone know how I can use wxPython with MacPorts?
>
> I'm running Mac OS X 10.5.2 on a Mac Pro. Xcode 3.0. MacPorts 1.6.
>
>
> Cheers!
> Frank Schima
> Boulder, CO
> schimaf at boulder.nist.gov
>
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20080521/aa1a8a8a/attachment.htm 


More information about the macports-users mailing list