Re: printing inside and outside of main() module
- From: Peter Otten <__peter__@xxxxxx>
- Date: Wed, 30 Apr 2008 17:31:17 +0200
korean_dave wrote:
This allows me to see output:main() # add this
---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???
Python doesn't call the main() function; you have to invoke it explicitly.
Peter
.
- Follow-Ups:
- Re: printing inside and outside of main() module
- From: Bruno Desthuilliers
- Re: printing inside and outside of main() module
- References:
- printing inside and outside of main() module
- From: korean_dave
- printing inside and outside of main() module
- Prev by Date: printing inside and outside of main() module
- Next by Date: Re: computing with characters
- Previous by thread: printing inside and outside of main() module
- Next by thread: Re: printing inside and outside of main() module
- Index(es):