py.ini documentation improvement

I was just getting Jython working with py.exe, and I think the documentation can be made a bit more friendly. In particular think we can make it easier for people to determine the correct folder by changing the line in 3.4.4.1 Customization via INI files: Two .ini files will be searched by the launcher - py.ini in the current user’s "application data" directory (i.e. the directory returned by calling the Windows function SHGetFolderPath with CSIDL_LOCAL_APPDATA) and py.ini in the same directory as the launcher. to Two .ini files will be searched by the launcher - py.ini in the current user’s "application data" directory (i.e. the directory returned by executing `echo %LOCALAPPDATA%` in a command window) and py.ini in the same directory as the launcher. %LOCALAPPDATA% should always contain the same value as would be returned from SHGetFolderPath with CSIDL_LOCAL_APPDATA. Tim Delaney

On 11/28/2013 1:04 PM, Tim Delaney wrote:
%LOCALAPPDATA% should always contain the same value as would be returned from SHGetFolderPath with CSIDL_LOCAL_APPDATA.
Except when it gets changed. Documentation should reflect the actual use in the code. If it uses the SHGetFolderPath, that is what should be documented; if it uses the environment variable, that is what should get documented. Users can easily change the environment variable (which might be a reason to use it, instead of SHGetFolderPath).

On 29 November 2013 08:34, Glenn Linderman <v+python@g.nevcal.com> wrote:
On 11/28/2013 1:04 PM, Tim Delaney wrote:
%LOCALAPPDATA% should always contain the same value as would be returned from SHGetFolderPath with CSIDL_LOCAL_APPDATA.
Except when it gets changed. Documentation should reflect the actual use in the code. If it uses the SHGetFolderPath, that is what should be documented; if it uses the environment variable, that is what should get documented. Users can easily change the environment variable (which might be a reason to use it, instead of SHGetFolderPath).
Didn't think of that - good point. Tim Delaney

On 11/28/2013 4:04 PM, Tim Delaney wrote:
I was just getting Jython working with py.exe, and I think the documentation can be made a bit more friendly. In particular think we can make it easier for people to determine the correct folder by changing the line in 3.4.4.1 Customization via INI files:
Two .ini files will be searched by the launcher - py.ini in the current user’s "application data" directory (i.e. the directory returned by calling the Windows function SHGetFolderPath with CSIDL_LOCAL_APPDATA) and py.ini in the same directory as the launcher.
to
Two .ini files will be searched by the launcher - py.ini in the current user’s "application data" directory (i.e. the directory returned by executing `echo %LOCALAPPDATA%` in a command window) and py.ini in the same directory as the launcher.
'Two .ini files will be searched by the launcher' sort of implies to me that the files exist. On my Win7 machine, echo %LOCALAPPDATA% returns C:\Users\Terry\AppData\Local. If I go to Users/Terry with Explorer, there is no AppData. (Same with admin user.) C:\Windows contains py(w).exe, but no py.ini. Clearer would be The launcher will search for py.ini in two possible places -- first in the same directory as the launcher; second in the current user's "application data" directory <whatever is said about how to find it>. I am pretty sure that order is important and that my version, not the current version, is correct. -- Terry Jan Reedy

Quoting Terry Reedy <tjreedy@udel.edu>:
'Two .ini files will be searched by the launcher' sort of implies to me that the files exist. On my Win7 machine, echo %LOCALAPPDATA% returns C:\Users\Terry\AppData\Local. If I go to Users/Terry with Explorer, there is no AppData. (Same with admin user.)
Are you sure about this? What happens if you type "%LOCALAPPDATA%" (without quotes) into the explorer's address bar? Regards, Martin

On 11/28/2013 5:35 PM, martin@v.loewis.de wrote:
Quoting Terry Reedy <tjreedy@udel.edu>:
'Two .ini files will be searched by the launcher' sort of implies to me that the files exist. On my Win7 machine, echo %LOCALAPPDATA% returns C:\Users\Terry\AppData\Local. If I go to Users/Terry with Explorer, there is no AppData. (Same with admin user.)
I initially intended to write "there is no AppData *visible*". Then I switched to my win7 admin account and there was still no AppData visible, for any user. This is unlike with XP where things not visible to 'users' become visible as admin.
What happens if you type "%LOCALAPPDATA%" (without quotes) into the explorer's address bar?
It displays C:\Users\Terry\AppData\Local on the bar and the contents in the box below. The py.ini doc might mention this as a way to get there. Thanks. -- Terry Jan Reedy

