Python 3 compatibility tests passing.

This commit is contained in:
Elf M. Sternberg 2016-09-29 16:02:55 -07:00
parent 917389b836
commit efd187e955
2 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,7 @@
# Copyright (C) 2015 Elf M. Sternberg
# Author: Elf M. Sternberg
from functools import reduce
import getopt
# This was a lot shorter and smarter in Hy...

View File

@ -55,16 +55,19 @@ condition = error
# to not have a '.git' directory somewhere lurking in a parent folder.
def shell(cmd, environment=environment):
return subprocess.check_call(cmd, shell=True, env=environment)
return subprocess.check_call(cmd, shell=True, env=environment,
universal_newlines=True)
def outshell(cmd, environment=environment):
return subprocess.check_output(cmd, shell=True, env=environment)
return subprocess.check_output(cmd, shell=True, env=environment,
universal_newlines=True)
def fullshell(cmd, environment=environment):
process = subprocess.Popen(cmd, shell=True, env=environment,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True)
(stdout, stderr) = process.communicate()
return (stdout, stderr, process.returncode)