Importing python modules and text files
A more detailed example of the technique zeffi outlined is illustrated by the following example from http://web.purplefrog.com/~thoth/blender/python-cookbook/import-python.html

import bpy
import sys
import os

dir = os.path.dirname(bpy.data.filepath)
if not dir in sys.path:
    sys.path.append(dir )
    #print(sys.path)

import cityFunctions

# this next part forces a reload in case you edit the source after you first start the blender session
import imp
imp.reload(cityFunctions)

# this is optional and allows you to call the functions without specifying the package name
from cityFunctions import *