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: IDLE: startup problem when HOME does not exist
Type: behavior Stage: test needed
Components: IDLE Versions: Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: Cemal.Duman, louielu, roger.serwy, terry.reedy
Priority: normal Keywords:

Created on 2012-09-04 21:43 by Cemal.Duman, last changed 2022-04-11 14:57 by admin.

Messages (9)
msg169840 - (view) Author: Cemal Duman (Cemal.Duman) Date: 2012-09-04 21:43
Hi 
Unfortunately i'm using Vista on my corparate laptop I can open my Python CLI without any problem but IDLE is not responding. When i started idle.py by issuing following command:

C:\Python27>python.exe Lib\idlelib\idle.py

I see following output:

C:\Python27>
 Warning: os.path.expanduser("~") points to
 H:\,
 but the path does not exist.

H:\ is my network drive. When i run the os.path.expanduser("~") at CLI i get following directory.

'C:\\Users\\edumcem\'

Thanks / Cemal
msg169843 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-09-04 23:00
IDLE not responding is likely due to Issue13582, since the warning message would cause IDLE to terminate abruptly when launched with pythonw.exe.

What does os.path.expanduser("~") evaluate to when executed from the IDLE shell?
msg171503 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-09-28 16:43
With Python 2.7.3 on Win7, I tried the following:

C:\Python27>set HOME=H:\
C:\Python27>python -m idlelib.idle

I do receive the same warning messages described by Cemal, since I don't have a valid H:\ drive. However, IDLE is responsive. Running IDLE using Lib\idlelib\idle.bat fails, though.

Also, launching IDLE from the start menu still works.

Cemal, can you confirm this?
msg171631 - (view) Author: Cemal Duman (Cemal.Duman) Date: 2012-09-30 11:52
Hi,

yes exactly...

I changed my home by using below commands.
C:\Python27>set HOME=C:\
C:\Python27>python -m idlelib.idle

it is working. But if i reboot my computer HOME changes again to network drive. I think sth abour corporate programs rewrites this paramters. 

Thanks / Cemal
msg171675 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2012-09-30 21:12
In your original message, did IDLE eventually start when you ran:

C:\Python27>python.exe Lib\idlelib\idle.py

?  If yes, then the bug is likely due to issue13582.


If I understand correctly, when you reboot your computer, IDLE won't launch from the shortcut in the start menu?
msg228519 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-10-05 00:46
@Terry what is your take on this?
msg228528 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-10-05 02:30
This is one of multiple  reports about problems with finding and reading HOME/.idlerc/*.*.  I believe that if nothing else, Idle should issue a warning message (that not not crash Idle), set a flag, and continue. The configuration dialog should also warn that changes will not be saved.

This particular situation is about a Windows system with HOME set but pointing to a directory on a drive that is not currently mounted.  The user could create a .bat file that resets HOME, but Idle could also try harder to find a usable directory (so that the installed version specific icons work).  Currently USERPROFILE is used (in os.expanduser) as a backup if HOME does not exist.  It could also be used as a backup is HOME exists buts is not usable.  Dittle for HOMEDRIVE and HOMEPATH used to backup USERPROFILE.  Or Idle could change 'x:somepath', where x is not 'c', to 'c:somepath'.

Or maybe Idle should recognize an IDLE_RC env var so a user like Cemal can run idle with the same set of user config files regardless of whether connected to a corporate network or not.  This would also help someone (like me) who wants to use the same config files regardless of whether logged in and running as admin or normal user.
msg297256 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-29 05:51
#8231, msg297255 suggests some refactoring to make this sort of thing testable without crippling a developer system.
msg298025 - (view) Author: Louie Lu (louielu) * Date: 2017-07-10 05:56
Terry: How about to support XDG base directory on Unix[1]?

[1]: https://wiki.archlinux.org/index.php/XDG_Base_Directory_support
History
Date User Action Args
2022-04-11 14:57:35adminsetgithub: 60066
2017-07-10 05:56:07louielusetnosy: + louielu
messages: + msg298025
2017-07-07 23:10:48terry.reedylinkissue30869 dependencies
2017-06-29 05:51:33terry.reedysetversions: + Python 3.6, Python 3.7, - Python 2.7, Python 3.4, Python 3.5
nosy: - BreamoreBoy

messages: + msg297256

assignee: terry.reedy
stage: test needed
2014-10-05 02:30:27terry.reedysettitle: IDLE not working when due to wrong Hard Drive point of os.path.expanduser -> IDLE: startup problem when HOME does not exist
messages: + msg228528
versions: + Python 3.4, Python 3.5
2014-10-05 00:46:33BreamoreBoysetstatus: pending -> open
nosy: + terry.reedy, BreamoreBoy
messages: + msg228519

2014-07-31 18:03:02serhiy.storchakasetstatus: open -> pending
2012-09-30 21:12:33roger.serwysetmessages: + msg171675
2012-09-30 11:52:21Cemal.Dumansetstatus: pending -> open

messages: + msg171631
2012-09-28 16:43:05roger.serwysetstatus: open -> pending
type: behavior
messages: + msg171503
2012-09-04 23:00:50roger.serwysetnosy: + roger.serwy
messages: + msg169843
2012-09-04 21:43:34Cemal.Dumancreate