Script.setUsageMessage( '\n'.join( [ __doc__.split( '\n' )[1], 'Usage:', ' %s [[section.]option]' % Script.scriptName, 'Arguments:', ' section: display all options in section', '++ OR ++', ' section.option: display section specific option',] ) ) Script.parseCommandLine( ignoreErrors = True ) args = Script.getPositionalArgs() session = DSession( ) if not args: retVal = session.listEnv( ) if not retVal[ "OK" ]: print "Error:", retVal[ "Message" ] DIRAC.exit( -1 ) for o, v in retVal[ "Value" ]: print o + "=" + v DIRAC.exit( 0 ) arg = args[ 0 ] section = None option = None if "." in arg: section, option = arg.split( "." ) else: