Skip to content

Commit

Permalink
Update importing.py
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed Sep 29, 2023
1 parent 22750d6 commit 1f34169
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions qcelemental/util/importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,21 @@ def which(
ModuleNotFoundError
When `raises_error=True` and command not found. Raises generic message plus any `raise_msg`.
Notes
-----
+-------------+-------------+---------------------------------+---------------------------+
| return_bool | raise_error | action if found | action if not found |
+=============+=============+=================================+===========================+
| F (default) | F (default) | return <path to command> string | return None |
+-------------+-------------+---------------------------------+---------------------------+
| T | F (default) | return True | return False |
+-------------+-------------+---------------------------------+---------------------------+
| F (default) | T | return <path to command> string | raise ModuleNotFoundError |
+-------------+-------------+---------------------------------+---------------------------+
| T | T | return True | raise ModuleNotFoundError |
+-------------+-------------+---------------------------------+---------------------------+
"""
if env is None:
lenv = {"PATH": os.pathsep + os.environ.get("PATH", "") + os.pathsep + os.path.dirname(sys.executable)}
Expand Down

0 comments on commit 1f34169

Please sign in to comment.