You need to make sure that the directory you wish to import code from is in your system path e.g.:
sys.path.insert(0, path_to_your_module_dir)
Then you can go ahead and do
from module import function
UPDATE
The following thread has details of how to permanently add the directory to your pythonpath in either Windows or Unix-like systems:
Permanently add a directory to PYTHONPATH