<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def info(environment, opts):
 """Display information about environment and running containers Usage: datacats info [-qr] [ENVIRONMENT] Options: -q --quiet Echo only the web URL or nothing if not running ENVIRONMENT may be an environment name or a path to an environment directory. Default: '.' """

    damaged = False
    sites = environment.sites
    if not environment.sites:
        sites = []
        damaged = True

    if opts['--quiet']:
        if damaged:
            raise DatacatsError('Damaged datadir: cannot get address.')
        for site in sites:
            environment.site_name = site
            print '{}: {}'.format(site, environment.web_address())
        return

    datadir = environment.datadir
    if not environment.data_exists():
        datadir = ''
    elif damaged:
        datadir += ' (damaged)'

    print 'Environment name: ' + environment.name
    print ' Environment dir: ' + environment.target
    print '        Data dir: ' + datadir
    print '           Sites: ' + ' '.join(environment.sites)

    for site in environment.sites:
        print
        environment.site_name = site
        print '            Site: ' + site
        print '      Containers: ' + ' '.join(environment.containers_running())

        sitedir = environment.sitedir + (' (damaged)' if not environment.data_complete() else '')
        print '        Site dir: ' + sitedir
        addr = environment.web_address()
        if addr:
            print '    Available at: ' + addr