Python console 'Path mappings' with a remote interpreter

Hi,

I'm using Intellij 14.0.4 for a Python project. Development is done on Windows.
I'm using Vagrant+Docker to simulate the production environment on my development environment and so I've configured Intellij to use a remote interpreter running within Docker.
Source code is cloned on the Windows machine and is mapped in Docker. So for everything to work well I'm using 'Path mappings' from the Windows path to the Linux path.

Everything works great with one limitation, when I try to run a Python console using the remote interpreter the line:

     sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])
which appears in the 'Starting script' section of the Python console does not
go through 'Path mappings' and so the Python interpreter within the console cannot find my source code.
 
Simply running code in any other way works great.


I wonder if anyone has a solution for that.
One idea I have is to explicitly call for 'Path mappings' on this line. Replace it with something like
     sys.path.extend([pathMapping(WORKING_DIR_AND_PYTHON_PATHS)])
but I couldn't find any Intellij macro/way to do it.
Currently in order to use this console I have to manually set the path each time I open a new console


Python Console.png

1 comment
Comment actions Permalink

Hi!
This is a known problem: https://youtrack.jetbrains.com/issue/PY-13087
Please vote to be notified about a progress. It is planned to be fixed in one of the nearest updates.

0

Please sign in to leave a comment.