Re: File Name issue

2020-10-18 Thread dn via Python-list
On 19/10/2020 05:58, Mladen Gogala via Python-list wrote: On Sun, 18 Oct 2020 21:00:18 +1300, dn wrote: On 18/10/2020 12:58, Mladen Gogala via Python-list wrote: On Sat, 17 Oct 2020 22:51:11 +, Mladen Gogala wrote: BTW, I used this cp /var/log/syslog ./in-file.log #!/usr/bin/env python3 imp

Re: File Name issue

2020-10-18 Thread Mladen Gogala via Python-list
On Sun, 18 Oct 2020 21:00:18 +1300, dn wrote: > On 18/10/2020 12:58, Mladen Gogala via Python-list wrote: >> On Sat, 17 Oct 2020 22:51:11 +, Mladen Gogala wrote: >>> On Sat, 17 Oct 2020 18:12:16 -0400, Steve wrote: >>> with open("HOURLYLOG.txt", 'r') as infile: works but, when I rena

Re: File Name issue

2020-10-18 Thread Chris Angelico
On Sun, Oct 18, 2020 at 10:32 PM D'Arcy Cain wrote: > > On 10/18/20 5:55 AM, Steve wrote: > > I am not sure if what I did to repair it but the problem is gone. > > A copy/paste/rename was performed on the original code file and now I do not > > get the error. No need for "r" or "\"... > > > > WTH?

Re: File Name issue

2020-10-18 Thread D'Arcy Cain
On 10/18/20 5:55 AM, Steve wrote: I am not sure if what I did to repair it but the problem is gone. A copy/paste/rename was performed on the original code file and now I do not get the error. No need for "r" or "\"... WTH? I hate it when that happens. Could that original hyphen have been a uni

RE: File Name issue

2020-10-18 Thread Steve
uot;No it doesn't.." -Original Message- From: Python-list On Behalf Of MRAB Sent: Saturday, October 17, 2020 7:31 PM To: python-list@python.org Subject: Re: File Name issue On 2020-10-17 23:12, Steve wrote: > The line: > with open("HOURLYLOG.txt", 'r'

Re: File Name issue

2020-10-18 Thread dn via Python-list
On 18/10/2020 12:58, Mladen Gogala via Python-list wrote: On Sat, 17 Oct 2020 22:51:11 +, Mladen Gogala wrote: On Sat, 17 Oct 2020 18:12:16 -0400, Steve wrote: with open("HOURLYLOG.txt", 'r') as infile: works but, when I rename the file, the line: with open("HOURLY-LOG.txt", 'r') as infile

Re: File Name issue

2020-10-17 Thread shrimp_banana
On 10/17/20 4:12 PM, Steve wrote: > The line: > with open("HOURLYLOG.txt", 'r') as infile: > works but, when I rename the file, the line: > with open("HOURLY-LOG.txt", 'r') as infile: > does not. The complaint is: Cannot Assign to operator > > However, I have: > BPM_O2s=open("BPM-O2-Readings.txt"

Re: File Name issue

2020-10-17 Thread Mladen Gogala via Python-list
On Sat, 17 Oct 2020 22:51:11 +, Mladen Gogala wrote: > On Sat, 17 Oct 2020 18:12:16 -0400, Steve wrote: > >> with open("HOURLYLOG.txt", 'r') as infile: >> works but, when I rename the file, the line: >> with open("HOURLY-LOG.txt", 'r') as infile: >> does not. The complaint is: Cannot Assign

Re: File Name issue

2020-10-17 Thread MRAB
On 2020-10-17 23:12, Steve wrote: The line: with open("HOURLYLOG.txt", 'r') as infile: works but, when I rename the file, the line: with open("HOURLY-LOG.txt", 'r') as infile: does not. The complaint is: Cannot Assign to operator However, I have: BPM_O2s=open("BPM-O2-Readings.txt","a") And it w

Re: File Name issue

2020-10-17 Thread Mladen Gogala via Python-list
On Sat, 17 Oct 2020 18:12:16 -0400, Steve wrote: > with open("HOURLYLOG.txt", 'r') as infile: > works but, when I rename the file, the line: > with open("HOURLY-LOG.txt", 'r') as infile: > does not. The complaint is: Cannot Assign to operator Try this: with open("HOURLY\-LOG.txt", 'r') as infil

File Name issue

2020-10-17 Thread Steve
The line: with open("HOURLYLOG.txt", 'r') as infile: works but, when I rename the file, the line: with open("HOURLY-LOG.txt", 'r') as infile: does not. The complaint is: Cannot Assign to operator However, I have: BPM_O2s=open("BPM-O2-Readings.txt","a") And it works. At first, I thought the issue