(path='.', prevpath=None)
return closest_scrapy_cfg(os.path.dirname(path), path)
Return the path to the closest scrapy.cfg file by traversing the current
    directory and its parents
Return the path to the closest scrapy.cfg file by traversing the current
    directory and its parents
Return the path to the closest scrapy . cfg file by traversing the current directory and its parents
def closest_scrapy_cfg(path='.', prevpath=None):
    """Return the path to the closest scrapy.cfg file by traversing the current
    directory and its parents
    """
    if path == prevpath:
        return ''
    path = os.path.abspath(path)
    cfgfile = os.path.join(path, 'scrapy.cfg')
    if os.path.exists(cfgfile):
        return cfgfile
    return closest_scrapy_cfg(os.path.dirname(path), path)
def closest_scrapy_cfg ( path = '.' , prevpath = None ) : if path == prevpath : return '' path = os . path . abspath ( path ) cfgfile = os . path . join ( path , 'scrapy.cfg' ) if os . path . exists ( cfgfile ) : return cfgfile return closest_scrapy_cfg ( os . path . dirname ( path ) , path )