This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Option to set startup directory in IDLE
Type: enhancement Stage: test needed
Components: IDLE Versions: Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Nofar Schnider, anthonypjshaw, rhettinger, terry.reedy
Priority: normal Keywords:

Created on 2016-11-22 17:54 by rhettinger, last changed 2022-04-11 14:58 by admin.

Messages (8)
msg281494 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-11-22 17:54
In my Python courses, Windows users frequently ask about how to set a startup directory so they can run from their Desktop or a custom directory.  

The usual answer is to create a short-cut and then alter the properties on that shortcut.  However, other programs they are used to will allow the startup directory to be specified from within the program (in our case, the preferences menu).

Also, we should change the default directory from C:\\Python27 which is almost never the right place.  A documents directory would be more appropriate.
msg281554 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-11-23 10:53
I agree.  I have had in mind (but cannot find an issue) to change the default to a user's home directory, as the best general default.  But even that is not really the proper place that many would want.  I can adapt and reuse the code used to browse and validate custom help files.
msg281645 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2016-11-24 19:20
Terry, if you're open to it, I would like to have one of our new aspiring core developers work on this patch under your direction.  Nofar Schnider has expressed an interest.
msg281807 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2016-11-27 01:16
Raymond: yes, I am definitely open to collaboration on this issue.  The timing is good as I just started, a month ago, expanding configure dialog testing beyond the trivial one of creating an instance without raising.  Real tests are needed preparation for making other changes, including adding other new options in 3.6+.  I would like to include this one in 3.6.1, 4 to 6 months from now.

Doing so may require more information about IDLE on *nix and Mac than I currently have.  Which of those have you run IDLE on?  Or helped people with in your classes?

Nofar: welcome.  I have two immediate questions.  1) Which OS do you primarily work with?  (I am using Win 10.)  Can you test on anything else?  2) Are you only interested in this issue, or might you be open to working on other issues if this one is successful?

Idlelib is not an easy codebase to get into.  The +-60 modules are listed in README.txt.  There is also a mapping from menu items to implementation code.  However, the README does not cover the addition of a new option.  I will write and upload a design document or roadmap for this one.
msg281823 - (view) Author: Nofar Schnider (Nofar Schnider) * (Python triager) Date: 2016-11-27 12:55
Thanks Terry.
I am working on my Macbook Pro so my OS is macOS Sierra. Would love to test on it and also, I am able to test on several VMs with different Unix distributions.
I am interested in anything that: 1) can help the Python community. 2) I could learn from. So the answer is YES.

Just let me know where to start!
msg329974 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2018-11-15 23:18
This is partially a duplicate of #22121, but that focused most on the default startup directory on Windows.
msg341653 - (view) Author: anthony shaw (anthonypjshaw) * (Python triager) Date: 2019-05-06 22:21
Hi Nofar are you still interested on working on this request?
msg364059 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-03-13 00:37
The rule for whether to switch to the configured directory might be
  if sys.stdout is None: chdir...

On windows, this is true when starting in the console with
  pyw(pythonw) -m idlelib
But there is no need to include the (Windows-only) 'w'.  It is meant to be used in the Windows icon shortcut.  The option to start in the configured directory even from the console might be seen as a plus.
History
Date User Action Args
2022-04-11 14:58:39adminsetgithub: 72961
2020-03-13 00:37:26terry.reedysetmessages: + msg364059
2019-05-06 22:21:02anthonypjshawsetnosy: + anthonypjshaw
messages: + msg341653
2018-12-11 21:11:54terry.reedysetversions: + Python 3.8, - Python 3.6
2018-11-15 23:18:08terry.reedysetmessages: + msg329974
2016-11-27 12:55:56Nofar Schnidersetmessages: + msg281823
2016-11-27 01:16:22terry.reedysettype: enhancement
stage: test needed
messages: + msg281807
versions: + Python 3.6
2016-11-24 19:34:57Nofar Schnidersetnosy: + Nofar Schnider
2016-11-24 19:20:18rhettingersetmessages: + msg281645
2016-11-23 10:53:36terry.reedysetmessages: + msg281554
2016-11-22 17:54:11rhettingercreate