Hello world

greetings

       I wanna know what is wrong ? the compiler gave me an  error in                          the second line syntax error : print 

import wx
def hello(event):
print “Hello, world!”
app = wx.App()
win = wx.Frame(None, title=“Hello, wxPython!”,
size=(200, 100))
button = wx.Button(win, label=“Hello”)
button.Bind(wx.EVT_BUTTON, hello)
win.Show()
app.MainLoop()

 thank you for your time.........,

newbie
thx

···

Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.

hitler holger wrote:

greetings

           I wanna know what is wrong ? the compiler gave me an error in the second line syntax error : print
          
import wx
def hello(event):
print "Hello, world!"
app = wx.App()
win = wx.Frame(None, title="Hello, wxPython!",
size=(200, 100))
button = wx.Button(win, label="Hello")
button.Bind(wx.EVT_BUTTON, hello)
win.Show()
app.MainLoop()

     thank you for your time.........,
   newbie
   thx

Hi,

What was the error?

With proper indentation it works for me.

See attached.

Regards,

Ray Smith
http://RaymondSmith.com

wxhello.py (245 Bytes)