Development Environment¶
Setting Up Python¶
Python in Splunk 4.3 generates an error unless the PYTHONPATH environment variable is defined. This makes it difficult to make Eclipse use Splunk's Python since Eclipse tries to run Python when initializing it. You can get Eclipse to load Splunk's Python by adding a batch script to Splunk's bin directory with the following:
@echo off "C:\Program Files\Splunk\bin\splunk.exe" cmd python %*
Tell Eclipse to load the batch file and it should load fine. Alternatively, you can call setSplunkEnv before running Python to set the necessary parameters.