From bfa055bc6605c50c844a37aed78d8b0cefa2882a Mon Sep 17 00:00:00 2001 From: janmax <j.michal@stud.uni-goettingen.de> Date: Wed, 7 Feb 2018 19:18:07 +0100 Subject: [PATCH] Fixed an error where it could not print to stdout --- .gitignore | 5 ++++- hektor.py | 4 ++-- setup.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 10c4073..db13625 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,8 @@ *.zip *.swp __pycache__/ - *.egg-info/ +build/ +dist/ +deploy.sh + diff --git a/hektor.py b/hektor.py index 209b1f2..058f9fe 100644 --- a/hektor.py +++ b/hektor.py @@ -133,8 +133,7 @@ def eat_zipfile(input_file, output): structured_data = give_me_structure(data) - with open(output, 'w') as out: - json.dump(structured_data, out, indent=2, sort_keys=True) + json.dump(structured_data, output, indent=2, sort_keys=True) def parseme(): @@ -147,6 +146,7 @@ def parseme(): '-o', '--output', default=sys.stdout, + type=argparse.FileType('w'), metavar='FILE', help='Where you want to put the output') return parser.parse_args() diff --git a/setup.py b/setup.py index 60009f2..d58f01f 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup setup( name='hektor', - version='0.1', + version='0.1.1', description='A QTI-XML to JSON converter for humans', author='Jan Maximilian Michal', author_email='mail@janmax.org', -- GitLab