Spyder: Can't we access other Drives except C: by using Spyder file explorer?

Created on 13 Jan 2018  路  10Comments  路  Source: spyder-ide/spyder

Description of your problem

I am new to Spyder, My some data pre-processing files are in D: derive but I'm not able to access those files because there is no option instead C: which are automatically picked by spyder file explorer.
What steps will reproduce the problem?



    1. 2.
  1. 3.

What is the expected output? What do you see instead?

Please provide any additional information below

Versions and main components

  • Spyder Version:
  • Python Version:
  • Qt Version:
  • PyQt Version:
  • Operating system:

Dependencies

Please go to the menu entry Help > Optional Dependencies (or
Help > Dependencies), press the button Copy to clipboard
and paste the contents below:

Windows File Explorer Wontfix Ui

Most helpful comment

I was able to select other folders on Windows 7 with Spyder 3.2.5. To do so, I had to change the Current Working Directory (the line above the File Explorer in the screen shot) by selecting the Folder icon next to the entry box. The calltip (if you hover over the Current Working Directory box) mentions that it is the working directory for the file explorer.

All 10 comments

Could you post a screenshot of your problem? I don't exactly understand what you mean in your report.

issue_spyder

I can confirm, accessing drives other than C:\ is indeed not possible on Windows, limiting the utility of the file explorer.

I was able to select other folders on Windows 7 with Spyder 3.2.5. To do so, I had to change the Current Working Directory (the line above the File Explorer in the screen shot) by selecting the Folder icon next to the entry box. The calltip (if you hover over the Current Working Directory box) mentions that it is the working directory for the file explorer.

I had to change the Current Working Directory

Thanks for checking that out. I guess the broader issue is that navigating up or down a level in the overall file explorer window changes the actual working directory, which in turn can have side effects on the code the user runs, which is an issue not only with changing drives but in general with navigating to files outside the current working directory. Isn't this supposed to be linked to the project directory, though (not sure the specifics on the interaction)? Also, might there not be other undesired implications now and down the road (per project config files, settings for other packages, VCS integration, etc)? Or is this already (being) addressed in Spyder 4?

It seems the preferred approach should either be just displaying drives as one more level up in the tree, or as clickable buttons on the top bar (like in Total Commander and its derivatives), whichever is easier. But either might be too much to implement for now; not sure what the backend looks like.

I am using window 10 but not able to change directory except C:. In my file explorer, I have access to only C:\ Drive. Like I want to secure my files in some other Protected Derives but I'm not able to do so.

Thanks

@shuaib-aslam Please take the time to carefully read our replies to you, as they make your followup comment rather moot. Yes, we are aware that's your problem; you made it quite clear already, thanks. Furthermore, @csabella explained exactly how to do what you're asking (and I also confirmed that works on Win 8.1 and Win 10). Here's the quote again:

I had to change the Current Working Directory (the line above the File Explorer in the screen shot) by selecting the Folder icon next to the entry box.

Also, I have no idea what you mean by

Protected Derives

Do you mean _drives_? Or _devices_? Even if it were either of these, I'm not familiar with that term and I've done stints in tech support and system administration for Windows, Mac and Linux, so its unlikely others will be clear on what you're referring to. Could you clarify? Thanks.

This happens because Windows doesn't have a root directory (like Unix) from which you can move from drive to drive. So you can't go one level up from C:\ to jump to D:\. Instead (as @csabella mentioned) you need to press the folder button to your right to move to that directory explicitly.

Instead of using Spyder file explorer just go to:
TOOLS > PREFERENCES > CURRENT WORKING DIRECTORY
in "the following directory" section just paste your other drives link in eg D:\FolderName etc

@kevindRuby There's really no reason to do all that just to switch drives,, since:

  • You can just paste it directly into the working directory bar in the main Spyder UI
  • You can also browse for the drive from there, and
  • That hardcodes the working directory for whenever Spyder is launched and all projects opened, so projects do not set the working directory properly as they normally would (which is one of their main functions at the moment).

If you really want something like that, its more flexible just to use projects instead, so your directory is automatically set to your project directory upon opening, which will be wherever you set it. The usecase for that setting is really only if you only ever work in one main directory no matter what, or you want your working directory to always be the same (e.g. top level) directory while keeping different sessions associated with directories within that.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

goanpeca picture goanpeca  路  3Comments

hedeqing picture hedeqing  路  3Comments

gabrielclow picture gabrielclow  路  3Comments

keith-golden picture keith-golden  路  3Comments

yogu220172 picture yogu220172  路  3Comments