[Cython] Added the "import_phases" convenience function

This commit is contained in:
Ray Speth 2013-02-01 23:39:44 +00:00
parent a60e10c3de
commit 34a1304297
2 changed files with 10 additions and 0 deletions

View file

@ -1,6 +1,7 @@
from ._cantera import *
from ._cantera import __version__, _have_sundials
from .liquidvapor import *
from .utils import *
import os as _os
add_directory(_os.path.join(_os.path.dirname(__file__), 'data'))

View file

@ -0,0 +1,9 @@
from . import Solution
def import_phases(filename, phase_names):
"""
Import multiple phases from one file. The phase names should be
entered as a list of strings.
"""
return [Solution(filename, p) for p in phase_names]