Re: printing inside and outside of main() module

2008-04-30 Thread Peter Otten
Bruno Desthuilliers wrote: > Peter Otten a écrit : >> korean_dave wrote: >> >>> This allows me to see output: >>> >>> ---begin of try.py >>> print "Hello World" >>> --end of try.py >>> >>> This DOESN'T though... >>> >>> --begin of try2.py >>> def main(): >>> return "Hello" >> main() # add this >

Re: printing inside and outside of main() module

2008-04-30 Thread Bruno Desthuilliers
Peter Otten a écrit : korean_dave wrote: This allows me to see output: ---begin of try.py print "Hello World" --end of try.py This DOESN'T though... --begin of try2.py def main(): return "Hello" main() # add this --end of try2.py Can someone explain why??? Python doesn't call the main(

Re: printing inside and outside of main() module

2008-04-30 Thread Peter Otten
korean_dave wrote: > This allows me to see output: > > ---begin of try.py > print "Hello World" > --end of try.py > > This DOESN'T though... > > --begin of try2.py > def main(): > return "Hello" main() # add this > --end of try2.py > > Can someone explain why??? Python doesn't call the main(

printing inside and outside of main() module

2008-04-30 Thread korean_dave
This allows me to see output: ---begin of try.py print "Hello World" --end of try.py This DOESN'T though... --begin of try2.py def main(): return "Hello" --end of try2.py Can someone explain why??? -- http://mail.python.org/mailman/listinfo/python-list