def create_view(self, str_view_name, people=None):
        """
        Create a view, viewExistsCheck
        :param str_view_name: name of new view, str
        :return: new view obj
        """
        url = urlparse.urljoin(self.baseurl, "user/%s/my-views/" % people) if people else self.baseurl
        qs = urllib.urlencode({'value': str_view_name})
        viewExistsCheck_url = urlparse.urljoin(url, "viewExistsCheck?%s" % qs)
        fn_urlopen = self.get_jenkins_obj().get_opener()
        try:
            r = fn_urlopen(viewExistsCheck_url).read()
        except urllib2.HTTPError, e:
            log.debug("Error reading %s" % viewExistsCheck_url)
            log.exception(e)
            raise
        """<div/>"""
        if len(r) > 7: 
            return 'A view already exists with the name "%s"' % (str_view_name)
        else:
            data = {"mode":"hudson.model.ListView", "Submit": "OK"}
            data['name']=str_view_name
            data['json'] = data.copy()
            params = urllib.urlencode(data)
            try:
                createView_url = urlparse.urljoin(url, "createView")
                result = self.post_data(createView_url, params)
            except urllib2.HTTPError, e:
                log.debug("Error post_data %s" % createView_url)
                log.exception(e)
            return urlparse.urljoin(url, "view/%s/" % str_view_name)
dataset/ETHPy150Open ramonvanalteren/jenkinsapi/jenkinsapi/jenkins.py/Jenkins.create_view/original