Exemplo n.º 1
0
			print se
			return
		print "Unable to generate graph"
		return

	print "Graph saved to: %s\nYou can use eog %s to open it." % (out_img, out_img)
	# eog test.png
	shutil.rmtree(tmp_dir)

if __name__ == "__main__":
	# TODO(jchaloup): add option to show missing packages/deps

	cur_dir = getScriptDir(__file__)
	gen_flags = "%s/%s.yml" % (cur_dir, os.path.basename(__file__).split(".")[0])

	parser = CmdSignatureParser([gen_flags]).generate().parse()
	if not parser.check():
		exit(1)

	options = parser.options()
	args = parser.args()

	# get list of tools/packages providing go binary
	pkg_name = ""
	if len(args) > 0:
		pkg_name = args[0]

	Logger.set(options.verbose)

	fp = FormatedPrint()
Exemplo n.º 2
0
logging.basicConfig(level=logging.INFO)

from cmdsignature.parser import CmdSignatureParser
from gofedlib.utils import getScriptDir

if __name__ == "__main__":

	cur_dir = getScriptDir(__file__)
	gen_flags = "%s/tools-global.yml" % (cur_dir)

	program_name = os.path.basename(sys.argv[0])
	provider = ""
	subcmd_flags = []

	if program_name == "tools.py":
		parser = CmdSignatureParser([gen_flags, "%s/tools.yml" % (cur_dir)])
	elif program_name == "bbobranches":
		parser = CmdSignatureParser([gen_flags, "%s/bbo.yml" % (cur_dir)])
	elif program_name == "update":
		parser = CmdSignatureParser([gen_flags, "%s/update.yml" % (cur_dir)])
	else:
		parser = CmdSignatureParser([gen_flags])

	parser.generate().parse()
	if not parser.check():
		exit(1)

	options = parser.options()
        args = parser.args()

	fp_obj = FormatedPrint(formated=False)