diff --git a/sanim.py b/sanim.py index a511ec5..0fec740 100644 --- a/sanim.py +++ b/sanim.py @@ -10,6 +10,14 @@ --------------------------- ''' +# buffer() is required for file.writestr in Python 2.x but +# is no longer required (and doesn't exist) in Python 3.x +try: + buffer +except NameError: + def buffer(data): + return data + class Frame(object): __slots__ = ('index', 'position', 'rotation')