From 1ea7c015c87fc0e890af411ea6a3b4cf9502b851 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Fri, 8 Jun 2018 20:00:36 +0200 Subject: [PATCH] codecs lib --- il65/datatypes.py | 2 +- il65/optimize.py | 1 + requirements.txt | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/il65/datatypes.py b/il65/datatypes.py index e0bbff3bf..a05d3dd44 100644 --- a/il65/datatypes.py +++ b/il65/datatypes.py @@ -78,7 +78,7 @@ def char_to_bytevalue(character: str, petscii: bool=True) -> int: # ASCII/UNICODE-to-PETSCII translation table # Unicode symbols supported that map to a PETSCII character: £ ↑ ← ♠ ♥ ♦ ♣ π ● ○ and various others -# @todo cbmcodecs pypi package? extend that with screencode codec? +# @todo cbmcodecs pypi package? ascii_to_petscii_trans = str.maketrans({ '\f': 147, # form feed becomes ClearScreen "{clear}" '\n': 13, # line feed becomes a RETURN "{cr}" (not a line feed) diff --git a/il65/optimize.py b/il65/optimize.py index 5ce0f0e0e..978bf0919 100644 --- a/il65/optimize.py +++ b/il65/optimize.py @@ -6,6 +6,7 @@ eliminates statements that have no effect, optimizes calculations etc. Written by Irmen de Jong (irmen@razorvine.net) - license: GNU GPL 3.0 """ + from typing import List, no_type_check, Union from .datatypes import DataType, VarType from .plyparse import * diff --git a/requirements.txt b/requirements.txt index 22ff5ae30..07ddbfb1f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ attrs ply -git+https://github.com/irmen/cbmcodecs.git@master +cbmcodecs >= 0.2.0 +