Corrected method of naming output file from input file for the case where the pathname contains dots.

这个提交包含在:
craig-warren
2015-11-10 20:35:12 +02:00
父节点 7c90571fa6
当前提交 62a52e8c86
共有 2 个文件被更改,包括 3 次插入3 次删除

查看文件

@@ -72,7 +72,7 @@ author = 'Craig Warren and Antonis Giannopoulos'
# The short X.Y version. # The short X.Y version.
# Read version number from gprMax/gprMax.py # Read version number from gprMax/gprMax.py
#version = re.search('^__version__\s*=\s*\'(.*)\'', open('../../gprMax/gprMax.py').read(), re.M).group(1) #version = re.search('^__version__\s*=\s*\'(.*)\'', open('../../gprMax/gprMax.py').read(), re.M).group(1)
version = '3.0.0b6' version = '3.0.0b7'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = version + '(Bowmore)' release = version + '(Bowmore)'

查看文件

@@ -19,7 +19,7 @@
"""gprMax.gprMax: provides entry point main().""" """gprMax.gprMax: provides entry point main()."""
# Set the version number here # Set the version number here
__version__ = '3.0.0b6' __version__ = '3.0.0b7'
versionname = ' (Bowmore)' versionname = ' (Bowmore)'
import sys, os, datetime, itertools, argparse import sys, os, datetime, itertools, argparse
@@ -277,7 +277,7 @@ def run_model(args, modelrun, numbermodelruns, inputfile, inputdirectory):
snapshot.prepare_file(modelrun, numbermodelruns, G) snapshot.prepare_file(modelrun, numbermodelruns, G)
# Prepare output file # Prepare output file
inputfileparts = inputfile.split('.') inputfileparts = os.path.splitext(inputfile)
if numbermodelruns == 1: if numbermodelruns == 1:
outputfile = inputfileparts[0] + '.out' outputfile = inputfileparts[0] + '.out'
else: else: