1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Compat with Python 3.3+

This commit is contained in:
Eevee (Alex Munroe) 2015-10-05 08:11:08 -07:00
parent d0e8f503b8
commit b76b74e7a6
15 changed files with 110 additions and 96 deletions
pokedex/db

View file

@ -1,4 +1,6 @@
"""CSV to database or vice versa."""
from __future__ import print_function
import csv
import fnmatch
import os.path
@ -58,7 +60,7 @@ def _get_verbose_prints(verbose):
# Also, space-pad to keep the cursor in a known column
num_spaces = 66 - len(truncated_thing)
print "%s...%s" % (truncated_thing, ' ' * num_spaces),
print("%s...%s" % (truncated_thing, ' ' * num_spaces), end='')
sys.stdout.flush()
if sys.stdout.isatty():
@ -91,7 +93,7 @@ def _get_verbose_prints(verbose):
pass
def print_done(msg='ok'):
print msg
print(msg)
return print_start, print_status, print_done