add_to_path(query) -- add user given path to environment PATH variable.
332725
def add_to_path(query):
	
	new_entry = support.get_path(query)
	if(new_entry):
		print 'Adding '+new_entry+' to PATH variable.'
		print '''1 : confirm
		2 : cancel
		'''
		choice = int(raw_input('>> '))
		if(choice == 1):
			home_dir = os.path.expanduser('~')
			bashrc = open(os.path.join(home_dir, ".bashrc"), "a")
			bashrc.write('\n\nexport PATH=\"'+new_entry+':$PATH\"\n')
			bashrc.close()
			os.system('source '+os.path.join(os.path.expanduser('~'),'.bashrc'))
			print 'Success!!'
			print os.system('echo $PATH')
	else:
		print 'We were unable to extract the \'path\' from your query.'
206954
def add_path(self, path, path_filter=None):
        
        for root, _, files in os.walk(path):
            for filename in files:
                full_path_and_filename = os.path.join(root, filename)
                if path_filter is None or path_filter(full_path_and_filename):
                    relative_path_and_filename = full_path_and_filename.replace(path + '/', '')
                    with open(full_path_and_filename, 'rb') as handle:
                        self.files[relative_path_and_filename] = b64encode(handle.read()).decode('utf-8')
165779
def patch_env(env, path, value):
        
        def pathGet(dictionary, path):
            for item in path.split("/"):
                dictionary = dictionary[item]
            return dictionary

        def pathSet(dictionary, path, value):
            path = path.split("/")
            key = path[-1]
            dictionary = pathGet(dictionary, "/".join(path[:-1]))
            dictionary[key] = value

        pathSet(env, path, value)
        return True
1004957
def _append_path(new_path):  # type: (str) -> None
    
    for path in sys.path:
        path = os.path.abspath(path)
        if new_path == path:
            return
    sys.path.append(new_path)
496381
def create_path(path):
    
    import os
    if not os.path.exists(path):
        os.makedirs(path)
783377
def add_env_var(self, key, value):
        
        self.manifest['env'][key] = value
        os.environ[key] = str(value)
12078
def insert_paths(self):
        
        if self.args.path:
            sys.path.insert(0, self.args.path)

        if hasattr(self.config.application, config.PATHS):
            if hasattr(self.config.application.paths, config.BASE):
                sys.path.insert(0, self.config.application.paths.base)
1134690
def expand_path(path):
  
  return os.path.abspath(os.path.expandvars(os.path.expanduser(path)))
1097310
def append_rez_path(self):
        """"""
        if system.rez_bin_path:
            self.env.PATH.append(system.rez_bin_path)
775302
function addToPath(directory) {
  var srcs = process.env.PATH.split(delimiter);
  if (srcs.indexOf(directory) === -1) {
    srcs.unshift(directory);
    process.env.PATH = srcs.join(delimiter);
    debug('added `%s` to $PATH and its now `%s`',
      directory, process.env.PATH);
  }
}
949384
def add_to_pythonpath(self, path):
        """"""
        pathlist = self.get_pythonpath()
        if path in pathlist:
            return False
        else:
            pathlist.insert(0, path)
            self.set_pythonpath(pathlist)
            return True
515834
def location_path(self, path):
        
        path = path.strip("/")
        tmp = path.split("?")
        path = tmp[0]
        paths = path.split("/")
        for p in paths:
            option = Option()
            option.number = defines.OptionRegistry.LOCATION_PATH.number
            option.value = p
            self.add_option(option)
58403
def add_path(self, path, path_item):
        
        if path not in self._swagger:
            self._swagger[path] = path_item
        else:
            for method, definition in path_item.items():
                if definition is not None:
                    setattr(self._swagger[path], method, definition)
838230
def addPathVariables(self, pathvars):
        
        if type(pathvars) is dict:
            self._pathvars = merge(self._pathvars, pathvars)
890280
def add(self, path):
        
        if not isinstance(path, str) and not isinstance(path, unicode):
            raise TypeError('The value passed for parameter path is not a str'
                            ' or unicode')

        resource = Resource(path)
        self.resources[path] = resource
        return resource
541083
def modify_path():
    """"""
    # Only modify path on Windows.
    if os.name != "nt":
        return

    path = os.environ.get("PATH")
    if path is None:
        return

    try:
        extra_dll_dir = pkg_resources.resource_filename("bezier", "extra-dll")
        if os.path.isdir(extra_dll_dir):
            os.environ["PATH"] = path + os.pathsep + extra_dll_dir
    except ImportError:
        pass
1004003
def add_path_to_jinja(flask_app, path):
    
    template_dir = path
    my_loader = jinja2.ChoiceLoader([
        flask_app.jinja_loader,
        jinja2.FileSystemLoader(template_dir)
    ])
    flask_app.jinja_loader = my_loader