I encountered a problem today. It happened when I was creating a map for one of my 2d engines and I had something that looked like:
Upon further study, I found that Octal numbers are represented by 0 then a number from 0 - 7. Since the symbol 8 and 9 don't represent anything in an octal numbering system python returns a SyntaxError: invalid token. This causes a headache for me because I need to have my maps line up under one another:
But to omit the leading "0" causes this:
To rectify the problem, I used a "." after 8 and 9 to fill up the spaces. It lines up well and if you wanted to be consistent, all your single digits can be done that way.
[01,19,07,06,9. ,00,00,00,00,00,00,8. ,00,00,00,05],
[01,00,00,01,9. ,00,00,00,00,00,00,8. ,00,00,00,05],
[01,00,00,01,11,10,10,19,12,00,00,9. ,9. ,9. ,00,05],
*NOTE* this "." fills up the spaces only on the Python Editor and basic textpad files. in Word or some other higher level format the "." is significantly smaller widthwise and will not line up with other items vertically. I've never used Word to make something like this, but I'm just sayin'.
So for those who have run into this exception and it's driving you nuts, I hope this was a help!