def gemset_list(ruby='default', runas=None):
 gemsets = []
 output = _rvm_do(ruby, ['rvm', 'gemset', 'list'], runas=runas)
 if output:
  regex = re.compile('^   ([^ ]+)')
  for line in output.splitlines():
   match = regex.match(line)
   if match:
    gemsets.append(match.group(1))
 return gemsets

def gemset_list ( ruby = 'default' , runas = None ) : gemsets = [ ] output = _rvm_do ( ruby , [ 'rvm' , 'gemset' , 'list' ] , runas = runas ) if output : regex = re . compile ( '^   ([^ ]+)' ) for line in output . splitlines ( ) : match = regex . match ( line ) if match : gemsets . append ( match . group ( 1 ) ) return gemsets
list all gemsets for the given ruby .