Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

            @staticmethod
    def _clean_all():
        if os.path.exists(DOCUMENT_PATH):
            shutil.rmtree(DOCUMENT_PATH)
        os.makedirs(DOCUMENT_PATH)
        obj_file = open("{0}/__init__.py".format(DOCUMENT_PATH), 'w')
        obj_file.close()
        


src/p/y/py2docx-0.1.1/py2docx/docx.py   py2docx(Download)
    def __init__(self):
        DocxDocument._clean_all()
        self.content = ''
        self.relationship_file = RelationshipFile()
        self.document_relationship_file = DocumentRelationshipFile()
    def save(self, path):
        self.document_file._set_content(self.content)
        self._create_structure()
        self._create_document(path)
        DocxDocument._clean_all()