CTI to XML conversion works with either new or old Python module

This commit is contained in:
Ray Speth 2013-07-29 01:37:54 +00:00
parent b7d4fbbe54
commit 9a8dbf75f8

View file

@ -75,7 +75,10 @@ void ct2ctml(const char* file, const int debug)
"if True:\n" << // Use this so that the rest is a single block
" import sys\n" <<
" sys.stderr = sys.stdout\n" <<
" import ctml_writer\n" <<
" try:\n" <<
" from cantera import ctml_writer\n" <<
" except ImportError:\n" <<
" import ctml_writer\n" <<
" ctml_writer.convert(r'" << file << "')\n" <<
" sys.exit(0)\n\n"
"sys.exit(7)\n";