On 12/5/25 5:12 PM, Em wrote:
> Ok, using "Open with Python" , the program fails on both computers.
> Still, double-click the filename on the WIN10 computer and the program
> works.
> While, double-click the filename on the WIN11 computer and the program
> fails.
Here's a test script for you that will pop up a windows message box to
tell you where the file it is writing is truly located. See what it
says on the two platforms. Yes it's a few lines of code, but it will
surely tell you where the problem is.
import os
import ctypes
Starter = open("HLYlog.txt","w");
filepath = Starter.name
# following should be all on one line
ctypes.windll.user32.MessageBoxExW(None, os.path.abspath(filepath),
"True file path", 0x40000)
--
https://mail.python.org/mailman3//lists/python-list.python.org