namecollector somenameand __main__ somenameall three share the same integer object initiallyand only the name somename exists at the interactive prompt as isfile mod py somename file collector py from mod import from mod import from mod import collect lots of names here from assigns to my names from collector import somename package imports for thisi put the mymod py solution file listed for exercise into directory package the following is what did in windows console interface to set up the directory and the __init__ py file that it' required to have until python you'll need to interpolate for other platforms ( use cp and vi instead of copy and notepadthis works in any directory ( ' using my own code directory here)and you can do some of this from file explorer guitoo when was donei had mypkg subdirectory that contained the files __init__ py and mymod py until python ' namespace package extensionyou need an __init__ py in the mypkg directorybut not in its parenttechnicallymypkg is located in the home directory component of the module search path notice how print statement coded in the directory' initialization file fires only the first time it is importednot the secondraw strings are also used here to avoid escape issues in the file pathsc:\codemkdir mypkg :\codecopy mymod py mypkg\mymod py :\codenotepad mypkg\__init__ py coded print statement :\codepython import mypkg mymod initializing mypkg mypkg mymod countlines( 'mypkg\mymod py' from mypkg mymod import countchars countchars( 'mypkg\mymod py' reloads this exercise just asks you to experiment with changing the changer py example in the bookso there' nothing to show here circular imports the short story is that importing recur first works because the recursive import then happens at the import in recur not at from in recur the long story goes like thisimporting recur first works because the recursive import from recur to recur fetches recur as wholeinstead of getting specific names recur is incomplete when it' imported from recur but because it uses import instead of fromyou're safepython finds and returns the already created appendix dsolutions to end-of-part exercises