import sys
print('%s %s' % (sys.executable or sys.platform, sys.version))
import os
os.chdir([p for p in os.environ['PYTHONPATH'].split(os.pathsep) if p.
    startswith('D')][0])
pwd()
How import Pydev project into interactive console?