Skip to content

Commit

Permalink
Merge pull request #2364 from ReactionMechanismGenerator/Import_pyrms…
Browse files Browse the repository at this point in the history
…_during_debug

importing pyrms and diffeqpy during a debug session
  • Loading branch information
ChrisBNEU authored Mar 2, 2023
2 parents 4e072c3 + a8c4127 commit 9f9bc89
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions rmgpy/rmg/reactors.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,25 @@
import sys
import logging
import itertools
try:
from pyrms import rms
from diffeqpy import de
from julia import Main
except:
pass

if __debug__:
try:
from os.path import dirname, abspath, join, exists
path_rms = dirname(dirname(dirname(abspath(__file__))))
from julia.api import Julia
jl = Julia(sysimage=join(path_rms,"rms.so")) if exists(join(path_rms,"rms.so")) else Julia(compiled_modules=False)
from pyrms import rms
from diffeqpy import de
from julia import Main
except:
pass
else:
try:
from pyrms import rms
from diffeqpy import de
from julia import Main
except:
pass

from rmgpy.species import Species
from rmgpy.reaction import Reaction
Expand Down

0 comments on commit 9f9bc89

Please sign in to comment.