fix for py3.x

This commit is contained in:
aph
2013-11-19 19:47:58 +00:00
parent 5e7a191957
commit 3077b0f53e
5 changed files with 9 additions and 6 deletions
+1
View File
@@ -17,6 +17,7 @@ import sys
PY3 = sys.version_info[0] >= 3 PY3 = sys.version_info[0] >= 3
from ..packages import colorama from ..packages import colorama
from ..utils import basestring
__all__ = ( __all__ = (
'red', 'green', 'yellow', 'blue', 'red', 'green', 'yellow', 'blue',
+2 -2
View File
@@ -8,7 +8,7 @@ Module for simple interactive prompts handling
""" """
from __future__ import absolute_import from __future__ import absolute_import, print_function
from re import match, I from re import match, I
@@ -30,7 +30,7 @@ def yn(prompt, default='y', batch=False):
if not batch: if not batch:
input = raw_input(prompt).strip() input = raw_input(prompt).strip()
else: else:
print prompt print(prompt)
input = '' input = ''
# If input is empty default choice is assumed # If input is empty default choice is assumed
+1 -1
View File
@@ -17,7 +17,7 @@ from os import makedirs
from glob import glob from glob import glob
try: try:
basestring basestring = basestring
except NameError: except NameError:
basestring = str basestring = str
+4 -2
View File
@@ -1,6 +1,8 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import print_function
import sys import sys
import os import os
@@ -15,6 +17,6 @@ with indent(4, quote='>>>'):
puts(colored.red('Files detected: ') + str(args.files)) puts(colored.red('Files detected: ') + str(args.files))
puts(colored.red('NOT Files detected: ') + str(args.not_files)) puts(colored.red('NOT Files detected: ') + str(args.not_files))
puts(colored.red('Grouped Arguments: ') + str(dict(args.grouped))) puts(colored.red('Grouped Arguments: ') + str(dict(args.grouped)))
print print()
+1 -1
View File
@@ -1,5 +1,5 @@
[tox] [tox]
envlist = py26,py27,py3 envlist = py26,py27,py32,py33
[testenv] [testenv]
commands=py.test --junitxml=junit-{envname}.xml commands=py.test --junitxml=junit-{envname}.xml