Skip to content

Instantly share code, notes, and snippets.

@kumamotone
Created April 12, 2020 15:35
Show Gist options
  • Save kumamotone/ee2dc368f5bb1cfe846bd509f0a92689 to your computer and use it in GitHub Desktop.
Save kumamotone/ee2dc368f5bb1cfe846bd509f0a92689 to your computer and use it in GitHub Desktop.
OnlineJudgeHelperで毎回ファイルをダウンロードし直す
diff --git a/onlinejudge.py b/onlinejudge.py
index 16f3f48..80100ae 100644
--- a/onlinejudge.py
+++ b/onlinejudge.py
@@ -149,6 +149,9 @@ class OnlineJudge:
print('CompileError')
exit(-1)
+ for input_file_path in glob.iglob(os.path.join(self.options.testcase_directory, '*.in.txt')):
+ os.remove(input_file_path)
+
if not os.path.exists(self.get_input_file_path(0)) or not os.path.exists(self.get_output_file_path(0)):
print('downloading...')
self.download()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment