[Cython] Added 'add_module_directory' utility function
This commit is contained in:
parent
609b3e6e47
commit
987291e052
1 changed files with 12 additions and 1 deletions
|
|
@ -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])))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue