-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix more array.tostring() removal issues in Python 3.9
Several shell.py script versions use the depreciated array.tostring() method, which has been removed in Python 3.9. I changed these instances to .tobytes(), and adjusted .ljust()'s second argument to be a byte string. I also fixed a related issue, where #flash'ing from a shell.py which assumes a 2-cell wide Forth to a non-.hex file would error because the unsigned short array returned from serialize() would be written to file with assumptions of signed short: open(dest, "wb").write(array.array("h", d).tobytes()) This would cause an overflow error. Changing "h" to "H" in that last code snippet (in swapforth.py), lines up the signdedness.
- Loading branch information
Showing
5 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters