From f6fcfbcacf28c350388bb690c68f5d0ac735e95c Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Thu, 23 Feb 2017 15:20:20 +0000 Subject: [PATCH] Correct bug which required rewinding of file for subsequent reading. Introduced when moving to file name or file object handling for input file. --- gprMax/input_cmds_file.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gprMax/input_cmds_file.py b/gprMax/input_cmds_file.py index d84c01df..d51b5b6f 100644 --- a/gprMax/input_cmds_file.py +++ b/gprMax/input_cmds_file.py @@ -36,6 +36,9 @@ def process_python_include_code(inputfile, usernamespace): # Strip out any newline characters and comments that must begin with double hashes inputlines = [line.rstrip() for line in inputfile if(not line.startswith('##') and line.rstrip('\n'))] + + # Rewind input file in preparation for any subsequent reading function + inputfile.seek(0) # List to hold final processed commands processedlines = []