On 29 November 2013 10:59, Terry Reedy <tjreedy@udel.edu> wrote:
On 11/28/2013 5:35 PM, martin@v.loewis.de wrote:
Quoting Terry Reedy <tjreedy@udel.edu>:
'Two .ini files will be searched by the launcher' sort of implies to
me that the files exist. On my Win7 machine, echo %LOCALAPPDATA% returns C:\Users\Terry\AppData\Local. If I go to Users/Terry with Explorer, there is no AppData. (Same with admin user.)
I initially intended to write "there is no AppData *visible*". Then I switched to my win7 admin account and there was still no AppData visible, for any user. This is unlike with XP where things not visible to 'users' become visible as admin.
By default in Win7 AppData is a hidden folder - you need to go to Tools | Folder Options | View | Show hidden files, folders and drives to see it in Explorer (no matter what user you're logged in as). If the py.ini location does become defined in terms of %LOCALAPPDATA% then suggesting to use that value in the Explorer address bar would probably be the easiest way for people to get to the correct directory. Tim Delaney

On 11/28/2013 7:06 PM, Tim Delaney wrote:
By default in Win7 AppData is a hidden folder - you need to go to Tools
On my system, that is Control Panel, not Tools.
| Folder Options | View | Show hidden files, folders and drives to see it in Explorer (no matter what user you're logged in as).
Thanks, done (and another desired change made also).
If the py.ini location does become defined in terms of %LOCALAPPDATA% then suggesting to use that value in the Explorer address bar would probably be the easiest way for people to get to the correct directory.
-- Terry Jan Reedy

On 29 November 2013 13:17, Terry Reedy <tjreedy@udel.edu> wrote:
On 11/28/2013 7:06 PM, Tim Delaney wrote:
By default in Win7 AppData is a hidden folder - you need to go to Tools
On my system, that is Control Panel, not Tools.
Sorry - was referring to the Explorer "Tools" menu, which is likewise hidden by default ... so many things that I change from the defaults when setting up a Windows machine - it's become so automatic that I forget what is hidden from most users. Tim Delaney

On 29 November 2013 12:27, Tim Delaney <timothy.c.delaney@gmail.com> wrote:
On 29 November 2013 13:17, Terry Reedy <tjreedy@udel.edu> wrote:
On 11/28/2013 7:06 PM, Tim Delaney wrote:
By default in Win7 AppData is a hidden folder - you need to go to Tools
On my system, that is Control Panel, not Tools.
Sorry - was referring to the Explorer "Tools" menu, which is likewise hidden by default ... so many things that I change from the defaults when setting up a Windows machine - it's become so automatic that I forget what is hidden from most users.
Turning my Windows gaming machine back to the default settings and trying to bootstrap pip was one of the key things that got me motivated to work on PEP 453. It still astounds me that one company can both create Visual Studio, *and* make it difficult to configure a machine to be suitable for software development, but I guess that's enterprise companies for you :) Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

Nick Coghlan writes:
Turning my Windows gaming machine back to the default settings and trying to bootstrap pip was one of the key things that got me motivated to work on PEP 453. It still astounds me that one company can both create Visual Studio, *and* make it difficult to configure a machine to be suitable for software development, but I guess that's enterprise companies for you :)
Those of us who study management for a living are definitely not surprised. I recommend Robert Townsend's "Call Yourself Up" from _Up the Organization_: he advises CEOs to ring up the company's toll-free number and find out what the customers deal with. Urk! This is the "same s---, different dept", that's all. And it's a lot harder to avoid than most folks think. Kudos to Nick for "calling himself up", to python-dev for creating a language and development ecology with so few unnecessary barriers, and to Guido for setting the tone!
participants (6)
-
Glenn Linderman
-
martin@v.loewis.de
-
Nick Coghlan
-
Stephen J. Turnbull
-
Terry Reedy
-
Tim Delaney