[issue22121] Start IDLE from icon in a better place.
Terry J. Reedy
report at bugs.python.org
Sat Jul 13 18:10:59 EDT 2019
Terry J. Reedy <tjreedy at udel.edu> added the comment:
Steve, there is a problem in both lines of this suggestion.
if os.path.normcase(os.getcwd()) == os.path.normcase(sys.prefix):
os.chdir(get_default_location(sys.platform))
On my 3.8 repository build,
>>> import os; os.getcwd()
'F:\\dev\\38\\PCbuild\\win32'
>>> import sys; sys.prefix
'F:\\dev\\38'
# Don't match. The following does.
>>> os.path.dirname(sys.executable)
'F:\\dev\\3x\\PCbuild\\win32'
>>> get_default_location
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'get_default_location' is not defined
Raymond, I understand that you are saying that the current behavior when starting from a command prompt is correct (I agree) and depended upon. I changed the title to be clear about that. Starting IDLE from an icon includes starting python from an icon and then starting IDLE with 'import idlelib.idle', which I do routinely for repository builds.
----------
title: IDLE should start with HOME as the initial working directory -> Start IDLE from icon in a better place.
versions: +Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue22121>
_______________________________________
More information about the Python-bugs-list
mailing list