[issue22121] Start IDLE from icon in a better place.

2021-03-27 Thread Eryk Sun
Eryk Sun added the comment: > blacklisting directories Ensure that filepaths in sys.argv are resolved before changing out of a blacklisted directory. Also, for file open/save dialogs, as opposed to the working directory of the Python subprocess (e.g. os.getcwd() in the REPL), it's typical

[issue22121] Start IDLE from icon in a better place.

2021-03-27 Thread Eryk Sun
Eryk Sun added the comment: > if sys.stdout is None and no file in sys.argv With the app distribution from the Microsoft Store, "idle3.x.exe" is a GUI executable that runs idlelib. There isn't a console version. Also, GUI scripts are usually run with the pyw.exe launcher or pythonw.exe, e.g.

[issue22121] Start IDLE from icon in a better place.

2020-03-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Recap and proposal When editing a named file, Open and Save start in the directory of that file. Running a file sets the initial working directory of the execution process, which affects imports in the code. We are here discussing the working directory for

[issue22121] Start IDLE from icon in a better place.

2020-03-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: #39927 is about changing the Mac-specific chdir hidden away in Mac/IDLE/IDLE.app/Contents/Resources/idlemain.py, line 8 A generic solution should supercede that. -- ___ Python tracker

[issue22121] Start IDLE from icon in a better place.

2020-03-10 Thread Terry J. Reedy
Terry J. Reedy added the comment: See also #38775 about a configuration option. The two proposals need to be coordinated. -- ___ Python tracker ___ _

[issue22121] Start IDLE from icon in a better place.

2019-07-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: An implementation note mostly to myself: In 3.8 and before, 'python relative/path/to/file.py' results in the __file__ attribute of the main module being the relative path, and a possibly unnormalized full path is os.curdir + __file__. I believe that this is

[issue22121] Start IDLE from icon in a better place.

2019-07-14 Thread Steve Dower
Steve Dower added the comment: > NameError: name 'get_default_location' is not defined Also, this was a hypothetical function that you would implement in IDLE to determine whatever the default location ought to be. I'm personally happy to stay out of that part of the argument. -- _

[issue22121] Start IDLE from icon in a better place.

2019-07-14 Thread Steve Dower
Steve Dower added the comment: > Steve, there is a problem in both lines of this suggestion. The only problem is that you ran from your own build. Once running from an installed layout (which you can now easily generate with `python.bat PC\layout --preset-default --copy `), the comparison wi

[issue22121] Start IDLE from icon in a better place.

2019-07-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: Looking at the revised title, +1 for changing the IDLE Icon startup, but let's keep the command-line startup sticking with the current directory: $ mkdir pyclass $ cd pyclass $ python3.8 -m idlelib.idle # Should start in the pyclass directory ---

[issue22121] Start IDLE from icon in a better place.

2019-07-13 Thread Terry J. Reedy
Change by Terry J. Reedy : -- assignee: -> terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue22121] Start IDLE from icon in a better place.

2019-07-13 Thread Terry J. Reedy
Terry J. Reedy 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