Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(2) | Call(0) | Derive(0) | Import(2)
str(object='') -> string Return a nice string representation of the object. If the argument is a string, the return value is the same object.
src/p/y/py2docx-0.1.1/py2docx/docx.py py2docx(Download)
from py2docx.elements.image import Image from py2docx.elements.table import Table from py2docx.document import RelationshipFile, AppFile, CoreFile, \ DocumentFile, ContentTypeFile, DOCUMENT_PATH, \ DocumentRelationshipFile, DocxDocument, SettingsFile, \
def _create_document(self, path): zip_name = zipfile.ZipFile("{0}".format(path), 'w') for dirpath, dirs, files in os.walk("{0}".format(DOCUMENT_PATH)): for f in files: if f != '__init__.py': file_name = os.path.join(dirpath, f) file_name_zip = file_name.replace('{0}' .format(DOCUMENT_PATH),
src/p/y/py2docx-0.1.1/py2docx/elements/image.py py2docx(Download)
# coding: utf-8 import os from os.path import basename from PIL import Image as PILImage from py2docx.document import DOCUMENT_PATH
def _upload_image(self): dir_media = "{0}/word/media".format(DOCUMENT_PATH) if not os.path.exists(dir_media): os.makedirs(dir_media) img_uploaded = open("{0}/{1}".format(dir_media, self.image_name), 'w')