示例#1
0
 def set_path(self, path):
     """ Set the 'path' component.
     """
     newurl = urlparse.urlunparse((self._urlobj.scheme,
                                  self._urlobj.netloc,
                                  path,
                                  self._urlobj.params,
                                  self._urlobj.query,
                                  self._urlobj.fragment))
     self._urlobj = urlparse.urlparse(newurl)
示例#2
0
 def set_query(self, query):
     """ Set the 'query' component.
     """
     newurl = urlparse.urlunparse((self._urlobj.scheme,
                                  self._urlobj.netloc,
                                  self._urlobj.path,
                                  self._urlobj.params,
                                  query,
                                  self._urlobj.fragment))
     self._urlobj = urlparse.urlparse(newurl)
示例#3
0
 def set_scheme(self, scheme):
     """ Set the 'scheme' component.
     """
     newurl = urlparse.urlunparse((scheme,
                                  self._urlobj.netloc,
                                  self._urlobj.path,
                                  self._urlobj.params,
                                  self._urlobj.query,
                                  self._urlobj.fragment))
     self._urlobj = urlparse.urlparse(newurl)
示例#4
0
 def set_fragment(self, fragment):
     """ Set the 'fragment' component.
     """
     newurl = urlparse.urlunparse((self._urlobj.scheme,
                                  self._urlobj.netloc,
                                  self._urlobj.path,
                                  self._urlobj.params,
                                  self._urlobj.query,
                                  fragment))
     self._urlobj = urlparse.urlparse(newurl)
示例#5
0
    def set_password(self, password):
        """ Set the 'password' component.
        """
        netloc = self._make_netloc(self._urlobj.username, password,
                                   self._urlobj.hostname, self._urlobj.port)

        newurl = urlparse.urlunparse((self._urlobj.scheme,
                                     netloc,
                                     self._urlobj.path,
                                     self._urlobj.params,
                                     self._urlobj.query,
                                     self._urlobj.fragment))
        self._urlobj = urlparse.urlparse(newurl)
示例#6
0
文件: url.py 项目: agrill/saga-python
    def set_query(self, query):
        """ 
        set_query(query)

        Set the URL 'query' component.

        :param query: The new query
        :type query:  str
        """
        newurl = urlparse.urlunparse((self._urlobj.scheme,
                                     self._urlobj.netloc,
                                     self._urlobj.path,
                                     self._urlobj.params,
                                     query,
                                     self._urlobj.fragment))
        self._urlobj = urlparse.urlparse(newurl)
示例#7
0
文件: url.py 项目: agrill/saga-python
    def set_fragment(self, fragment):
        """ 
        set_fragment(fragment)

        Set the URL 'fragment' component.

        :param fragment: The new fragment
        :type fragment:  str
        """
        newurl = urlparse.urlunparse((self._urlobj.scheme,
                                     self._urlobj.netloc,
                                     self._urlobj.path,
                                     self._urlobj.params,
                                     self._urlobj.query,
                                     fragment))
        self._urlobj = urlparse.urlparse(newurl)
示例#8
0
文件: url.py 项目: agrill/saga-python
    def set_path(self, path):
        """ 
        set_path(path)

        Set the URL 'path' component.

        :param path: The new path
        :type path:  str
        """
        newurl = urlparse.urlunparse((self._urlobj.scheme,
                                     self._urlobj.netloc,
                                     path,
                                     self._urlobj.params,
                                     self._urlobj.query,
                                     self._urlobj.fragment))
        self._urlobj = urlparse.urlparse(newurl)
示例#9
0
文件: url.py 项目: agrill/saga-python
    def set_scheme(self, scheme):
        """ 
        set_scheme(scheme)

        Set the URL 'scheme' component.

        :param scheme: The new scheme
        :type host:  str

        """
        newurl = urlparse.urlunparse((scheme,
                                     self._urlobj.netloc,
                                     self._urlobj.path,
                                     self._urlobj.params,
                                     self._urlobj.query,
                                     self._urlobj.fragment))
        self._urlobj = urlparse.urlparse(newurl)
示例#10
0
文件: url.py 项目: agrill/saga-python
    def set_password(self, password):
        """ 
        set_password(password)

        Set the URL 'password' component.

        :param password: The new password
        :type password:  str
        """
        netloc = self._make_netloc(self._urlobj.username, password,
                                   self._urlobj.hostname, self._urlobj.port)

        newurl = urlparse.urlunparse((self._urlobj.scheme,
                                     netloc,
                                     self._urlobj.path,
                                     self._urlobj.params,
                                     self._urlobj.query,
                                     self._urlobj.fragment))
        self._urlobj = urlparse.urlparse(newurl)
示例#11
0
文件: url.py 项目: agrill/saga-python
    def set_username(self, username):
        """ 
        set_username(username)

        Set the URL 'username' component.

        :param username: The new username
        :type host:  str
        """
        netloc = self._make_netloc(username, self._urlobj.password,
                                   self._urlobj.hostname, self._urlobj.port)

        newurl = urlparse.urlunparse((self._urlobj.scheme,
                                     netloc,
                                     self._urlobj.path,
                                     self._urlobj.params,
                                     self._urlobj.query,
                                     self._urlobj.fragment))
        self._urlobj = urlparse.urlparse(newurl)
示例#12
0
文件: url.py 项目: agrill/saga-python
    def set_host(self, host):
        """ 
        set_host(host)

        Set the 'host' component.

        :param host: The new hostname
        :type host:  str
        """
        netloc = self._make_netloc(self._urlobj.username,
                                   self._urlobj.password,
                                   host, self._urlobj.port)

        newurl = urlparse.urlunparse((self._urlobj.scheme,
                                     netloc,
                                     self._urlobj.path,
                                     self._urlobj.params,
                                     self._urlobj.query,
                                     self._urlobj.fragment))
        self._urlobj = urlparse.urlparse(newurl)
示例#13
0
文件: url.py 项目: agrill/saga-python
    def set_port(self, port):
        """ 
        set_port(port)

        Set the URL 'port' component.


        :param port: The new port
        :type port:  int
        """
        netloc = self._make_netloc(self._urlobj.username,
                                   self._urlobj.password,
                                   self._urlobj.hostname, int(port))

        newurl = urlparse.urlunparse((self._urlobj.scheme,
                                     netloc,
                                     self._urlobj.path,
                                     self._urlobj.params,
                                     self._urlobj.query,
                                     self._urlobj.fragment))
        self._urlobj = urlparse.urlparse(newurl)