Re: A switch somewhere, or bug? CORRECTION

Roel Schroeven <[email protected]> Fri, 5 Dec 2025 21:43:22 +0100
Newsgroups gmane.comp.python.general
Message-ID <[email protected]>
Op 5/12/2025 om 21:03 schreef Em:
> Copy that file onto a folder in a WIN10 computer
> which uses Python 3.13 and copy it again onto a folder
> in a WIN11 computer that runs Python 3.14.1
>
> Double-click the filename in the folder on the
> WIN10 computer. It executes the program and the
> text file is created.
>
> Double-click the filename in the folder on the
> WIN11 computer and it fails, no text file is created.
> No error statement is generated.
>
> The strange thing here is that, on the WIN11 computer,
> I right-click and choose "Edit with IDLE" option.  The file
> code is shown and I press F5.  The program runs properly
> and the text file is created.  Of course, IDLE does not
> show an error report on a working program.
There's probably an issue with the way Windows launches the Python 
interpreter (or tries to do so) when double-clicking the script. Perhaps 
there is no corresponding association on your Windows 11, or maybe it 
points to another interpreter.

To figure this out, open a command prompt and in it cd to the directory 
where your script is (the easiest way to do that: put your cursor in the 
address bar in Explorer, replace the whole text that was there with 
"cmd" (without the quotes), then press enter. That should open a command 
prompt with the correct working directory.

Type the filename of your script, including the extension, the press 
enter. What happens? Does this work, or is there an error? If so, what's 
the error message?

If that didn't work, type "py <filename of your script>" (without the 
quotes). What happens? Does this work, or is there an error? If so, 
what's the error message?

-- 
"The reasonable man adapts himself to the world. The unreasonable man
persists in trying to adapt the world to himself. Therefore, all
progress depends on the unreasonable man."
         -- George Bernard Shaw