# init.py # Remember we wanted to include our working folder in the system path so # so that our working folder would be available no matter where we started # our python session? We did it in multiple steps in modules.py. We can # simplify the process by creating a file that contains all of those steps # so that we can simply load that file every time we start a new python # session. # # This file contains those steps: import sys import os sys.path.append(os.path.join("C:\\", "alee", "python")) # This one shows what I did for my Windows machine. The one I showed in # modules.py is what I had to do for my Mac OS X. # Obviously, your working folder would not be named alee, so change # it accordingly. If you have more subfolders, then add them as # well. Whatever you do you must include all the folder names in the entire # path from the root to the final folder. # # Just issue the following after you start a new ipython session: # # >>> from init import * # # or # # >>> import init # # depanding on how you want to invoke the names that get imported in your # current module.