-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The distinction between "working directory for newly opened consoles" and "working directory for current console" is hard to understand #3257
Comments
Agreed. Closely related issue: #2030 Much of this could be fixed by simply rewording the prompts and dialog boxes (using clearer, more consistent terms). See also https://groups.google.com/forum/#!topic/spyderlib/H4d0gsQWtPQ for further elaboration of what's confusing here. |
Hi, @ChristianKleineidam @nerdfever Which Spyder version you have? Actually (In Spyder v3.0.1), Preference UI looks like as: Could you say us: If the clarifications on the current user interface, meets your expectations or not? and because?. We appreciate your recommendations to improve spyder in this regard and further solve your issues. :) |
@malliwi88 Thanks for looking into this issue. If you read thru the other comments on related issues (linked above), I think it's pretty clear that most of the problem comes from use of unclear or inconsistent terms. The Python os module defines os.getcwd(). "cwd" stands for "current working directory". So to be consistent with the os module, I think the term "current working directory" should be used. So re Preferences>Run: 1 - I'm still not sure what "Default working directory" does, but if in fact it controls the current working directory (cwd) when Spyder starts, then: "Default working directory is:" >>> "Default working directory (the current working directory when Spyder starts) is:" 2 - It's still not clear to me where/what "the script directory" is. I have many scripts in many directories. In fact I can have many scripts, from different directories, open in Spyder at the same time. So which directory is this referring to? 3 - I don't think the checkbox "Enter debugging mode when..." belongs in this list, as if it's a 3rd choice for the default working directory. Re Preferences>Global working directory: 1 - The description is pretty good, I think. 2 - In two places this menu uses the term "current file directory". Is that the same or different from the "current working directory"? If it's the same, call it that. If not, describe what it is. 3 - What is a "file base directory" (last box in the dialog box)? Is this the same as the "global working directory" or the "current working directory" or the "current file directory"? And "Change" what? I find it completely unclear - the dialog box uses 4 different terms to describe somewhere between 2 and 4 concepts. Whatever it is, if it's one of the previously defined directories, call it by the same term used above. If it's a different thing, describe what it is. If the "file base directory" is in fact the directory that a given file is in (as I suspect it might be), and these checkboxes are offering the option to change Python's cwd when opening/saving a file, then I suggest it should say: Set Python current working directory to file location when: (Of course if that's not what it does, then this is all wrong. I don't know what it does.) I hope this is helpful. |
Perhaps it would be useful, as part of an overall review of Spyder's UI, to make a glossary of terms used in menus and dialog boxes. Any time you find two or more terms referring to the same concept, clean it up (pick one term, use it consistently, and make sure it's clearly defined what it means). |
I agree that the UI can be confusing in two cases:
I hope to resolve your doubts at the moment with this demonstrative example 😉 some important details for my demonstrative example:
Ok!! Start with the example!!! For solve in order of your last post: you: So to be consistent with the os module, I think the term "current working directory" should be used.
So re
|
@goanpeca the last example, Is it useful for the wiki page? or It's irrelevant. |
@malliwi88 Thanks! This is very helpful re explaining how Spyder works. But still some things are not completely clear. (And of course this needs to be explained to other people who don't find this thread.) 1 - Re "Default working directory" (dwd) and "current working directory" (cwd): If I understand correctly, cwd is the directory files will be opened in if no directory is explicitly specified. For example: f = open("myFile.foo") Python looks in the cwd for file "myFile.foo". dwd is the cwd that Python will use when Spyder executes a script (doesn't matter if normal execution or debug execution, correct?). So if I'm editing "u:\data\projects\MyProgram.py" and then run it, if the first lines of that script reads: import os If "the script directory" was selected in Preferences, this prints: "u:\data\projects" If "the following directory" was selected in Preferences and set to "x:\somePlace\orOther", then the script prints: "x:\somePlace\orOther" Do I understand correctly? (If you confirm, I'll propose wording for the Preferences box to try to make this clear - I'm a native English speaker.) 2 - "the script directory" means the directory that stores the script being executed by Spyder. (Again, doesn't matter if normal execution or debug execution, correct?). It has nothing to do with the location of files being edited - only of the file being executed. Correct? (again, if you confirm I'll try to propose wording to make this more clear) 3 - My interpretation of "file base directory" in my earlier post of this thread was correct. It refers to the directory where the file being opened for editing, or saved from the editor, is stored. Correct? 4 - I'm still not sure what "current file directory" means - I don't think you addressed that point in your post. I'm guessing it means cwd. Is that correct? If so, it should be called "current working directory" (not current file directory). Thanks again for working on this problem. |
I have found these issues confusing as well. I think it would be very helpful to implement the suggestions from nerdfever. |
1-2 The only difference is that in spyder gives you the possibility to choose a dwd of your preference different from my documents for when you open new python files. Precisely this directory corresponds with the path indicated on |
The discussion here seems closely related: https://groups.google.com/forum/#!msg/spyderlib/HWCeeO8Tc7o/N_9cfh82AwAJ |
@rlaverde, please work on this one. As we mentioned in the sprint, the idea is to synchronize the working directory toolbar, the file explorer and the Besides, after changing consoles, the toolbar needs to be updated too to show the cwd of the new console. |
Currently Spyder has at the top of the UI a line that specify the working directory for newly opened consoles.
As a new user I would have expected it also to switch the current working directory and got confused about how to set my working directory. Currently the menu also doesn't offer a menu point of "set working directory".
I think it would be easiest if the top of the UI always shows the current working directory.
Alternatively the UI could show (current working directory) or (not currert working directory) directly after the file path.
The text was updated successfully, but these errors were encountered: