'Export a local parameter as a global'

def do_export(self, input):

    plugin = self.get_active_plugin()
    inputList = input.strip().split()
    if (not inputList):
        args = {'title': plugin.getName(), 'vars': plugin.getParameters()}
        self.io.print_set_names(args)
    elif (len(inputList) == 1):
        param = plugin.getParameter(inputList[0])
        try:
            attribList = param.getAttributeList()
            self.io.print_set_attributes(plugin.getName(), inputList[0], attribList)
            if plugin.isParamchoice(inputList[0]):
                attribVal = param.getAttributeValueList()
                self.io.print_set_choices(attribVal)
        except AttributeError:
            raise exception.CmdErr, 'export    [param]    [globalname]'
    elif (len(input) >= 2):
        value = plugin.get(inputList[0])
        self.fb.do_setg(('%s    %s' % (inputList[1], value)))
