I am using Komodo Edit, a code editor.
When I right click on projects and click "Show in Explorer", it will pop up a box just like Windows Explorer at the directory my project is. This is very convenient.
However, I noticed an insidious side effect. When you try to run a python file with this window that looks exactly like Windows Explorer, you will find out that it completely messes up sys.path in Python to use its own directory.
Is there any way to avoid this?
import sys
sys.path
C:\Windows\system32\python26.zip
C:\Program Files\ActiveState Komodo Edit 5\lib\python\DLLs
C:\Program Files\ActiveState Komodo Edit 5\lib\python\lib
C:\Program Files\ActiveState Komodo Edit 5\lib\python\lib\plat-win
C:\Program Files\ActiveState Komodo Edit 5\lib\python\lib\lib-tk
C:\Python26
C:\Program Files\ActiveState Komodo Edit 5\lib\python
C:\Program Files\ActiveState Komodo Edit 5\lib\python\lib\site-packages
C:\Program Files\ActiveState Komodo Edit 5\lib\python\lib\site-packages\win32
C:\Program Files\ActiveState Komodo Edit 5\lib\python\lib\site-packages\win32\lib
C:\Program Files\ActiveState Komodo Edit 5\lib\python\lib\site-packages\Pythonwin