Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
__init__.py
Go to the documentation of this file.
1"""This package contains plugins for Subject Hierarchy implemented in Python."""
2
3import os
4import traceback
5import logging
6import sys
7
8currentDir = os.path.dirname(os.path.realpath(__file__))
9sys.path.append(currentDir)
10for fileName in os.listdir(currentDir):
11 fileNameNoExtension = os.path.splitext(fileName)[0]
12 fileExtension = os.path.splitext(fileName)[1]
13 if fileExtension == ".py" and fileNameNoExtension != "__init__":
14 importStr = f"from {fileNameNoExtension} import *"
15 try:
16 exec(importStr)
17 except Exception as e:
18 logging.error("Failed to import " + fileNameNoExtension + ": " + traceback.format_exc())