Ralf M. wrote:

I think the problem / misunderstanding is that Gisle put in py.ini only
  [defaults]
  python=3.6

and expected this to make py -3 start 3.6. However py -3 looks for a key named 'python3' and, not finding it, uses default behaviour (ignoring the 'python' key), i.e. starts the most modern stable 3.x.

The py.ini documentation is a bit hard to find in the help file and hard to understand

I totally agree with that.

I tried the (rather insane) py.ini
  [defaults]
  python=3.7
  python2=3.8
  python4=2.7
and it works as documented (py -3 shows default behaviour as there is no 
'python3' in py.ini):

C:\>py
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 
bit(AMD64)] on win32
C:\>py -2
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit 
(AMD64)] on win32
C:\>py -3
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit 
(AMD64)] on win32
C:\>py -4
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:19:08) [MSC v.1500 32 bit 
(Intel)] on win32

Thank for confirming what I suspected. And as I wrote earlier:
  Since I'm on a 64-bit Python, a 'py -3' totally seems to ignore
  'py.ini', unless it says:
    [defaults]
    python3=3.6
    python3=3.6-32
-------

Except, I meant "Since I'm on a 64-bit Windows" and
 not "Since I'm on a 64-bit Python".
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to