Python 2 scanner doesn't scan unicode.
After wrestling with this for a minute I got it so that eval'ing • (bullet Unicode character) works in GUI in Py 2 & 3, and REPL Py 3, but not REPL Py 2.
Good enough.
I was wrong, it doesn't work in GUI in py 2 either.
I think the best thing is to ditch Python 2. As long as 2 compatibility was free I figured "why not?" but if it's causing problems...
This is meant to be living code.
Traceback (most recent call last): File "joy/gui/textwidget.py", line 306, in run_command self.world.interpret(command) File "joy/gui/world.py", line 134, in interpret super(StackDisplayWorld, self).interpret(command) File "joy/gui/world.py", line 98, in interpret self.dictionary, File "joy/joy.py", line 77, in run expression = text_to_expression(text) File "joy/parser.py", line 69, in text_to_expression return _parse(_tokenize(text)) File "joy/parser.py", line 83, in _tokenize tokens, rest = _scanner.scan(text) File "/usr/lib/python2.7/re.py", line 336, in scan action = action(self, m.group()) File "joy/parser.py", line 119, in <lambda> (SYMBOL, lambda _, token: Symbol(token)), UnicodeEncodeError: 'ascii' codec can't encode character u'\u2022' in position 0: ordinal not in range(128)
Python 2 scanner doesn't scan unicode.