code: def space_list(args):
      ''' List accessible workspaces, in TSV form: <namespace><TAB>workspace'''
  
      r = fapi.list_workspaces()
      fapi._check_response_code(r, 200)
  
      spaces = []
      project = args.project
      if project:
          project = re.compile('^' + project)
  
      for space in r.json():
          ns = space['workspace']['namespace']
          if project and not project.match(ns):
              continue
          ws = space['workspace']['name']
          spaces.append(ns + '\t' + ws)
  
      # Sort for easier downstream viewing, ignoring case
      return sorted(spaces, key=lambda s: s.lower()f space_list(args):
      ''' List accessible workspaces, in TSV form: <namespace><TAB>workspace'''
  
      r = fapi.list_workspaces()
      fapi._check_response_code(r, 200)
  
      spaces = []
      project = args.project
      if project:
          project = re.compile('^' + project)
  
      for space in r.json():
          ns = space['workspace']['namespace']
          if project and not project.match(ns):
              continue
          ws = space['workspace']['name']
          spaces.append(ns + '\t' + ws)
  
      # Sort for easier downstream viewing, ignoring case
      return sorted(spaces, key=lambda s: s.lower())
docs: List accessible workspaces, in TSV form: <namespace><TAB>workspace