I've done a lot of searches but unless I'm missing something obvious (and I may be) I don't see any answers that don't involve already having a Blender file open (and I understand how to do that).
What I'd like to do is in my script be able to access the current directory that Blender opens up to load in Blender files. BEFORE any file is loaded. Because that default directory is where I want to store a config file to read parameters for my script (which can be run even if they don't have opened a Blender file).
Does that make sense? I can force a directory, of course, but I'd rather say to folks "just put the config in your default Blender directory" and then be able to find that file there.
All the answers seem to require first a file, like these:
bpy.path.abspath("//my/file.txt") bpy.path.abspath("//my\\file.txt") # on Windows, with backslash escaped bpy.path.abspath(r"//my\file.txt") # on Windows, using python raw string bpy.path.abspath("//../file.txt") # to go back a directory
but I don't have a file. (And using the "//" alone gives me an error, although using two back slashes just gives me a single "\" as the result, which is NOT the current directory).
This seems stupidly simple but I'm feeling really dumb.