Location for storing configuration files?

I would like to know what is the best location to save a configuration text file for an addon? Apart from setting a location hardcoded it would be better that an abstract or cross platform way would exist.

Do you know any thing like this?

You can use your addons’ directory, unless it is a built-in addon - those are stored in the Blender dir and is most likely not writable on Windows Vista and above.

You can access the path via file, also see http://stackoverflow.com/questions/4934806/python-how-to-find-scripts-directory

To manually find the scripts folder in the user directory, you may use:

bpy.utils.user_resource(‘SCRIPTS’)
bpy.utils.script_path_user()

They return
‘C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.73\scripts’
on Windows 7.

Thanks, I tested and it works.