[Cython] Added 'add_module_directory' utility function

This commit is contained in:
Ray Speth 2013-02-01 23:40:18 +00:00
parent 609b3e6e47
commit 987291e052

View file

@ -1,4 +1,7 @@
from . import Solution
import os
import inspect
from . import Solution, add_directory
def import_phases(filename, phase_names):
@ -7,3 +10,11 @@ def import_phases(filename, phase_names):
entered as a list of strings.
"""
return [Solution(filename, p) for p in phase_names]
def add_module_directory():
"""
Add the directory containing the module from which this function is called
to the Cantera input file search path.
"""
add_directory(os.path.dirname(os.path.abspath(inspect.stack()[1][1])))