Skip to content

DOC : sixify unichr #3131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions examples/pylab_examples/font_table_ttf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
from matplotlib.font_manager import FontProperties
from pylab import figure, table, show, axis, title

try:
unichr
except NameError:
# Python 3
unichr = chr
import six
from six import unichr

# the font table grid

Expand Down
7 changes: 2 additions & 5 deletions lib/matplotlib/backends/backend_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
import zlib

import numpy as np
from six import unichr
from six import BytesIO

if six.PY3:
from io import BytesIO
unichr = chr
else:
from cStringIO import StringIO as BytesIO
from datetime import datetime
from math import ceil, cos, floor, pi, sin
try:
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_qt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
unicode_literals)

import six

from six import unichr
import os
import re
import signal
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/backends/backend_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

import six
from six.moves import xrange
if six.PY3:
unichr = chr
from six import unichr

import os, base64, tempfile, gzip, io, sys, codecs, re

Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/mathtext.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
import six

import os, sys
if six.PY3:
unichr = chr
from six import unichr
from math import ceil
try:
set
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/tests/test_backend_qt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
unicode_literals)

import six

from six import unichr
from matplotlib import pyplot as plt
from matplotlib.testing.decorators import cleanup
from matplotlib.testing.decorators import knownfailureif
Expand Down
3 changes: 1 addition & 2 deletions lib/matplotlib/type1font.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

import six
from six.moves import filter
if six.PY3:
unichr = chr
from six import unichr

import io
import itertools
Expand Down