Fix initial cwd issue
@@ -688,7 +688,6 @@ class SubprocessProxy(BackendProxy):
self._executable = executable
self._response_queue = None
- self._cwd = None
self._welcome_text = ""
self._proc = None
@@ -697,9 +696,12 @@ class SubprocessProxy(BackendProxy):
self._usersitepackages = None
self._gui_update_loop_id = None
self._in_venv = None
- self._cwd = None
+ self._cwd = self._get_initial_cwd()
self._start_background_process()
+ def _get_initial_cwd(self):
+ return None
+
def _start_background_process(self):
# deque, because in one occasion I need to put messages back
self._response_queue = collections.deque()
@@ -950,6 +952,9 @@ class CPythonProxy(SubprocessProxy):
super().__init__(clean, executable)
self._send_msg(ToplevelCommand("get_environment_info"))
+ def _get_initial_cwd(self):
+ return get_workbench().get_local_cwd()
+
def _get_launcher_with_args(self):
import thonny.backend_launcher
