Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #197478

Re: WG: dont use C:\Windows as working directory when installed using microsoft store

From Mats Wichmann <mats@wichmann.us>
Newsgroups comp.lang.python
Subject Re: WG: dont use C:\Windows as working directory when installed using microsoft store
Date 2025-05-18 17:22 -0600
Message-ID <mailman.61.1747610528.3008.python-list@python.org> (permalink)
References <4b0kFS5lPpznWG8@mail.python.org> <a0a45b23-0a1b-402a-9e91-2fca59ac992a@wichmann.us>

Show all headers | View raw


On 5/18/25 08:39, Mike Dewhirst via Python-list wrote:
> Apologies for top-posting. It's my phone's fault.Since  no-one appears to have responded, I'll stir up some aggro and offer my opinion based on ~45 years experience with Microsoft.Uninstall python/idle etc completely and download from python.org instead. I would advise ignoring recommendations and install to c:/python313 or whatever version suits. From then, I would establish a virtual environment for each project and ignore Windows paths. The clever things built into Windows specific kit have built-in assumptions which probably suit some people but not you. Nor me.Good luck.Mike --Unsigned mail from my phone
I did respond and something went wrong with the copy that was supposed 
to go to the list, still need to investigate why.


IDLE uses the directory it was started in. That's absolutely fine if 
you're in a directory you want to work in, and you type "idle" to a 
command-line shell.

If you launch IDLE, like any command, by clicking on an icon, the start 
directory depends on how desktop-style launching works (it doesn't have 
the context of a "current working directory" that you have in a shell), 
and on configuration settings. Without configuration (whether by the 
user explicitly, or by the way the launch icon is set up during program 
installation), it's likely to be the location of the icon file, or some 
other uninteresting place. It's not just Windows where problems have 
happened with IDLE using current-directory that's not what folks expect 
- you can find grumbles for Mac as well if you look on the Internet.

Configuring the launch directory for a command run via an icon is very 
system-specific. On Windows you can configure the properties of the icon 
(the real one, not the one in the launch menu, which is a shortcut)... 
except, as in the OP's case, if you used the Store version, which is an 
"app", where you apparently can't.  Store apps have some special 
restrictions, which, in my possibly slightly less radical opinion, means 
the Python one is not really worth using.

So:

- start IDLE from a shell prompt (change directory first if you want a 
special dev dir)
- use the python.org version and configure the launch dir via the icon
- use one of the many good editors/IDEs that handle all this stuff. yes 
that's not a "battery includes" thing like IDLE is, but hey... there are 
many of these, free, proprietary, or in between. A pair of 
community-curated lists are at:

https://wiki.python.org/moin/IntegratedDevelopmentEnvironments
https://wiki.python.org/moin/PythonEditors

and there are also a several-digit number of internet sites that promise 
"the Best Python Editors" and that kind of click-baity thing...

Back to comp.lang.python | Previous | Next | Find similar


Thread

Re: WG: dont use C:\Windows as working directory when installed using microsoft store Mats Wichmann <mats@wichmann.us> - 2025-05-18 17:22 -0600

csiph-web