def tarbell_spreadsheet(command, args):
    """
    Open context spreadsheet
    """
    with ensure_settings(command, args) as settings, ensure_project(command, args) as site:
        try:
            # First, try to get the Google Spreadsheet URL
            spreadsheet_url = _google_spreadsheet_url(site.project.SPREADSHEET_KEY)
        except AttributeError:
            # The project doesn't seem to be using a Google Spreadsheet.
            # Try the URL or path specified in the CONTEXT_SOURCE_FILE setting
            try:
                spreadsheet_url = _context_source_file_url(
                    site.project.CONTEXT_SOURCE_FILE)
                print(spreadsheet_url)
            except AttributeError:
                puts(colored.red("No Google spreadsheet or context source file "
                                 "has been configured.\n"))
                return

        # Use the webbrowser package to try to open the file whether it's a
        # remote URL on the web, or a local file.  On some platforms it will
        # successfully open local files in the default application.
        # This seems preferable to trying to do os detection and calling
        # the system-specific command for opening files in default
        # applications.
        # See
        # http://stackoverflow.com/questions/434597/open-document-with-default-application-in-python
        webbrowser.open(spreadsheet_url)
Open context spreadsheet