Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

py3

  • Loading branch information...
commit eb420e55f6b3469e725feb8102a47daaf421d034 1 parent 2fe7608
@Rydgel authored
View
3  app.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+from __future__ import absolute_import, unicode_literals
import os
import sys
import logging
@@ -92,7 +93,7 @@ def favicon():
@app.route('/<file_name>.txt')
def send_text_file(file_name):
"""Send your static text file."""
- file_dot_text = u'{0}.txt'.format(file_name)
+ file_dot_text = '{0}.txt'.format(file_name)
return app.send_static_file(file_dot_text)
View
1  helpers/converters.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+from __future__ import absolute_import, unicode_literals
from werkzeug.routing import BaseConverter, IntegerConverter
View
1  helpers/decorators.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+from __future__ import absolute_import, unicode_literals
import os
from functools import wraps
try:
View
3  helpers/pil.py
@@ -1,5 +1,6 @@
# -*- coding: utf-8 -*-
+from __future__ import absolute_import, unicode_literals, division
import os
import StringIO
from PIL import Image, ImageDraw, ImageFont
@@ -42,7 +43,7 @@ def _calculate_font_size(width, height):
def _choose_font(font_size, font=None):
"""Choosing a font, the fallback is Yanone"""
dirname = os.path.dirname
- font_path = u'{0}/font/{1}.otf'.format(dirname(dirname(__file__)), font)
+ font_path = '{0}/font/{1}.otf'.format(dirname(dirname(__file__)), font)
try:
return ImageFont.truetype(font_path, font_size)
except IOError:
View
1  tests.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+from __future__ import absolute_import, unicode_literals
import unittest
from app import app
from PIL import Image
Please sign in to comment.
Something went wrong with that request. Please try again.