1

How can I change the default directory in Spyder when opening a project via Projects > Open Project? Spyder seems to open always the same directory: User Home directory.

Most of my projects are located in one directory, which is not my home directory. I save there also the copied projects. It would save a few clicks to open a project. In particular, it is nice to have because the number of Recent Projects is limited to 10.

I tried to change Preferences > Current working directory > the following directory, but this does not have any impact on the Open Project directory.

Is there a possibility to change it either in GUI, or via configuration files, or registry (without changing the user home directory of course)?

Knabe
  • 33
  • 5
  • I don't think you can change that... If I'm looking at the right places, it seems the [`open_project()`](https://github.com/spyder-ide/spyder/blob/v4.0.0rc1/spyder/plugins/projects/plugin.py#L278) function always takes [`get_home_dir()`](https://github.com/spyder-ide/spyder/blob/v4.0.0rc1/spyder/config/base.py#L153) as its base directory, which is essentially wherever `~` gets you (you cannot even override it with `HOME` or anything, since it checks for `~` first, which should work in Unix and Windows). You may file an issue proposing the feature for the developer's consideration, though. – jdehesa Nov 11 '19 at 15:48
  • (*Spyder maintainer here*) There's no way to do that, but I don't understand why you want to be able to do it. Please edit your answer to elaborate about it. – Carlos Cordoba Nov 11 '19 at 18:04
  • @CarlosCordoba I clarified the question. Hope it is clear now. – Knabe Nov 11 '19 at 20:34
  • Ok, I understand your use case better now. Please open an issue [here](https://github.com/spyder-ide/spyder/issues), so we don't forget to address it in the future. – Carlos Cordoba Nov 13 '19 at 23:38

1 Answers1

0

I put a shortcut in my home directory called _shortcut_to_spyder_projects to get to my projects faster. The leading _ keeps it at the top of the list.

adr
  • 1,731
  • 10
  • 18