On Fri, Aug 12, 2016 at 3:03 AM, Atri Mahapatra <atri.mahapa...@gmail.com> wrote: > I have installed IDLE 3.5.1 and wrote the following to check if print is > working. When it runs, I do not see anything is printed: > > class Base: #{ > def __init__( self ): #{ > print("Hello, world: \n\n"); > > #} > > #} > > > if ( __name__ == " __main__"): #{ > root = Base(); > #} > > Can anyone please point out the reason? > > Thanks, > Atri
Is name equal to main? That is, are you running this code as a top-level script? Also: You do not need to write Python code as if it were C or Java. All that extra punctuation is just putting unnecessary stress on the world's punctuation mines, which are already overworked. :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list