Hackfut Security File Manager
Current Path:
/opt/alt/python27/lib64/python2.7/site-packages/matplotlib
opt
/
alt
/
python27
/
lib64
/
python2.7
/
site-packages
/
matplotlib
/
📁
..
📄
__init__.py
(28.29 KB)
📄
__init__.pyc
(28.75 KB)
📄
__init__.pyo
(28.69 KB)
📄
_cm.py
(361.73 KB)
📄
_cm.pyc
(100.64 KB)
📄
_cm.pyo
(100.64 KB)
📄
_cntr.so
(20.47 KB)
📄
_delaunay.so
(59.75 KB)
📄
_image.so
(276.23 KB)
📄
_mathtext_data.py
(56.63 KB)
📄
_mathtext_data.pyc
(62.3 KB)
📄
_mathtext_data.pyo
(62.3 KB)
📄
_path.so
(273.74 KB)
📄
_png.so
(152.84 KB)
📄
_pylab_helpers.py
(2.65 KB)
📄
_pylab_helpers.pyc
(3.75 KB)
📄
_pylab_helpers.pyo
(3.75 KB)
📄
afm.py
(14.74 KB)
📄
afm.pyc
(16.98 KB)
📄
afm.pyo
(16.98 KB)
📄
artist.py
(34.79 KB)
📄
artist.pyc
(40.46 KB)
📄
artist.pyo
(40.46 KB)
📄
axes.py
(273.52 KB)
📄
axes.pyc
(246.65 KB)
📄
axes.pyo
(245.56 KB)
📄
axis.py
(56.01 KB)
📄
axis.pyc
(59.43 KB)
📄
axis.pyo
(59.13 KB)
📄
backend_bases.py
(70.62 KB)
📄
backend_bases.pyc
(78.09 KB)
📄
backend_bases.pyo
(78.01 KB)
📁
backends
📄
bezier.py
(14.57 KB)
📄
bezier.pyc
(13.49 KB)
📄
bezier.pyo
(13.49 KB)
📄
blocking_input.py
(13.37 KB)
📄
blocking_input.pyc
(14.42 KB)
📄
blocking_input.pyo
(14.11 KB)
📄
cbook.py
(41.75 KB)
📄
cbook.pyc
(57.32 KB)
📄
cbook.pyo
(57.1 KB)
📄
cm.py
(7.91 KB)
📄
cm.pyc
(9.8 KB)
📄
cm.pyo
(9.8 KB)
📄
collections.py
(39.83 KB)
📄
collections.pyc
(44.05 KB)
📄
collections.pyo
(44.05 KB)
📄
colorbar.py
(26.81 KB)
📄
colorbar.pyc
(25.23 KB)
📄
colorbar.pyo
(25.23 KB)
📄
colors.py
(38.19 KB)
📄
colors.pyc
(39.74 KB)
📄
colors.pyo
(39.74 KB)
📄
contour.py
(41.89 KB)
📄
contour.pyc
(35.61 KB)
📄
contour.pyo
(35.45 KB)
📄
dates.py
(35.16 KB)
📄
dates.pyc
(40.17 KB)
📄
dates.pyo
(40.11 KB)
📁
delaunay
📄
dviread.py
(31.28 KB)
📄
dviread.pyc
(34.66 KB)
📄
dviread.pyo
(34.52 KB)
📄
figure.py
(40.3 KB)
📄
figure.pyc
(42.68 KB)
📄
figure.pyo
(42.55 KB)
📄
finance.py
(20.1 KB)
📄
finance.pyc
(18.24 KB)
📄
finance.pyo
(18.08 KB)
📄
font_manager.py
(41.65 KB)
📄
font_manager.pyc
(40.31 KB)
📄
font_manager.pyo
(40.31 KB)
📄
fontconfig_pattern.py
(6.28 KB)
📄
fontconfig_pattern.pyc
(6.55 KB)
📄
fontconfig_pattern.pyo
(6.55 KB)
📄
ft2font.so
(298.99 KB)
📄
hatch.py
(6.41 KB)
📄
hatch.pyc
(9.26 KB)
📄
hatch.pyo
(9.26 KB)
📄
image.py
(30.8 KB)
📄
image.pyc
(32.99 KB)
📄
image.pyo
(32.95 KB)
📄
legend.py
(31.54 KB)
📄
legend.pyc
(23.32 KB)
📄
legend.pyo
(23.15 KB)
📄
lines.py
(53.4 KB)
📄
lines.pyc
(56.63 KB)
📄
lines.pyo
(56.53 KB)
📄
mathtext.py
(99.62 KB)
📄
mathtext.pyc
(103.58 KB)
📄
mathtext.pyo
(103.21 KB)
📄
mlab.py
(92.08 KB)
📄
mlab.pyc
(99.53 KB)
📄
mlab.pyo
(99.35 KB)
📁
mpl-data
📄
mpl.py
(785 B)
📄
mpl.pyc
(1.16 KB)
📄
mpl.pyo
(1.16 KB)
📁
numerix
📄
nxutils.so
(9.48 KB)
📄
offsetbox.py
(29.11 KB)
📄
offsetbox.pyc
(34.01 KB)
📄
offsetbox.pyo
(33.96 KB)
📄
patches.py
(125.47 KB)
📄
patches.pyc
(130.6 KB)
📄
patches.pyo
(130.47 KB)
📄
path.py
(21.25 KB)
📄
path.pyc
(21 KB)
📄
path.pyo
(20.78 KB)
📁
projections
📄
pylab.py
(10.72 KB)
📄
pylab.pyc
(12.15 KB)
📄
pylab.pyo
(12.15 KB)
📄
pyparsing.py
(140.55 KB)
📄
pyparsing.pyc
(147.64 KB)
📄
pyparsing.pyo
(147.64 KB)
📄
pyplot.py
(80.54 KB)
📄
pyplot.pyc
(80.06 KB)
📄
pyplot.pyo
(80.06 KB)
📄
quiver.py
(36.66 KB)
📄
quiver.pyc
(33.35 KB)
📄
quiver.pyo
(33.35 KB)
📄
rcsetup.py
(22.88 KB)
📄
rcsetup.pyc
(21.02 KB)
📄
rcsetup.pyo
(20.85 KB)
📄
scale.py
(13.9 KB)
📄
scale.pyc
(19.78 KB)
📄
scale.pyo
(19.78 KB)
📁
sphinxext
📄
spines.py
(12.39 KB)
📄
spines.pyc
(11.6 KB)
📄
spines.pyo
(11.19 KB)
📄
table.py
(16.43 KB)
📄
table.pyc
(16.97 KB)
📄
table.pyo
(16.82 KB)
📄
texmanager.py
(21.94 KB)
📄
texmanager.pyc
(19.74 KB)
📄
texmanager.pyo
(19.74 KB)
📄
text.py
(58.42 KB)
📄
text.pyc
(59.27 KB)
📄
text.pyo
(59.27 KB)
📄
ticker.py
(39.48 KB)
📄
ticker.pyc
(50.94 KB)
📄
ticker.pyo
(50.81 KB)
📄
tight_bbox.py
(3.57 KB)
📄
tight_bbox.pyc
(4.06 KB)
📄
tight_bbox.pyo
(4.06 KB)
📄
transforms.py
(73.62 KB)
📄
transforms.pyc
(90.27 KB)
📄
transforms.pyo
(89.38 KB)
📄
ttconv.so
(63.95 KB)
📄
type1font.py
(11.27 KB)
📄
type1font.pyc
(11.22 KB)
📄
type1font.pyo
(11.22 KB)
📄
units.py
(4.86 KB)
📄
units.pyc
(5.78 KB)
📄
units.pyo
(5.78 KB)
📄
widgets.py
(39.88 KB)
📄
widgets.pyc
(42.59 KB)
📄
widgets.pyo
(42.4 KB)
📄
windowing.py
(454 B)
📄
windowing.pyc
(1.33 KB)
📄
windowing.pyo
(1.33 KB)
Editing: fontconfig_pattern.py
""" A module for parsing and generating fontconfig patterns. See the `fontconfig pattern specification <http://www.fontconfig.org/fontconfig-user.html>`_ for more information. """ # Author : Michael Droettboom <mdroe@stsci.edu> # License : matplotlib license (PSF compatible) # This class is defined here because it must be available in: # - The old-style config framework (:file:`rcsetup.py`) # - The traits-based config framework (:file:`mpltraits.py`) # - The font manager (:file:`font_manager.py`) # It probably logically belongs in :file:`font_manager.py`, but # placing it in any of these places would have created cyclical # dependency problems, or an undesired dependency on traits even # when the traits-based config framework is not used. import re from matplotlib.pyparsing import Literal, ZeroOrMore, \ Optional, Regex, StringEnd, ParseException, Suppress family_punc = r'\\\-:,' family_unescape = re.compile(r'\\([%s])' % family_punc).sub family_escape = re.compile(r'([%s])' % family_punc).sub value_punc = r'\\=_:,' value_unescape = re.compile(r'\\([%s])' % value_punc).sub value_escape = re.compile(r'([%s])' % value_punc).sub class FontconfigPatternParser: """A simple pyparsing-based parser for fontconfig-style patterns. See the `fontconfig pattern specification <http://www.fontconfig.org/fontconfig-user.html>`_ for more information. """ _constants = { 'thin' : ('weight', 'light'), 'extralight' : ('weight', 'light'), 'ultralight' : ('weight', 'light'), 'light' : ('weight', 'light'), 'book' : ('weight', 'book'), 'regular' : ('weight', 'regular'), 'normal' : ('weight', 'normal'), 'medium' : ('weight', 'medium'), 'demibold' : ('weight', 'demibold'), 'semibold' : ('weight', 'semibold'), 'bold' : ('weight', 'bold'), 'extrabold' : ('weight', 'extra bold'), 'black' : ('weight', 'black'), 'heavy' : ('weight', 'heavy'), 'roman' : ('slant', 'normal'), 'italic' : ('slant', 'italic'), 'oblique' : ('slant', 'oblique'), 'ultracondensed' : ('width', 'ultra-condensed'), 'extracondensed' : ('width', 'extra-condensed'), 'condensed' : ('width', 'condensed'), 'semicondensed' : ('width', 'semi-condensed'), 'expanded' : ('width', 'expanded'), 'extraexpanded' : ('width', 'extra-expanded'), 'ultraexpanded' : ('width', 'ultra-expanded') } def __init__(self): family = Regex(r'([^%s]|(\\[%s]))*' % (family_punc, family_punc)) \ .setParseAction(self._family) size = Regex(r"([0-9]+\.?[0-9]*|\.[0-9]+)") \ .setParseAction(self._size) name = Regex(r'[a-z]+') \ .setParseAction(self._name) value = Regex(r'([^%s]|(\\[%s]))*' % (value_punc, value_punc)) \ .setParseAction(self._value) families =(family + ZeroOrMore( Literal(',') + family) ).setParseAction(self._families) point_sizes =(size + ZeroOrMore( Literal(',') + size) ).setParseAction(self._point_sizes) property =( (name + Suppress(Literal('=')) + value + ZeroOrMore( Suppress(Literal(',')) + value) ) | name ).setParseAction(self._property) pattern =(Optional( families) + Optional( Literal('-') + point_sizes) + ZeroOrMore( Literal(':') + property) + StringEnd() ) self._parser = pattern self.ParseException = ParseException def parse(self, pattern): """ Parse the given fontconfig *pattern* and return a dictionary of key/value pairs useful for initializing a :class:`font_manager.FontProperties` object. """ props = self._properties = {} try: self._parser.parseString(pattern) except self.ParseException, e: raise ValueError("Could not parse font string: '%s'\n%s" % (pattern, e)) self._properties = None return props def _family(self, s, loc, tokens): return [family_unescape(r'\1', str(tokens[0]))] def _size(self, s, loc, tokens): return [float(tokens[0])] def _name(self, s, loc, tokens): return [str(tokens[0])] def _value(self, s, loc, tokens): return [value_unescape(r'\1', str(tokens[0]))] def _families(self, s, loc, tokens): self._properties['family'] = [str(x) for x in tokens] return [] def _point_sizes(self, s, loc, tokens): self._properties['size'] = [str(x) for x in tokens] return [] def _property(self, s, loc, tokens): if len(tokens) == 1: if tokens[0] in self._constants: key, val = self._constants[tokens[0]] self._properties.setdefault(key, []).append(val) else: key = tokens[0] val = tokens[1:] self._properties.setdefault(key, []).extend(val) return [] parse_fontconfig_pattern = FontconfigPatternParser().parse def generate_fontconfig_pattern(d): """ Given a dictionary of key/value pairs, generates a fontconfig pattern string. """ props = [] families = '' size = '' for key in 'family style variant weight stretch file size'.split(): val = getattr(d, 'get_' + key)() if val is not None and val != []: if type(val) == list: val = [value_escape(r'\\\1', str(x)) for x in val if x is not None] if val != []: val = ','.join(val) props.append(":%s=%s" % (key, val)) return ''.join(props)
Upload File
Create Folder