This may not be the ideal way of doing, but it’s how I’m doing it for now.
To build a local library with all the modules you write you should move the modules to the python, a process which is explained here.
The main problem, however, is that if you want to edit them, then you will have to access the hidden directories (in Mac). Which really sucks if you are as lazy as me.
The other way to do it is to change the list of directories that Python goes through looking for modules.
Here you can add a local directory of your choice – in my case it will be
The process of modifying Python’s search path is explained in greater detail here.
The easiest thing to do is to go open Python in the terminal and run the sys module.
>>> import sys
Then we can get the list of paths being search like this
Which for me returns a really long list, but should at least look like this
['', '/usr/local/lib/python2.3', '/usr/local/lib/python2.3/plat-linux2', '/usr/local/lib/python2.3/lib-tk', '/usr/local/lib/python2.3/lib-dynload', '/usr/local/lib/python2.3/site-packages']
All we need to do is append the directory to that list, like so
So now our path list should look a bit like this
>>> sys.path ['', '/usr/local/lib/python2.3', '/usr/local/lib/python2.3/plat-linux2', '/usr/local/lib/python2.3/lib-tk', '/usr/local/lib/python2.3/lib-dynload', '/usr/local/lib/python2.3/site-packages','/Users/jose/Documents/gh_repo']