code: def command_status(prog_name, prof_mgr, prof_name, prog_args):
  
  	
  	
  	# Retrieve arguments
  	parser = argparse.ArgumentParser(
  		prog=prog_name
  	)
  	parser.add_argument(
  		"-t",
  		"--type",
  		required=False,
  		action="store_true",
  		default=False,
  		dest="show_type",
  		help="show component qualified class name"
  	)
  	parser.add_argument(
  		"-d",
  		"--depth",
  		metavar="tree_depth",
  		required=False,
  		type=argparse_status_depth,
  		default=None,
  		dest="tree_depth",
  		help="integer value of dependency tree depth"
  	)
  	parser.add_argument(
  		"components",
  		metavar="comps",
  		nargs=argparse.REMAINDER,
  		help="system components"
  	)
  	args = parser.parse_args(prog_args)
  	
  	# Profile load
  	prof_stub = prof_mgr.load(prof_name)
  	
  	# Collect component stubs
  	comp_stubs = []
  	if len(args.components) == 0:
  		raise Exception("Empty component list")
  	for comp_name in args.components:
  		comp_stub = prof_stub.component(comp_name)
  		component_exists(prof_stub, comp_stub)
  		comp_stubs.append(comp_stub)
  		
  	# Print status
  	show_type = args.show_type
  	tree_depth = args.tree_depth
  	context = prof_stub.context()
  	out = io.StringIO()
  	for i, comp_stub in enumerate(comp_stubs):
  		last = i == len(comp_stubs) - 1
  		print_component_status(out, context, comp_stub, last, 1, [], show_type,
  				tree_depth)
  	out.seek(0)
  	sys.stdout.write(out.read())
docs: Show status of component tree.