I'm tackling Dragon 32 programming - which I do know something about, seeing as my brother had one back in the day and I made a few programs on it when he was out with his mountain bike.
This handy utility supposedly converts between the .CAS format used for Dragon 32 tapes and the raw text .BAS format. It will also convert the other way, apparently, and this will be useful to me.
I've saved a very simple program as TEST.BAS:
10 PRINT "TEST"
20 GOTO 10
(yes, we all did this on a ZX81 back in the day)
It should be executed with:
python bas2cas.py test.bas test.cas
No matter what I do, whichever way round I put the .cas and .bas files (it's certainly the other way round for CAS2BAS), no matter if I put the -h and -b switches in or not for a custom header and base (no idea why I would need to do that), I get the same error:
Code: Select all
- line 55
self.report(1, f"Located program {filename}")
^
SyntaxError: invalid syntax
The "f" is something to do with a function later in the code (it says f.write(output_data) for instance), so that can't be causing the error.
It's what I would imagine to be a very short, simple block of code for an experienced programmer. It's a complete mystery to me why what is apparently perfect syntax is causing an error, and surely if it's been released on GitHub it should work, otherwise others would report to the programmer with "here's a bug and this is what it's doing and here's all the data you'd need to fix it", whereas all I can say is "it doesn't work, this is what it says, why doesn't it work?"
It is at times like this I realise that I am not, and never will be, a programmer. At least, not outside our own little happy colour-clashing world. So no "HERP DERP GIT GUD SCRUB" business. I have four days to do what I need to do, not four years to learn Python programming.