Message347859
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. |
|
Date |
User |
Action |
Args |
2019-07-13 22:10:59 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, andyharrington, mark, ned.deily, serhiy.storchaka, jeff.allen, eryksun, steve.dower |
2019-07-13 22:10:59 | terry.reedy | set | messageid: <1563055859.33.0.986799918571.issue22121@roundup.psfhosted.org> |
2019-07-13 22:10:59 | terry.reedy | link | issue22121 messages |
2019-07-13 22:10:58 | terry.reedy | create | |
|