File path of current .blend file

I’m saving a settings file for an export tool. When I open a file with a relative path, it is saved to my home directory (I’m using Linux). Is there a way to find out what directory the current .blend file is in so I can put the settings file in the same directory?


I just noticed Blender.Get(‘filename’) doesn’t get cleared when you do a file/new. Seems like it should to me.

Thank you. This will help a ton!