Hello! I am currently working on a python script that will generate a CASIO-BASIC file to draw a sprite to the screen (code below). I generally am quite happy with how it turned out and it only took about an hour (although right now I have replaced the special characters with plain text equivalents). However, there are a few things I have no idea how to figure out that I was hoping someone more experienced could help me with. Whenever I open existing program files, I notice some kind of header code on the first line mainly comprised of unknown characters and null characters. Is there any way I can replicate this in my code? I've tried just copying it, but apparently null characters don't belong in python code. I've tried taking existing code and modifying it, but whenever I save it Visual Studio Code does some reformatting that completely messes it up and makes it unreadable by the calculator. Is there some other text editor or way I should be doing this?
If anyone could help me out and demystify this file format a bit, it would be greatly appreciated. If there is no way to do what I'm doing, please let me know. Thanks for your time!