sympy/sympy — pull request #943 by goodok (2012-01-08 08:14:49+00:00)
Title: Fixe failures for a Python3/windows platform.

This pull request rebased with previous ones (PR 935 and PR 941). So it is solid and there must be no interfered errors.

The fixes are:

- use2to3: handle pathes correctly (use os.path.normpath).

- doctest and test: handle an output of failures in python3/windows terminal, to do not interrupt with encodings problems.

The method for it is rough: do not analyze what terminal encoding is indeed and whether it is possible to show the unicode symbols with the current terminal fonts - just use 'raw_unicode_escape' to show the unicode strings not as the symbols but as simple representation with '\uXXXX' symbols.

- doctest and test: read files with utf-8 encoding.

One remark about 'execfile': the standard '2to3' replaces it by 'exec(compile(open', but without encoding. I just add 'if ... else' statement to handle python3/windows and explicitly write similar code for this case, but with encoding.