def create(self, url, pathToWebarchive):
        """
        *create the webarchive object*

        **Key Arguments:**
            - ``url`` -- the url of the webpage to generate the webarchive for
            - ``pathToWebarchive`` -- tthe path to output the the webarchive file to 

        **Return:**
            - ``webarchive`` -- the path to the webarchive (or -1 if the generation fails)

        **Usage:**

            See class docstring for usage
        """
        self.log.debug('starting the ``create`` method')

        from subprocess import Popen, PIPE, STDOUT
        webarchiver = self.settings["executables"]["webarchiver"]
        cmd = """%(webarchiver)s -url %(url)s -output "%(pathToWebarchive)s"  """ % locals()
        p = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=True)
        stdout, stderr = p.communicate()
        self.log.debug('output: %(stdout)s' % locals())

        if len(stderr) == 0:
            webarchive = pathToWebarchive
        else:
            self.log.error(
                "Could not generate the webarchive for this webpage: %(url)s. %(stderr)s " % locals())
            return -1

        self.log.debug('completed the ``create`` method')
        return webarchive
def create ( self , url , pathToWebarchive ) : self . log . debug ( 'starting the ``create`` method' ) from subprocess import Popen , PIPE , STDOUT webarchiver = self . settings [ "executables" ] [ "webarchiver" ] cmd = """%(webarchiver)s -url %(url)s -output "%(pathToWebarchive)s"  """ % locals ( ) p = Popen ( cmd , stdout = PIPE , stderr = PIPE , shell = True ) stdout , stderr = p . communicate ( ) self . log . debug ( 'output: %(stdout)s' % locals ( ) ) if len ( stderr ) == 0 : webarchive = pathToWebarchive else : self . log . error ( "Could not generate the webarchive for this webpage: %(url)s. %(stderr)s " % locals ( ) ) return - 1 self . log . debug ( 'completed the ``create`` method' ) return webarchive
*create the webarchive object*

        **Key Arguments:**
            - ``url`` -- the url of the webpage to generate the webarchive for
            - ``pathToWebarchive`` -- tthe path to output the the webarchive file to 

        **Return:**
            - ``webarchive`` -- the path to the webarchive (or -1 if the generation fails)

        **Usage:**

            See class docstring for usage