Slicer 5.6
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
__init__.py
Go to the documentation of this file.
1import os
2import traceback
3import logging
4import sys
5
6from . import parameterNodeWrapper # Required to ensure parameterNodeWrapper plugins are registered
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 = "from " + fileNameNoExtension + " import *"
15 try:
16 exec(importStr)
17 except Exception as e:
18 logging.error("Failed to import " + fileNameNoExtension + ": " + traceback.format_exc())