From 38b5434fc4eb494c34d6e8f7456e8cfc7178557c Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sun, 7 Sep 2014 21:16:54 +0000 Subject: [PATCH] [ck2cti] Expand paths containing '~' and '~user' --- interfaces/cython/cantera/ck2cti.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/interfaces/cython/cantera/ck2cti.py b/interfaces/cython/cantera/ck2cti.py index 8e94f0f73..d261207cc 100644 --- a/interfaces/cython/cantera/ck2cti.py +++ b/interfaces/cython/cantera/ck2cti.py @@ -1807,6 +1807,14 @@ duplicate transport data) to be ignored. def convertMech(self, inputFile, thermoFile=None, transportFile=None, phaseName='gas', outName=None, quiet=False, permissive=None): + inputFile = os.path.expanduser(inputFile) + if thermoFile: + thermoFile = os.path.expanduser(thermoFile) + if transportFile: + transportFile = os.path.expanduser(transportFile) + if outName: + outName = os.path.expanduser(outName) + if quiet: logging.basicConfig(level=logging.ERROR) else: