Great. If you can wait few days, I have to implement a solution to allow calling a subprocess with a ācleanā environment (aka without Slicer paths) for a different project.
Once done, you should have an easy way to achieve this.
Note that in case of Elastix, we added more directories to the path/LD path. In your case you probably want to either add your external programās paths to the beginning of relevant environment variables; or remove all Slicer-specific paths from environment variables.
Thanks, this will be useful. Please consider giving a more descriptive name and only use positive statements in names (try to describe what it is, instead of what it is not). For example, systemEnv(), defaultEnv(), externalEnv(), or startupEnv() names would be better.
601: Test timeout computed to be: 1800
601: Number of registered modules: 1
601: Number of instantiated modules: 1
601: Number of loaded modules: 1
601: -------------------------------------------
601: path: ['/home/jcfr/Projects/Slicer-2-build/Slicer-build/Applications/SlicerApp/Testing/Python', '/home/jcfr/Projects/Slicer-2/Base/Python/slicer/tests']
601: testname: test_slicer_environment
601: -------------------------------------------
601: test_slicer_app_environment (test_slicer_environment.SlicerEnvironmentTests) ... ok
601: test_slicer_app_startupEnvironment (test_slicer_environment.SlicerEnvironmentTests) ... ok
601: test_slicer_util_startupEnvironment (test_slicer_environment.SlicerEnvironmentTests) ... ok
601:
601: ----------------------------------------------------------------------
601: Ran 3 tests in 0.002s
601:
601: OK
601: vtkDebugLeaks has found no leaks.
1/1 Test #601: py_nomainwindow_test_slicer_environment ... Passed 1.23 sec