initially I just wanted to fix an annoying NPE but then I stumbled across bug
1523582 . For some reason which is still unknown to me the parameter string
(although quoted correctly by pydev) does not make it to python.
To be more exact, the string gets through but the quoting is missing so Python
complains that it can't find the script file which is used to detect Python's
library directories. This is not bound to path names which contain spaces, a
command line like 'python -c "import sys; print sys.path"' doesn't work either
(syntax error after "import"). I always
Fortunately the solution is quite easy: Do not munge the command line
parameters (which are available as a String) into a String but pass them as
String. If you do this, there is no problem as the command line parameters
will not be split (getRuntime().exec is not a shell).
Generally speaking it is much better (safer) not to munge parameters but just
to pass them to the exec call.
With the patch attached I can launch Eclipse and configure the Python
interpreter. Without the patch I always the error described in . The code
has be cleaned up a bit but I was not sure what coding style etc. you guys
prefer. Furthermore I did not get the tests to run (some setup problem on my
side) so maybe I broke something.
Gubener Str. 38
http://www.schwarz.eu - software development and consulting