What's the best way to get the full directory of the current Blender file in Python? It should be cross-platform.
You could also use
you can also do...
Worth noting that the path may be an empty string. so you may want to check
This is used by all internal paths in blender, image, video, render, pointcache etc - paths. so blend files can reference paths relative to each file.
You can use the functions provided by os.path for handling pathnames independendly from a platform.
To add a file to the basename you could use os.path.join: