Resize the tty session used by the specified exec command.

        Args:
            exec_id (str): ID of the exec instance
            height (int): Height of tty session
            width (int): Width of tty session
963917
def exec_resize(self, exec_id, height=None, width=None):
        

        if isinstance(exec_id, dict):
            exec_id = exec_id.get('Id')

        params = {'h': height, 'w': width}
        url = self._url("/exec/{0}/resize", exec_id)
        res = self._post(url, params=params)
        self._raise_for_status(res)
369071
def resize(self, width, height):
        
        # this shouldn't be needed
        self.configure_window(width, height)

        self.pgcanvas.resize(width, height)

        # hack to force a browser reload
        app = self.pgcanvas.get_app()
        app.do_operation('reload_page', id=self.pgcanvas.id)
33429
def onresize(self, emitter, width, height):
        
        self._log.debug('App.onresize event occurred. Width:%s Height:%s'%(width, height))
449573
def resize_to(width, height)
      Selenium::WebDriver::Dimension.new(Integer(width), Integer(height)).tap do |dimension|
        use { @driver.manage.window.size = dimension }
      end
    end
394996
def set_exec_area(self, exec_area):
        

        yield from self._hypervisor.send('vm set_exec_area "{name}" {exec_area}'.format(name=self._name,
                                                                                        exec_area=exec_area))

        log.info('Router "{name}" [{id}]: exec area updated from {old_exec}MB to {new_exec}MB'.format(name=self._name,
                                                                                                      id=self._id,
                                                                                                      old_exec=self._exec_area,
                                                                                                      new_exec=exec_area))
        self._exec_area = exec_area
556230
def resize_file(fobj, diff, BUFFER_SIZE=2 ** 16):
    

    fobj.seek(0, 2)
    filesize = fobj.tell()

    if diff < 0:
        if filesize + diff < 0:
            raise ValueError
        # truncate flushes internally
        fobj.truncate(filesize + diff)
    elif diff > 0:
        try:
            while diff:
                addsize = min(BUFFER_SIZE, diff)
                fobj.write(b"\x00" * addsize)
                diff -= addsize
            fobj.flush()
        except IOError as e:
            if e.errno == errno.ENOSPC:
                # To reduce the chance of corrupt files in case of missing
                # space try to revert the file expansion back. Of course
                # in reality every in-file-write can also fail due to COW etc.
                # Note: IOError gets also raised in flush() due to buffering
                fobj.truncate(filesize)
            raise
786170
public OvhInstanceDetail project_serviceName_instance_instanceId_resize_POST(String serviceName, String instanceId, String flavorId) throws IOException {
		String qPath = "/cloud/project/{serviceName}/instance/{instanceId}/resize";
		StringBuilder sb = path(qPath, serviceName, instanceId);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "flavorId", flavorId);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, OvhInstanceDetail.class);
	}
693440
def resize(self, width, height):
        
        # set the internal listbox width to be 0 as otherwise it maintains a default
        # size and you cant make the control smaller than that.
        self._listbox._set_tk_config("width", None if width is None else 0)
        self._set_propagation(width, height)
        super(ListBox, self).resize(width, height)
858163
def _exec_cmd(command):
    """"""
    proc = sp.Popen(command,
                    stdout=sp.PIPE,
                    shell=True)
    if six.PY2:
        res = proc.communicate()[0]
    else:
        res = proc.communicate(timeout=5)[0]
    return res, proc.returncode
590467
def resize(self, newWidth = 0, newHeight = 0):
        
        self.height = newHeight
        self.width = newWidth
61897
def exec_(argv):  # never returns
    
    # info('EXEC' + colorize(argv))  # TODO: debug logging by environment variable

    # in python3, sys.exitfunc has gone away, and atexit._run_exitfuncs seems to be the only pubic-ish interface
    #   https://hg.python.org/cpython/file/3.4/Modules/atexitmodule.c#l289
    import atexit
    atexit._run_exitfuncs()

    from os import execv
    execv(argv[0], argv)
1325952
def exec_python_rc(*args, **kwargs):
    
    cmdargs, kwargs = __wrap_python(args, kwargs)
    return exec_command_rc(*cmdargs, **kwargs)
762461
def _exec_cmd(self, command, **kwargs):
        

        kwargs['command'] = command
        self._check_exclusive_parameters(**kwargs)
        requests_params = self._handle_requests_params(kwargs)
        session = self._meta_data['bigip']._meta_data['icr_session']
        response = session.post(
            self._meta_data['uri'], json=kwargs, **requests_params)
        new_instance = self._stamp_out_core()
        new_instance._local_update(response.json())
        if 'commandResult' in new_instance.__dict__:
            new_instance._check_command_result()

        return new_instance
1033708
def _low_level_exec_command(self, conn, cmd, tmp, sudoable=False, executable=None):
        '''  '''

        if executable is None:
            executable = '/bin/sh'

        sudo_user = self.sudo_user
        rc, stdin, stdout, stderr = conn.exec_command(cmd, tmp, sudo_user, sudoable=sudoable, executable=executable)

        if type(stdout) not in [ str, unicode ]:
            out = ''.join(stdout.readlines())
        else:
            out = stdout

        if type(stderr) not in [ str, unicode ]:
            err = ''.join(stderr.readlines())
        else:
            err = stderr

        if rc != None:
            return dict(rc=rc, stdout=out, stderr=err )
        else:
            return dict(stdout=out, stderr=err )
242937
def resize(self, capacity):
        
        count = max(int(capacity), 0) - len(self)

        if count == 0:
            pass
        elif -count == len(self):
            self.clear()
        elif count > 0:
            for i in range(count):
                self.append()
        else:
            for i in range(abs(count)):
                self.pop()
399128
def with_partition_id(self, partition_id):
        
        self.partition_id = partition_id
        self.owner = None
        self.token = None
        self.epoch = 0
        self.event_processor_context = None
1274823
def resize(self, size):
        
        self.instance.resize_volume(size)
        self.size = size