• Winodws10 Command Prompt unresponsive to .py commands

    From Thomas Gregg@21:1/5 to All on Tue Mar 7 14:31:10 2023
    Hi, I got python 11 to work with the esptool a few days ago. However, I
    must have something wrong, because now, when I enter any command with .py, Windows Command Prompt just returns without doing anything. Example

    C:\Users\gregg>esptool.py version

    C:\Users\gregg>

    I tried to change the Windows default by filetype. but no luck. Any
    ideas? Thanks

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Dewhirst@21:1/5 to All on Wed Mar 8 16:46:52 2023
    This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------YZZ0c887vI1zsr5jV30oB025
    Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64

    T24gOC8wMy8yMDIzIDY6MzEgYW0sIFRob21hcyBHcmVnZyB3cm90ZToNCj4gSGksICBJIGdv dCBweXRob24gMTEgdG8gd29yayB3aXRoIHRoZSBlc3B0b29sIGEgZmV3IGRheXMgYWdvLiAg SG93ZXZlciwgSQ0KPiBtdXN0IGhhdmUgc29tZXRoaW5nIHdyb25nLCBiZWNhdXNlIG5vdywg d2hlbiBJIGVudGVyIGFueSBjb21tYW5kIHdpdGggLnB5LA0KPiBXaW5kb3dzIENvbW1hbmQg UHJvbXB0IGp1c3QgcmV0dXJucyB3aXRob3V0IGRvaW5nIGFueXRoaW5nLiAgRXhhbXBsZQ0K Pg0KPiBDOlxVc2Vyc1xncmVnZz5lc3B0b29sLnB5IHZlcnNpb24NCj4NCj4gQzpcVXNlcnNc Z3JlZ2c+DQo+DQo+IEkgdHJpZWQgdG8gY2hhbmdlIHRoZSBXaW5kb3dzIGRlZmF1bHQgYnkg ZmlsZXR5cGUuIGJ1dCBubyBsdWNrLiAgQW55DQo+IGlkZWFzPyAgVGhhbmtzDQoNClByb3Zl IGl0IHdvcmtzIGluIHRoZSBjb21tYW5kIHByb21wdCBieSB1c2luZyB0aGUgZnVsbCBwYXRo IHRvIHB5dGhvbiANCmZvciBleGFtcG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 YXRlIGtleS4gSWYgeW91IGltcG9ydCBteSBwdWJsaWMga2V5IHlvdSBjYW4NCmF1dG9tYXRp Y2FsbHkgZGVjcnlwdCBteSBzaWduYXR1cmUgYW5kIGJlIHN1cmUgaXQgY2FtZSBmcm9tIG1l LiBZb3VyDQplbWFpbCBzb2Z0d2FyZSBjYW4gaGFuZGxlIHNpZ25pbmcuDQoNCg== --------------YZZ0c887vI1zsr5jV30oB025--

    -----BEGIN PGP SIGNATURE-----

    wsB5BAABCAAjFiEE/NCg7Xf1UydoVFgpGvW31BqCOLMFAmQIIUwFAwAAAAAACgkQGvW31BqCOLMC oQf/RhjUKwbxHYbD4XID8crcmP29SFkUlht6I/kaBGW/21bPISRDZnVFEqJZx/XFnVG/QlcDGVHq hWgLorfRwGfh0QtQ249xwUg2zN3U1lrUKSgXwDlMMfpyN4ogLnD3azUy4nXVQnXxL1gPKA/Z7w+y 8ZwVLmOUOV4zV11lz2kizjblIaBMdriOIb0tWdDdZDbuEEiE6iGQ2r/Ekx6S6tuJImvXD1iSivCS RgFoPWKuZfK1/8Ta2mZf/gBovsGIYqj6vwOR1eVUW0KxEntCTJQlVd/vJhNHXjxy8DTZNEjO+S/6 NIDnnZym5vTLgFEvGF36DHWAz+2A7WPiPNuVVPWU0Q==
    =olca
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Thomas Passin@21:1/5 to Thomas Gregg on Wed Mar 8 00:29:11 2023
    On 3/7/2023 2:31 PM, Thomas Gregg wrote:
    Hi, I got python 11 to work with the esptool a few days ago. However, I must have something wrong, because now, when I enter any command with .py, Windows Command Prompt just returns without doing anything. Example

    C:\Users\gregg>esptool.py version

    C:\Users\gregg>

    I tried to change the Windows default by filetype. but no luck. Any
    ideas? Thanks

    Never mind file associations for now. Just run it with Python (that is,
    the python executable program) -

    python esptool.py

    Notes:
    1. If esptool is not in the current directory then use the full path to it.
    2. Use the right name (instead of just "python") to launch your desired
    version of Python. On a standard Windows installation it will probably
    be "py" (without the quotes), or "python3.11" or "py -3.11". But it
    might possibly be just "python". You will have to try it to see.

    If you ever do decide you want to run Python programs using file
    associations, you can read up on how to get them working.

    Probably the easiest way to get a file association set up is to open the
    File Explorer and navigate to some directory that has a .py file. Right
    click on that file and choose OpenWith. Then click on "Choose another
    app". This will open a dialog that will let you navigate to your Python executable program and assign it to run all .py files.

    I don't really recommend setting up and depending on a file association, though. That's because it can be a problem if and when you end up with
    more than one version of Python on your computer. Sometimes you want to
    use one version to run a Python file, sometimes another. It's hard to
    make that work if you run them using file associations.

    Also if anything goes wrong, you probably will not see the error messages.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Barry@21:1/5 to All on Wed Mar 8 07:46:51 2023
    On 8 Mar 2023, at 05:55, Mike Dewhirst <miked@dewhirst.com.au> wrote:

    On 8/03/2023 6:31 am, Thomas Gregg wrote:
    Hi, I got python 11 to work with the esptool a few days ago. However, I
    must have something wrong, because now, when I enter any command with .py, >> Windows Command Prompt just returns without doing anything. Example

    C:\Users\gregg>esptool.py version

    C:\Users\gregg>

    I tried to change the Windows default by filetype. but no luck. Any
    ideas? Thanks

    Prove it works in the command prompt by using the full path to python for example,

    C:\Python311\python C:\Users\gregg>esptool.py version

    On windows use the py.exe command rather then python.exe.

    Does `py esptool.py version’

    If that works, look at your path environment variables and see where python is sitting. Substitute the real location of Python 3.11 on your machine. Sadly, I think it defaults to C:\Program Files nowadays.

    Once you can get Python working by omitting the path, for example,

    C:\Users\gregg>python esptool.py version

    ... you can then right-click the .py file and choose whichever program you like to open with.

    Use py.exe which should in the windows folder to run .py files.

    Barry

    I'm inclined to advise you to focus on getting virtual environments working next and leave all that auto-opening to later. You might find you prefer to right click and select every time.

    M

    --
    Signed email is an absolute defence against phishing. This email has
    been signed with my private key. If you import my public key you can automatically decrypt my signature and be sure it came from me. Your
    email software can handle signing.

    --
    https://mail.python.org/mailman/listinfo/python-list

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)