guetzli-recursively-gui/.eggs/py2app-0.12-py3.6.egg/py2app/decorators.py

15 lines
354 B
Python
Raw Normal View History

2017-04-20 00:57:59 +02:00
def converts(suffix):
"""
Use the following convention when writing a file converter::
from py2app.decorators import converts
@converts(suffix=".png")
def convert_png(source_file, destination_file):
pass
"""
def wrapper(func):
func.py2app_suffix=suffix
return func
return wrapper