Linux python problem

I have a script that relies on several pickled files, but it only looks in root instead of the directory that the script is running. Is there any way to force it to look where the script is running without too much trouble.

path = os.path.dirname(os.path.abspath(file))

I still have to make sure it works in windows, but it works in linux for now.