# page 320 # FILE: printName.py print __name__ >>> import printName printName >>> import string >>> string.__name__ 'string' >>> import re >>> re.__name__ 're' >>> import mimetools >>> mimetools.__name__ 'mimetools' >>> import os >>> os.__name__ 'os' > python printName.py __main__ # FILE: testNameAttribute.py def test(): print "Python is becoming popular." if __name__ == "__main__": test() > python testNameAttribute.py Python is becoming popular. >>> import testNameAttribute >>> testNameAttribute.__name__ testNameAttribute >>> testNameAttribute.test() Python is becoming popular.