def project_data_dir(project='default'):
 if (not inside_project()):
  raise NotConfigured('Not inside a project')
 cfg = get_config()
 if cfg.has_option(DATADIR_CFG_SECTION, project):
  d = cfg.get(DATADIR_CFG_SECTION, project)
 else:
  scrapy_cfg = closest_scrapy_cfg()
  if (not scrapy_cfg):
   raise NotConfigured('Unable to find scrapy.cfg file to infer project data dir')
  d = abspath(join(dirname(scrapy_cfg), '.scrapy'))
 if (not exists(d)):
  os.makedirs(d)
 return d

def project_data_dir ( project = 'default' ) : if ( not inside_project ( ) ) : raise NotConfigured ( 'Not inside a project' ) cfg = get_config ( ) if cfg . has_option ( DATADIR_CFG_SECTION , project ) : d = cfg . get ( DATADIR_CFG_SECTION , project ) else : scrapy_cfg = closest_scrapy_cfg ( ) if ( not scrapy_cfg ) : raise NotConfigured ( 'Unable to find scrapy.cfg file to infer project data dir' ) d = abspath ( join ( dirname ( scrapy_cfg ) , '.scrapy' ) ) if ( not exists ( d ) ) : os . makedirs ( d ) return d
return the current project data dir .