# init.py # Remember we wanted to include our working folder in the system path 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 is that file that 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 subfolder. # # Just issue the following after you start a new ipython session: # # >>> execfile("init.py") # # and then continue with whatever you wanted to do in your current python # session in the first place.