@fiss_cmd<EOL>def space_list(args):
r = fapi.list_workspaces()<EOL>fapi._check_response_code(r, <NUM_LIT:200>)<EOL>spaces = []<EOL>project = args.project<EOL>if project:<EOL><INDENT>project = re.compile('<STR_LIT>' + project)<EOL><DEDENT>for space in r.json():<EOL><INDENT>ns = space['<STR_LIT>']['<STR_LIT>']<EOL>if project and not project.match(ns):<EOL><INDENT>continue<EOL><DEDENT>ws = space['<STR_LIT>']['<STR_LIT:name>']<EOL>spaces.append(ns + '<STR_LIT:\t>' + ws)<EOL><DEDENT>return sorted(spaces, key=lambda s: s.lower())<EOL>
List accessible workspaces, in TSV form: <namespace><TAB>workspace