コード例 #1
0
				E.g.
				/MuHad/Run2011A-05Aug2011-v1/AOD/V2 cmgtools 'comment'
				Single or double speech marks are accepted""",
				default = False)
	parser.add_option_group(genGroup)
	parser.add_option_group(group)
	
	(options, args) = parser.parse_args()
	
	# Allow no more than one argument
	if len(args)!=1:
		parser.print_help()
		sys.exit(1)
	
	if options.password is None:
		options.password = PublishTask.getPassword(options.username)
	if options.password is None:
		print "Authentication Failed, exiting\n\n"
		sys.exit(1)
		
	
	# For multiple file input
	if options.multi:
		file = open(args[0], 'r')
		lines = file.readlines()
		for line in lines:
			sampleName, fileowner, comment = separateOutput(line)
			if fileowner is not None:
				options.fileown = fileowner
			if comment is not None:
				options.commented = comment
コード例 #2
0
				E.g.
				/MuHad/Run2011A-05Aug2011-v1/AOD/V2 cmgtools 'comment'
				Single or double speech marks are accepted""",
                     default=False)
    parser.add_option_group(genGroup)
    parser.add_option_group(group)

    (options, args) = parser.parse_args()

    # Allow no more than one argument
    if len(args) != 1:
        parser.print_help()
        sys.exit(1)

    if options.password is None:
        options.password = PublishTask.getPassword(options.username)
    if options.password is None:
        print "Authentication Failed, exiting\n\n"
        sys.exit(1)

    # For multiple file input
    if options.multi:
        file = open(args[0], 'r')
        lines = file.readlines()
        for line in lines:
            sampleName, fileowner, comment = separateOutput(line)
            if fileowner is not None:
                options.fileown = fileowner
            if comment is not None:
                options.commented = comment
            pub = PublishTask(sampleName, options.fileown,