import os
cwd_path = [path for path in sys.path if 'org.python.pydev' not in path and
    'python2' not in path]
if len(cwd_path) == 1:
    os.chdir(cwd_path[0])
Set default directory of Pydev interactive console?