def _dbdir():
global dbdir<EOL>from os import mkdir, path, getcwd, chdir<EOL>if dbdir is None:<EOL><INDENT>from acorn.config import settings<EOL>config = settings("<STR_LIT>")<EOL>if (config.has_section("<STR_LIT>") and<EOL>config.has_option("<STR_LIT>", "<STR_LIT>")):<EOL><INDENT>dbdir = config.get("<STR_LIT>", "<STR_LIT>")<EOL><DEDENT>else: <EOL><INDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT><DEDENT>from acorn.utility import abspath<EOL>if not path.isabs(dbdir):<EOL><INDENT>dbdir = abspath(dbdir)<EOL><DEDENT>if not path.isdir(dbdir): <EOL><INDENT>mkdir(dbdir)<EOL><DEDENT>return dbdir<EOL>
Returns the path to the directory where acorn DBs are stored.