mirror of
https://github.com/nasa/trick.git
synced 2025-06-19 07:38:26 +00:00
Make trick (Python package) a namespace package
Namespace packages are a mechanism for splitting a single Python package across multiple directories on disk. With the addition of $(TRICK_HOME)/pymods/trick, there now exists a package named 'trick' at $(TRICK_HOME)/pymods and in each SIM_* directory. This change allows sims to import modules from both locations. Refs #365
This commit is contained in:
@ -103,6 +103,7 @@ int Trick::IPPython::init() {
|
||||
"import struct\n"
|
||||
"import binascii\n"
|
||||
"sys.path.append(os.getcwd())\n"
|
||||
"sys.path.append(os.path.join(os.environ['TRICK_HOME'], 'pymods'))\n"
|
||||
"sys.path += map(str.strip, os.environ['TRICK_PYTHON_PATH'].split(':'))\n"
|
||||
"import trick\n"
|
||||
"sys.path.append(os.getcwd() + \"/Modified_data\")\n"
|
||||
|
Reference in New Issue
Block a user