Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread MRAB
On 05/12/2025 05:47, Em wrote: -Original Message- From: MRAB Sent: Thursday, December 4, 2025 10:52 PM To: [email protected] Subject: Re: A switch somewhere, or bug? CORRECTION On 04/12/2025 18:25, Em wrote: Two computers, both alike in dignity, in fair windows land, where we set

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Michael Torrie via Python-list
On 12/4/25 10:47 PM, Em wrote: >> Starter = open("HLYlog.txt", "w") >> >> Thoughts appreciated. > > -That's a relative path. Are you sure that the current working directory is > what > -you expect? It's generally better to work with absolute paths. > > Relative or not, I can't see how that could

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Roel Schroeven
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 create

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Michael Torrie via Python-list
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

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Thomas Passin
On 12/5/2025 3:03 PM, Em wrote: Alright, Alright, Alright... Alright. These responses push much more sophisticated explanations than the question asked. This involves only one line of code that creates an empty text file. No other code is involved or needed. Before responding, please run this

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Thomas Passin
On 12/5/2025 10:33 PM, MRAB wrote: On 06/12/2025 00:52, Thomas Passin wrote: On 12/5/2025 7: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 th

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Michael Torrie via Python-list
On 12/5/25 6:36 PM, Chris Angelico via Python-list wrote: > On Sat, 6 Dec 2025 at 12:33, Michael Torrie via Python-list > wrote: >> Starter = open("HLYlog.txt","w"); >> filepath = Starter.name > > Isn't that just... > > filepath = "HLYlog.txt" yup. But did you miss the os.path.abspath() bit?

RE: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Em
Alright, Alright, Alright... Alright. These responses push much more sophisticated explanations than the question asked. This involves only one line of code that creates an empty text file. No other code is involved or needed. Before responding, please run this test: Create a .py file that cont

RE: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Em
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. -Original Message- From: Thomas Passin Sent: Friday, December 5,

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Thomas Passin
On 12/5/2025 7: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. Then set up the file association for .p

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread MRAB
On 06/12/2025 00:52, Thomas Passin wrote: On 12/5/2025 7: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 fai

Re: A switch somewhere, or bug? CORRECTION

2025-12-05 Thread Chris Angelico via Python-list
On Sat, 6 Dec 2025 at 12:33, Michael Torrie via Python-list wrote: > Starter = open("HLYlog.txt","w"); > filepath = Starter.name Isn't that just... filepath = "HLYlog.txt" ? ChrisA -- https://mail.python.org/mailman3//lists/python-list.python.org