This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# forces python-pptx to display images at native size, based on DPI attribute | |
# in image file, from Chad ... | |
# | |
import Image | |
import Presentation | |
from pptx.util import Inches | |
left = Inches(0.83) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
""" | |
Helper objects for rendering to .docx format. | |
""" | |
from __future__ import ( | |
absolute_import, division, print_function, unicode_literals | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
from typing import Any, cast, Callable, Generic, TypeVar | |
T = TypeVar("T") | |
class lazyproperty(Generic[T]): | |
"""Decorator like @property, but evaluated only on first access. | |
Like @property, this can only be used to decorate methods having only a `self` |