ilastik/ilastik — pull request #1047 by ukoethe (2014-11-21 18:13:01+00:00)
Title: make sure that _clean_paths() is the very first action ...

... when option `--clean_paths` is given on the ilastik command line.

A while ago, I tried to replace `ilastik.bat` with `ilastik.exe` on Windows. To this end, I moved the logic for cleaning up the PATH and PYTHONPATH variables from the `ilastik.bat` script into `ilastik_main.py` and added command line option `--clean_paths` to invoke that functionality. However, this did not work as desired so far. Now I realized that the first command being executed was `import ilastik_main`, which in turn executes `import ilastik.config`. It turns out that the latter already needs the updated path settings to work properly. So I changed the execution order to make sure that `_clean_paths()` is called before anything else.