def run_bash_function(library_path, function_name, params):
    p = subprocess.Popen(['bash', '-c', '. %s; %s %s' % (library_path,
        function_name, params)], stdout=subprocess.PIPE, stderr=subprocess.PIPE
        )
Can a python script execute a function inside a bash script?