text
stringlengths
0
2.53M
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from pysilhouette.command import Command class DummyCommand(Command): def process(self): import time for x in range(0, 10): time.sleep(1) self.up_progress(10) return True if __name__ == "__main__": dc = DummyCommand() sys.exit(dc.run())
""" Copyright (c) 2013-2014 Heiko Strathmann All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the author. """ from numpy import asarray, log, sum import numpy from numpy.matlib import repmat from numpy.random import rand from kameleon_mcmc.distribution.Distribution import Distribution, Sample class Bernoulli(Distribution): def __init__(self, ps): if not type(ps) is numpy.ndarray: raise TypeError("Probability vector must be a numpy array") Distribution.__init__(self, len(ps)) if not len(ps) > 0: raise ValueError("Probability vector must contain at least one element") if not all(ps > 0) and all(ps < 1): raise ValueError("Probability vector must lie in (0,1)") self.ps = ps def __str__(self): s = self.__class__.__name__ + "=[" s += "ps=" + str(self.ps) s += ", " + Distribution.__str__(self) s += "]" return s def sample(self, n=1): if not type(n) is int: raise TypeError("Number of samples must be integer") if n <= 0: raise ValueError("Number of samples (%d) needs to be positive", n) r = rand(n, self.dimension) s = asarray(r <= self.ps, dtype=bool) return Sample(s) def log_pdf(self, X): if not type(X) is numpy.ndarray: raise TypeError("X must be a numpy array") if not len(X.shape) is 2: raise TypeError("X must be a 2D numpy array") # this also enforce correct data ranges if X.dtype != numpy.bool8: raise ValueError("X must be a bool8 numpy array") if not X.shape[1] == self.dimension: raise ValueError("Dimension of X does not match own dimension") result = repmat(self.ps, len(X), 1) idx = X == 0 result[idx] = 1 - result[idx] return sum(log(result), 1)
""" This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Written (W) 2013-2014 Heiko Strathmann Written (W) 2013 Dino Sejdinovic """ from numpy.lib.twodim_base import eye from numpy.ma.core import zeros import os import sys from kameleon_mcmc.distribution.Banana import Banana from kameleon_mcmc.experiments.SingleChainExperiment import SingleChainExperiment from kameleon_mcmc.kernel.GaussianKernel import GaussianKernel from kameleon_mcmc.mcmc.MCMCChain import MCMCChain from kameleon_mcmc.mcmc.MCMCParams import MCMCParams from kameleon_mcmc.mcmc.output.StatisticsOutput import StatisticsOutput from kameleon_mcmc.mcmc.samplers.GMMMetropolis import GMMMetropolis from kameleon_mcmc.mcmc.samplers.StandardMetropolis import StandardMetropolis if __name__ == "__main__": experiment_dir = ( str(os.path.abspath(sys.argv[0])).split(os.sep)[-1].split(".")[0] + os.sep ) distribution = Banana(dimension=8, bananicity=0.1, V=100) burnin = 40000 num_iterations = 80000 mcmc_sampler = GMMMetropolis( distribution, num_components=10, num_sample_discard=500, num_samples_gmm=1000, num_samples_when_to_switch=10000, num_runs_em=10, ) # mean_est = zeros(distribution.dimension, dtype="float64") # cov_est = 1.0 * eye(distribution.dimension) # cov_est[0, 0] = distribution.V # mcmc_sampler = AdaptiveMetropolisLearnScale(distribution, mean_est=mean_est, cov_est=cov_est) # mcmc_sampler = AdaptiveMetropolis(distribution, mean_est=mean_est, cov_est=cov_est) # mcmc_sampler = StandardMetropolis(distribution) start = zeros(distribution.dimension, dtype="float64") mcmc_params = MCMCParams(start=start, num_iterations=num_iterations, burnin=burnin) mcmc_chain = MCMCChain(mcmc_sampler, mcmc_params) mcmc_chain.append_mcmc_output(StatisticsOutput()) experiment = SingleChainExperiment(mcmc_chain, experiment_dir) experiment.run()
""" This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. Written (W) 2013 Heiko Strathmann """ from kameleon_mcmc.distribution.Gaussian import Gaussian from kameleon_mcmc.experiments.SingleChainExperiment import SingleChainExperiment from kameleon_mcmc.gp.GPData import GPData from kameleon_mcmc.gp.mcmc.PseudoMarginalHyperparameterDistribution import ( PseudoMarginalHyperparameterDistribution, ) from kameleon_mcmc.kernel.GaussianKernel import GaussianKernel from kameleon_mcmc.mcmc.MCMCChain import MCMCChain from kameleon_mcmc.mcmc.MCMCParams import MCMCParams from kameleon_mcmc.mcmc.output.PlottingOutput import PlottingOutput from kameleon_mcmc.mcmc.output.StatisticsOutput import StatisticsOutput from kameleon_mcmc.mcmc.samplers.AdaptiveMetropolisLearnScale import ( AdaptiveMetropolisLearnScale, ) from kameleon_mcmc.mcmc.samplers.KameleonWindowLearnScale import ( KameleonWindowLearnScale, ) from kameleon_mcmc.mcmc.samplers.StandardMetropolis import StandardMetropolis from numpy.lib.twodim_base import eye from numpy.linalg.linalg import cholesky from numpy.ma.core import mean, ones, shape, asarray, std, zeros from numpy.ma.extras import cov from numpy.random import permutation, seed from scipy.linalg.basic import solve_triangular import os import sys if __name__ == "__main__": # load data data, labels = GPData.get_madelon_data() # throw away some data n = 750 seed(1) idx = permutation(len(data)) idx = idx[:n] data = data[idx] labels = labels[idx] # normalise dataset data -= mean(data, 0) data /= std(data, 0) dim = shape(data)[1] # prior on theta and posterior target estimate theta_prior = Gaussian(mu=0 * ones(dim), Sigma=eye(dim) * 5) target = PseudoMarginalHyperparameterDistribution( data, labels, n_importance=500, prior=theta_prior, ridge=1e-3 ) # create sampler burnin = 5000 num_iterations = burnin + 50000 kernel = GaussianKernel(sigma=8.0) sampler = KameleonWindowLearnScale(target, kernel, stop_adapt=burnin) # sampler=AdaptiveMetropolisLearnScale(target) # sampler=StandardMetropolis(target) # posterior mode derived by initial tests start = zeros(dim) params = MCMCParams(start=start, num_iterations=num_iterations, burnin=burnin) # create MCMC chain chain = MCMCChain(sampler, params) chain.append_mcmc_output(StatisticsOutput(print_from=0, lag=100)) # chain.append_mcmc_output(PlottingOutput(plot_from=0, lag=500)) # create experiment instance to store results experiment_dir = ( str(os.path.abspath(sys.argv[0])).split(os.sep)[-1].split(".")[0] + os.sep ) experiment = SingleChainExperiment(chain, experiment_dir) experiment.run() sigma = GaussianKernel.get_sigma_median_heuristic(experiment.mcmc_chain.samples.T) print("median kernel width", sigma)
""" Copyright (c) 2014 Heiko Strathmann, Dino Sejdinovic All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the author. """ from kameleon_mcmc.distribution.full_conditionals.FullConditionals import ( FullConditionals, ) from kameleon_mcmc.mcmc.samplers.MCMCSampler import MCMCSampler class Gibbs(MCMCSampler): """ Gibbs sampler for arbitrary sets of full conditional distributions """ def __init__(self, full_conditionals): if not isinstance(full_conditionals, FullConditionals): raise TypeError("Gibbs require full conditional distribution instance") MCMCSampler.__init__(self, full_conditionals) # pdf is constant, and therefore symmetric self.is_symmetric = True def __str__(self): s = self.__class__.__name__ + "=[" s += MCMCSampler.__str__(self) s += "]" return s def construct_proposal(self, y): """ Returns a distribution object that represents the current full conditional of one random variable """ return self.distribution def adapt(self, mcmc_chain, step_output): """ Nothing for this one since conditionals are fixed """ pass
""" Copyright (c) 2013-2014 Heiko Strathmann All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the author. """ from numpy import zeros, ones, asarray import numpy from numpy.random import rand, randint import unittest from kameleon_mcmc.distribution.Distribution import Sample from kameleon_mcmc.distribution.proposals.AddDelSwapProposal import AddDelSwapProposal class AddDelSwapProposalUnitTest(unittest.TestCase): def test_contructor_wrong_mu_type_float(self): mu = 0 spread = 1.0 self.assertRaises(TypeError, AddDelSwapProposal, mu, spread) def test_contructor_wrong_mu_type_none(self): mu = None spread = 1.0 self.assertRaises(TypeError, AddDelSwapProposal, mu, spread) def test_contructor_wrong_mu_dim_too_large(self): mu = zeros((1, 2), dtype=numpy.bool8) spread = 1.0 self.assertRaises(ValueError, AddDelSwapProposal, mu, spread) def test_contructor_wrong_mu_dimension_0(self): mu = zeros(0, dtype=numpy.bool8) spread = 1.0 self.assertRaises(ValueError, AddDelSwapProposal, mu, spread) def test_contructor_wrong_spread_type_int(self): mu = zeros(2, dtype=numpy.bool8) spread = 1 self.assertRaises(TypeError, AddDelSwapProposal, mu, spread) def test_contructor_wrong_spread_type_none(self): mu = zeros(2, dtype=numpy.bool8) spread = None self.assertRaises(TypeError, AddDelSwapProposal, mu, spread) def test_contructor_wrong_spread_range_0(self): mu = ones(2, dtype=numpy.bool8) spread = 0.0 self.assertRaises(ValueError, AddDelSwapProposal, mu, spread) def test_contructor_wrong_spread_range_1(self): mu = ones(2, dtype=numpy.bool8) spread = 1.0 self.assertRaises(ValueError, AddDelSwapProposal, mu, spread) def test_contructor_correct_mu(self): mu = ones(2, dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertTrue(mu is dist.mu) def test_contructor_correct_spread(self): mu = ones(2, dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertEqual(spread, dist.spread) # def test_sample_wrong_n_sameller_zero(self): mu = randint(0, 2, 10).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertRaises(ValueError, dist.sample, -1) def test_sample_wrong_n_type_none(self): mu = randint(0, 2, 10).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertRaises(TypeError, dist.sample, None) def test_sample_wrong_n_type_float(self): mu = randint(0, 2, 10).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertRaises(TypeError, dist.sample, float(1.0)) def test_sample_type(self): mu = randint(0, 2, 10).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) s = dist.sample(1) self.assertTrue(isinstance(s, Sample)) def test_sample_samples_dtype(self): mu = randint(0, 2, 10).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) s = dist.sample(1) self.assertEqual(s.samples.dtype, numpy.bool8) def test_sample_dim(self): n = 3 d = 2 mu = randint(0, 2, d).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) s = dist.sample(n) self.assertEqual(s.samples.shape, (n, d)) def test_sample_many_no_checks(self): num_runs = 1 for _ in range(num_runs): n = randint(1, 10) d = 10 mu = randint(0, 2, d).astype(numpy.bool8) # print 'mu=' # print mu spread = rand() dist = AddDelSwapProposal(mu, spread) sample = dist.sample(n) # def test_log_pdf_wrong_type_none(self): d = 2 mu = randint(0, 2, d).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertRaises(TypeError, dist.log_pdf, None) def test_log_pdf_wrong_type_float(self): d = 2 mu = randint(0, 2, d).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertRaises(TypeError, dist.log_pdf, float(1.0)) def test_log_pdf_wrong_array_dimension_1(self): d = 2 mu = randint(0, 2, d).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertRaises(TypeError, dist.log_pdf, zeros(1)) def test_log_pdf_wrong_array_dimension_3(self): d = 2 mu = randint(0, 2, d).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertRaises(TypeError, dist.log_pdf, zeros(3)) def test_log_pdf_wrong_dimension(self): d = 2 mu = randint(0, 2, d).astype(numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) self.assertRaises(ValueError, dist.log_pdf, zeros((1, 3))) def test_log_pdf_type(self): mu = asarray([0], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[0]], dtype=numpy.bool8) self.assertEqual(type(dist.log_pdf(X)), numpy.ndarray) def test_log_pdf_returned_array_dimension_1d_X(self): n = 1 mu = asarray([0], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[0]], dtype=numpy.bool8) self.assertEqual(dist.log_pdf(X).shape, (n,)) def test_log_pdf_returned_array_dimension_2d_X(self): n = 1 mu = asarray([0, 0], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[0, 1]], dtype=numpy.bool8) self.assertEqual(dist.log_pdf(X).shape, (n,)) def test_log_pdf_returned_array_dimension_multiple_X_1d(self): n = 2 mu = asarray([0], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[1], [0]], dtype=numpy.bool8) self.assertEqual(dist.log_pdf(X).shape, (n,)) def test_log_pdf_returned_array_dimension_multiple_X_2d(self): n = 2 mu = asarray([0, 1], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[1, 0], [0, 0]], dtype=numpy.bool8) self.assertEqual(dist.log_pdf(X).shape, (n,)) def test_log_pdf_1n_1d_add(self): mu = asarray([0], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[1]], dtype=numpy.bool8) result = dist.log_pdf(X) expected = zeros(1) + numpy.nan # self.assertAlmostEqual(norm(result - expected), 0) def test_log_pdf_1n_1d_swap(self): mu = asarray([1], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[1]], dtype=numpy.bool8) result = dist.log_pdf(X) expected = zeros(1) + numpy.nan # self.assertAlmostEqual(norm(result - expected), 0) def test_log_pdf_1n_1d_del(self): mu = asarray([1], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[0]], dtype=numpy.bool8) result = dist.log_pdf(X) expected = zeros(1) + numpy.nan # self.assertAlmostEqual(norm(result - expected), 0) def test_log_pdf_2n_1d_add(self): mu = asarray([0], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[1], [0]], dtype=numpy.bool8) result = dist.log_pdf(X) expected = zeros(2) + numpy.nan # self.assertAlmostEqual(norm(result - expected), 0) def test_log_pdf_1n_2d(self): mu = asarray([0, 1], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[1, 1]], dtype=numpy.bool8) result = dist.log_pdf(X) expected = zeros(1) + numpy.nan # self.assertAlmostEqual(norm(result - expected), 0) def test_log_pdf_2n_2d(self): mu = asarray([0, 1], dtype=numpy.bool8) spread = 0.5 dist = AddDelSwapProposal(mu, spread) X = asarray([[1, 1], [0, 1]], dtype=numpy.bool8) result = dist.log_pdf(X) expected = zeros(2) + numpy.nan # self.assertAlmostEqual(norm(result - expected), 0) if __name__ == "__main__": unittest.main()
""" Created on Oct 28, 2015 @author: kashefy """ from nose.tools import ( assert_equals, assert_is_instance, assert_list_equal, assert_greater, assert_in, assert_almost_equal, assert_not_in, ) import numpy as np from balance import Balancer, CLNAME_OTHER class TestBalancer: def setup(self): # generate fake data num_examples = 70 num_feats = 33 num_classes = 9 # EXCLUDING other class self.x = np.random.randn(num_examples, num_feats) self.cl = np.random.randint(0, num_classes, size=(num_examples)) self.l = np.zeros((num_examples, num_classes)) self.l[list(range(num_examples)), self.cl] = 1 def test_get_class_count_other_default(self): counts = Balancer(np.copy(self.l)).get_class_count(other_clname=CLNAME_OTHER) assert_in(CLNAME_OTHER, list(counts.keys())) def test_get_class_count_other_empty(self): other_clname = "other_class_bin" counts = Balancer(np.copy(self.l)).get_class_count(other_clname=other_clname) assert_is_instance(counts, dict, "Unexpected return instance type.") assert_equals( len(list(counts.keys())), self.l.shape[-1] + 1, "Expecting a key for each class + 1 for 'other'.", ) assert_in(other_clname, list(counts.keys())) for key in list(counts.keys()): if key == other_clname: assert_equals(counts[key], 0, "Unexpected count for 'other' class") else: assert_equals( counts[key], np.sum(self.l[:, int(key)]), "Unexpected count for class '%s'" % (key,), ) def test_get_class_count_other_non_empty(self): other_clname = "foo" n, num_classes = self.l.shape # append label vector for 'other' class labls = np.vstack((self.l, np.zeros((n * 2, num_classes), dtype=self.l.dtype))) counts = Balancer(labls).get_class_count(other_clname=other_clname) assert_is_instance(counts, dict, "Unexpected return instance type.") assert_equals( len(list(counts.keys())), self.l.shape[-1] + 1, "Expecting a key for each class + 1 for 'other'.", ) assert_in(other_clname, list(counts.keys())) for key in list(counts.keys()): if key == other_clname: assert_equals( counts[key], n * 2, "Unexpected count for '%s' class" % (other_clname,), ) else: assert_equals( counts[key], np.sum(self.l[:, int(key)]), "Unexpected count for class '%s'" % (key,), ) def test_get_class_count_no_other(self): counts = Balancer(np.copy(self.l)).get_class_count(other_clname=None) assert_is_instance(counts, dict, "Unexpected return instance type.") assert_list_equal( list(counts.keys()), list(range(self.l.shape[-1])), "Expecting a key for each class.", ) for key in list(counts.keys()): assert_equals( counts[key], np.sum(self.l[:, int(key)]), "Unexpected count for class '%s'" % (key,), ) assert_greater(np.sum(list(counts.values())), 0) class TestBalancerBalanceIdxs: def setup(self): # generate fake data num_examples = 100 num_classes = 2 # EXCLUDING other class self.l = np.zeros((num_examples, num_classes)) self.l[0:10, 0] = 1 self.l[10:60, 1] = 1 def test_get_idxs_to_balance_class_count_other_not_highest(self): bal = Balancer(np.copy(self.l)) counts = bal.get_class_count(other_clname=CLNAME_OTHER) assert_in(CLNAME_OTHER, list(counts.keys())) assert_equals(counts[0], 10) assert_equals(counts[1], 50) assert_equals(counts[CLNAME_OTHER], 40) tolerance_order = 1 idxs = bal.get_idxs_to_balance_class_count(list(counts.values())) assert_almost_equal( np.count_nonzero(np.logical_and(idxs >= 0, idxs < 10)), 10 + (50 - 10), tolerance_order, ) assert_equals(np.count_nonzero(np.logical_and(idxs >= 10, idxs < 60)), 50, 1) assert_almost_equal( np.count_nonzero(idxs >= 60), 40 + (50 - 40), tolerance_order ) def test_get_idxs_to_balance_class_count_other_highest(self): self.l[10:60, 1] = 0 self.l[10:30, 1] = 1 bal = Balancer(np.copy(self.l)) counts = bal.get_class_count(other_clname=CLNAME_OTHER) assert_in(CLNAME_OTHER, list(counts.keys())) assert_equals(counts[0], 10) assert_equals(counts[1], 20) assert_equals(counts[CLNAME_OTHER], 70) assert_equals( counts[CLNAME_OTHER], np.max(list(counts.values())), "this test requires class count for %s to be highest!", ) tolerance_order = 1 idxs = bal.get_idxs_to_balance_class_count(list(counts.values())) assert_almost_equal( np.count_nonzero(np.logical_and(idxs >= 0, idxs < 10)), 10 + (70 - 10), tolerance_order, ) assert_almost_equal( np.count_nonzero(np.logical_and(idxs >= 10, idxs < 30)), 20 + (70 - 20), tolerance_order, ) assert_equals(np.count_nonzero(idxs >= 30), 70, tolerance_order) def test_get_idxs_to_balance_class_count_no_other(self): new_col = np.zeros((len(self.l), 1)) labls = np.hstack((self.l, new_col)) labls[60:, -1] = 1 bal = Balancer(labls) counts = bal.get_class_count(other_clname=None) assert_not_in(CLNAME_OTHER, list(counts.keys())) assert_equals(counts[0], 10) assert_equals(counts[1], 50) assert_equals(counts[2], 40) tolerance_order = 1 idxs = bal.get_idxs_to_balance_class_count(list(counts.values())) assert_almost_equal( np.count_nonzero(np.logical_and(idxs >= 0, idxs < 10)), 10 + (50 - 10), tolerance_order, ) assert_equals(np.count_nonzero(np.logical_and(idxs >= 10, idxs < 60)), 50, 1) assert_almost_equal( np.count_nonzero(idxs >= 60), 40 + (50 - 40), tolerance_order )
""" Created on Jan 21, 2016 @author: kashefy """ from google.protobuf import text_format import caffe from caffe import layers as L from caffe import params as P from caffe.proto.caffe_pb2 import NetParameter, LayerParameter import nideep.proto.proto_utils as pu def stack(net, level): n = pu.copy_net_params(net) enc_prev = None dec_prev = None enc = None dec = None for l in n.layer: if l.name.lower().endswith("encode%03dneuron" % (level - 1)): enc = pu.copy_msg(l, LayerParameter) for b in list(enc.bottom): l.bottom.remove(b) for t in list(l.top): l.bottom.append( str(t) ) # preserve order of layer bottoms, label as bottom has to come last elif l.name.lower().endswith("decode%03dneuron" % (level - 1)): dec_prev = l dec = pu.copy_msg(l, LayerParameter) enc.name = "encode%03dneuron" % level dec.name = "encode%03dneuron" % level return n def base_ae(src_train, src_test): n = caffe.NetSpec() n.data = L.Data( batch_size=100, backend=P.Data.LMDB, source=src_train, transform_param=dict(scale=0.0039215684), ntop=1, include=[dict(phase=caffe.TRAIN)], ) n.data_test = L.Data( batch_size=100, backend=P.Data.LMDB, source=src_test, transform_param=dict(scale=0.0039215684), ntop=1, include=[dict(phase=caffe.TEST)], ) n.flatdata = L.Flatten(n.data) n.encode001 = L.InnerProduct( n.data, num_output=64, param=[dict(lr_mult=1, decay_mult=1), dict(lr_mult=1, decay_mult=0)], weight_filler=dict(type="gaussian", std=1, sparse=15), bias_filler=dict(type="constant", value=0), ) n.encode001neuron = L.Sigmoid(n.encode001, in_place=True) n.decode001 = L.InnerProduct( n.encode001neuron, num_output=3072, param=[dict(lr_mult=1, decay_mult=1), dict(lr_mult=1, decay_mult=0)], weight_filler=dict(type="gaussian", std=1, sparse=15), bias_filler=dict(type="constant", value=0), ) n.loss_x_entropy = L.SigmoidCrossEntropyLoss( n.decode001, n.flatdata, loss_weight=[1] ) n.decode001neuron = L.Sigmoid(n.decode001, in_place=False) n.loss_l2 = L.EuclideanLoss(n.decode001neuron, n.flatdata, loss_weight=[0]) n_proto = n.to_proto() # fix data layer for test phase for l in n_proto.layer: if l.type.lower() == "data" and [x.phase for x in l.include] == [caffe.TEST]: for t in list(l.top): l.top.remove(t) t = t.split("_test")[0] l.top.append(str(t)) l.name = l.name.split("_test")[0] return n_proto if __name__ == "__main__": src_train = "/home/kashefy/data/cifar10/cifar10_train_lmdb" src_test = "/home/kashefy/data/cifar10/cifar10_test_lmdb" n = base_ae(src_train, src_test) s = text_format.MessageToString(n) # print s stack(n, 2) pass
class VykedServiceException(Exception): """ To be subclassed by service level exceptions and indicate exceptions that are to be handled at the service level itself. These exceptions shall not be counted as errors at the macroscopic level. eg: record not found, invalid parameter etc. """ class VykedServiceError(Exception): """ Unlike VykedServiceExceptions these will be counted as errors and must only be used when a service encounters an error it couldn't handle at its level. eg: client not found, database disconnected. """ class VykedException(Exception): pass class RequestException(Exception): pass class ClientException(Exception): pass class ClientNotFoundError(ClientException): pass class ClientDisconnected(ClientException): pass
import os import zipfile import fnmatch import matplotlib.image as mpimg import numpy as np from scipy.misc import imresize import matplotlib.pyplot as plt import tables def load_color(random_seed=123522): data_path = ((__file__)[0], 'data') if (not (data_path)): (data_path) dataset = 'train.zip' data_file = (data_path, dataset) if (data_file): dataset = data_file if (not (data_file)): try: import urllib.request, urllib.parse, urllib.error ('http://google.com') except AttributeError: import urllib.request as urllib url = 'https://dl.dropboxusercontent.com/u/15378192/train.zip' (('Downloading data from %s' % url)) (url, data_file) data_dir = (data_path, 'cvd') if (not (data_dir)): (data_dir) zf = (data_file) (data_dir) data_file = (data_path, 'cvd_color.hdf5') label_file = (data_path, 'cvd_color_labels.npy') if (not (data_file)): ('... loading data') cat_matches = [] dog_matches = [] for (root, dirname, filenames) in (data_dir): for filename in (filenames, 'cat*'): ((root, filename)) for filename in (filenames, 'dog*'): ((root, filename)) sort_key = (lambda x: (('.')[(- 2)])) cat_matches = (cat_matches) dog_matches = (dog_matches) def square(X): resize_shape = (64, 64) slice_size = (48, 48) slice_left = ((resize_shape[0] - slice_size[0]) / 2) slice_upper = ((resize_shape[1] - slice_size[1]) / 2) return ('float32') matches = (cat_matches + dog_matches) matches = (matches) random_state = (random_seed) idx = ((matches)) c = ([0] * (cat_matches)) d = ([1] * (dog_matches)) y = ('int32') matches = matches[idx] y = y[idx] compression_filter = () h5_file = (data_file) example = ((matches[0])) image_storage = (h5_file.root, 'images', ()) for (n, f) in (matches): (('Processing image %i of %i' % (n, (matches)))) X = ('float32') (X[None]) () (label_file, y) h5_file = (data_file) X_s = h5_file.root.images y_s = (label_file) return (X_s, y_s) def load_gray(random_seed=123522): data_path = ((__file__)[0], 'data') if (not (data_path)): (data_path) dataset = 'train.zip' data_file = (data_path, dataset) if (data_file): dataset = data_file if (not (data_file)): try: import urllib.request, urllib.parse, urllib.error ('http://google.com') except AttributeError: import urllib.request as urllib url = 'https://dl.dropboxusercontent.com/u/15378192/train.zip' (('Downloading data from %s' % url)) (url, data_file) data_dir = (data_path, 'cvd') if (not (data_dir)): (data_dir) zf = (data_file) (data_dir) data_file = (data_path, 'cvd_gray.npy') label_file = (data_path, 'cvd_gray_labels.npy') if (not (data_file)): ('... loading data') cat_matches = [] dog_matches = [] for (root, dirname, filenames) in (data_dir): for filename in (filenames, 'cat*'): ((root, filename)) for filename in (filenames, 'dog*'): ((root, filename)) sort_key = (lambda x: (('.')[(- 2)])) cat_matches = (cat_matches) dog_matches = (dog_matches) def square_and_gray(X): gray_consts = ([[0.299], [0.587], [0.144]]) return () X_cat = ([((f)) for f in cat_matches]) y_cat = (((X_cat),)) X_dog = ([((f)) for f in dog_matches]) y_dog = (((X_dog),)) X = ('float32') y = ('int32') (data_file, X) (label_file, y) else: X = (data_file) y = (label_file) random_state = (random_seed) idx = ((X)) X_s = ((X), (- 1)) y_s = y[idx] train_x = X_s[:20000] valid_x = X_s[20000:22500] test_x = X_s[22500:] train_y = y_s[:20000] valid_y = y_s[20000:22500] test_y = y_s[22500:] test_x = ('float32') test_y = ('int32') valid_x = ('float32') valid_y = ('int32') train_x = ('float32') train_y = ('int32') rval = [(train_x, train_y), (valid_x, valid_y), (test_x, test_y)] return rval if (__name__ == '__main__'): (train, valid, test) = ()
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """Contains container classes to represent different protocol buffer types. This file defines container classes which represent categories of protocol buffer field types which need extra maintenance. Currently these categories are: - Repeated scalar fields - These are all repeated fields which aren't composite (e.g. they are of simple types like int32, string, etc). - Repeated composite fields - Repeated fields which are composite. This includes groups and nested messages. """ __author__ = "petar@google.com (Petar Petrov)" class BaseContainer(object): """Base container class.""" # Minimizes memory usage and disallows assignment to other attributes. __slots__ = ["_message_listener", "_values"] def __init__(self, message_listener): """ Args: message_listener: A MessageListener implementation. The RepeatedScalarFieldContainer will call this object's Modified() method when it is modified. """ self._message_listener = message_listener self._values = [] def __getitem__(self, key): """Retrieves item by the specified key.""" return self._values[key] def __len__(self): """Returns the number of elements in the container.""" return len(self._values) def __ne__(self, other): """Checks if another instance isn't equal to this one.""" # The concrete classes should define __eq__. return not self == other def __hash__(self): raise TypeError("unhashable object") def __repr__(self): return repr(self._values) def sort(self, *args, **kwargs): # Continue to support the old sort_function keyword argument. # This is expected to be a rare occurrence, so use LBYL to avoid # the overhead of actually catching KeyError. if "sort_function" in kwargs: kwargs["cmp"] = kwargs.pop("sort_function") self._values.sort(*args, **kwargs) class RepeatedScalarFieldContainer(BaseContainer): """Simple, type-checked, list-like container for holding repeated scalars.""" # Disallows assignment to other attributes. __slots__ = ["_type_checker"] def __init__(self, message_listener, type_checker): """ Args: message_listener: A MessageListener implementation. The RepeatedScalarFieldContainer will call this object's Modified() method when it is modified. type_checker: A type_checkers.ValueChecker instance to run on elements inserted into this container. """ super(RepeatedScalarFieldContainer, self).__init__(message_listener) self._type_checker = type_checker def append(self, value): """Appends an item to the list. Similar to list.append().""" self._values.append(self._type_checker.CheckValue(value)) if not self._message_listener.dirty: self._message_listener.Modified() def insert(self, key, value): """Inserts the item at the specified position. Similar to list.insert().""" self._values.insert(key, self._type_checker.CheckValue(value)) if not self._message_listener.dirty: self._message_listener.Modified() def extend(self, elem_seq): """Extends by appending the given sequence. Similar to list.extend().""" if not elem_seq: return new_values = [] for elem in elem_seq: new_values.append(self._type_checker.CheckValue(elem)) self._values.extend(new_values) self._message_listener.Modified() def MergeFrom(self, other): """Appends the contents of another repeated field of the same type to this one. We do not check the types of the individual fields. """ self._values.extend(other._values) self._message_listener.Modified() def remove(self, elem): """Removes an item from the list. Similar to list.remove().""" self._values.remove(elem) self._message_listener.Modified() def __setitem__(self, key, value): """Sets the item on the specified position.""" if isinstance(key, slice): # PY3 if key.step is not None: raise ValueError("Extended slices not supported") self.__setslice__(key.start, key.stop, value) else: self._values[key] = self._type_checker.CheckValue(value) self._message_listener.Modified() def __getslice__(self, start, stop): """Retrieves the subset of items from between the specified indices.""" return self._values[start:stop] def __setslice__(self, start, stop, values): """Sets the subset of items from between the specified indices.""" new_values = [] for value in values: new_values.append(self._type_checker.CheckValue(value)) self._values[start:stop] = new_values self._message_listener.Modified() def __delitem__(self, key): """Deletes the item at the specified position.""" del self._values[key] self._message_listener.Modified() def __delslice__(self, start, stop): """Deletes the subset of items from between the specified indices.""" del self._values[start:stop] self._message_listener.Modified() def __eq__(self, other): """Compares the current instance with another one.""" if self is other: return True # Special case for the same type which should be common and fast. if isinstance(other, self.__class__): return other._values == self._values # We are presumably comparing against some other sequence type. return other == self._values class RepeatedCompositeFieldContainer(BaseContainer): """Simple, list-like container for holding repeated composite fields.""" # Disallows assignment to other attributes. __slots__ = ["_message_descriptor"] def __init__(self, message_listener, message_descriptor): """ Note that we pass in a descriptor instead of the generated directly, since at the time we construct a _RepeatedCompositeFieldContainer we haven't yet necessarily initialized the type that will be contained in the container. Args: message_listener: A MessageListener implementation. The RepeatedCompositeFieldContainer will call this object's Modified() method when it is modified. message_descriptor: A Descriptor instance describing the protocol type that should be present in this container. We'll use the _concrete_class field of this descriptor when the client calls add(). """ super(RepeatedCompositeFieldContainer, self).__init__(message_listener) self._message_descriptor = message_descriptor def add(self, **kwargs): """Adds a new element at the end of the list and returns it. Keyword arguments may be used to initialize the element. """ new_element = self._message_descriptor._concrete_class(**kwargs) new_element._SetListener(self._message_listener) self._values.append(new_element) if not self._message_listener.dirty: self._message_listener.Modified() return new_element def extend(self, elem_seq): """Extends by appending the given sequence of elements of the same type as this one, copying each individual message. """ message_class = self._message_descriptor._concrete_class listener = self._message_listener values = self._values for message in elem_seq: new_element = message_class() new_element._SetListener(listener) new_element.MergeFrom(message) values.append(new_element) listener.Modified() def MergeFrom(self, other): """Appends the contents of another repeated field of the same type to this one, copying each individual message. """ self.extend(other._values) def remove(self, elem): """Removes an item from the list. Similar to list.remove().""" self._values.remove(elem) self._message_listener.Modified() def __getslice__(self, start, stop): """Retrieves the subset of items from between the specified indices.""" return self._values[start:stop] def __delitem__(self, key): """Deletes the item at the specified position.""" del self._values[key] self._message_listener.Modified() def __delslice__(self, start, stop): """Deletes the subset of items from between the specified indices.""" del self._values[start:stop] self._message_listener.Modified() def __eq__(self, other): """Compares the current instance with another one.""" if self is other: return True if not isinstance(other, self.__class__): raise TypeError( "Can only compare repeated composite fields against " "other repeated composite fields." ) return self._values == other._values
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """Utilities for Python proto2 tests. This is intentionally modeled on C++ code in //google/protobuf/test_util.*. """ __author__ = "robinson@google.com (Will Robinson)" import os.path from google.protobuf import unittest_import_pb2 from google.protobuf import unittest_pb2 def SetAllNonLazyFields(message): """Sets every non-lazy field in the message to a unique value. Args: message: A unittest_pb2.TestAllTypes instance. """ # # Optional fields. # message.optional_int32 = 101 message.optional_int64 = 102 message.optional_uint32 = 103 message.optional_uint64 = 104 message.optional_sint32 = 105 message.optional_sint64 = 106 message.optional_fixed32 = 107 message.optional_fixed64 = 108 message.optional_sfixed32 = 109 message.optional_sfixed64 = 110 message.optional_float = 111 message.optional_double = 112 message.optional_bool = True message.optional_string = "115" message.optional_bytes = b"116" message.optionalgroup.a = 117 message.optional_nested_message.bb = 118 message.optional_foreign_message.c = 119 message.optional_import_message.d = 120 message.optional_public_import_message.e = 126 message.optional_nested_enum = unittest_pb2.TestAllTypes.BAZ message.optional_foreign_enum = unittest_pb2.FOREIGN_BAZ message.optional_import_enum = unittest_import_pb2.IMPORT_BAZ message.optional_string_piece = "124" message.optional_cord = "125" # # Repeated fields. # message.repeated_int32.append(201) message.repeated_int64.append(202) message.repeated_uint32.append(203) message.repeated_uint64.append(204) message.repeated_sint32.append(205) message.repeated_sint64.append(206) message.repeated_fixed32.append(207) message.repeated_fixed64.append(208) message.repeated_sfixed32.append(209) message.repeated_sfixed64.append(210) message.repeated_float.append(211) message.repeated_double.append(212) message.repeated_bool.append(True) message.repeated_string.append("215") message.repeated_bytes.append(b"216") message.repeatedgroup.add().a = 217 message.repeated_nested_message.add().bb = 218 message.repeated_foreign_message.add().c = 219 message.repeated_import_message.add().d = 220 message.repeated_lazy_message.add().bb = 227 message.repeated_nested_enum.append(unittest_pb2.TestAllTypes.BAR) message.repeated_foreign_enum.append(unittest_pb2.FOREIGN_BAR) message.repeated_import_enum.append(unittest_import_pb2.IMPORT_BAR) message.repeated_string_piece.append("224") message.repeated_cord.append("225") # Add a second one of each field. message.repeated_int32.append(301) message.repeated_int64.append(302) message.repeated_uint32.append(303) message.repeated_uint64.append(304) message.repeated_sint32.append(305) message.repeated_sint64.append(306) message.repeated_fixed32.append(307) message.repeated_fixed64.append(308) message.repeated_sfixed32.append(309) message.repeated_sfixed64.append(310) message.repeated_float.append(311) message.repeated_double.append(312) message.repeated_bool.append(False) message.repeated_string.append("315") message.repeated_bytes.append(b"316") message.repeatedgroup.add().a = 317 message.repeated_nested_message.add().bb = 318 message.repeated_foreign_message.add().c = 319 message.repeated_import_message.add().d = 320 message.repeated_lazy_message.add().bb = 327 message.repeated_nested_enum.append(unittest_pb2.TestAllTypes.BAZ) message.repeated_foreign_enum.append(unittest_pb2.FOREIGN_BAZ) message.repeated_import_enum.append(unittest_import_pb2.IMPORT_BAZ) message.repeated_string_piece.append("324") message.repeated_cord.append("325") # # Fields that have defaults. # message.default_int32 = 401 message.default_int64 = 402 message.default_uint32 = 403 message.default_uint64 = 404 message.default_sint32 = 405 message.default_sint64 = 406 message.default_fixed32 = 407 message.default_fixed64 = 408 message.default_sfixed32 = 409 message.default_sfixed64 = 410 message.default_float = 411 message.default_double = 412 message.default_bool = False message.default_string = "415" message.default_bytes = b"416" message.default_nested_enum = unittest_pb2.TestAllTypes.FOO message.default_foreign_enum = unittest_pb2.FOREIGN_FOO message.default_import_enum = unittest_import_pb2.IMPORT_FOO message.default_string_piece = "424" message.default_cord = "425" message.oneof_uint32 = 601 message.oneof_nested_message.bb = 602 message.oneof_string = "603" message.oneof_bytes = b"604" def SetAllFields(message): SetAllNonLazyFields(message) message.optional_lazy_message.bb = 127 def SetAllExtensions(message): """Sets every extension in the message to a unique value. Args: message: A unittest_pb2.TestAllExtensions instance. """ extensions = message.Extensions pb2 = unittest_pb2 import_pb2 = unittest_import_pb2 # # Optional fields. # extensions[pb2.optional_int32_extension] = 101 extensions[pb2.optional_int64_extension] = 102 extensions[pb2.optional_uint32_extension] = 103 extensions[pb2.optional_uint64_extension] = 104 extensions[pb2.optional_sint32_extension] = 105 extensions[pb2.optional_sint64_extension] = 106 extensions[pb2.optional_fixed32_extension] = 107 extensions[pb2.optional_fixed64_extension] = 108 extensions[pb2.optional_sfixed32_extension] = 109 extensions[pb2.optional_sfixed64_extension] = 110 extensions[pb2.optional_float_extension] = 111 extensions[pb2.optional_double_extension] = 112 extensions[pb2.optional_bool_extension] = True extensions[pb2.optional_string_extension] = "115" extensions[pb2.optional_bytes_extension] = b"116" extensions[pb2.optionalgroup_extension].a = 117 extensions[pb2.optional_nested_message_extension].bb = 118 extensions[pb2.optional_foreign_message_extension].c = 119 extensions[pb2.optional_import_message_extension].d = 120 extensions[pb2.optional_public_import_message_extension].e = 126 extensions[pb2.optional_lazy_message_extension].bb = 127 extensions[pb2.optional_nested_enum_extension] = pb2.TestAllTypes.BAZ extensions[pb2.optional_nested_enum_extension] = pb2.TestAllTypes.BAZ extensions[pb2.optional_foreign_enum_extension] = pb2.FOREIGN_BAZ extensions[pb2.optional_import_enum_extension] = import_pb2.IMPORT_BAZ extensions[pb2.optional_string_piece_extension] = "124" extensions[pb2.optional_cord_extension] = "125" # # Repeated fields. # extensions[pb2.repeated_int32_extension].append(201) extensions[pb2.repeated_int64_extension].append(202) extensions[pb2.repeated_uint32_extension].append(203) extensions[pb2.repeated_uint64_extension].append(204) extensions[pb2.repeated_sint32_extension].append(205) extensions[pb2.repeated_sint64_extension].append(206) extensions[pb2.repeated_fixed32_extension].append(207) extensions[pb2.repeated_fixed64_extension].append(208) extensions[pb2.repeated_sfixed32_extension].append(209) extensions[pb2.repeated_sfixed64_extension].append(210) extensions[pb2.repeated_float_extension].append(211) extensions[pb2.repeated_double_extension].append(212) extensions[pb2.repeated_bool_extension].append(True) extensions[pb2.repeated_string_extension].append("215") extensions[pb2.repeated_bytes_extension].append(b"216") extensions[pb2.repeatedgroup_extension].add().a = 217 extensions[pb2.repeated_nested_message_extension].add().bb = 218 extensions[pb2.repeated_foreign_message_extension].add().c = 219 extensions[pb2.repeated_import_message_extension].add().d = 220 extensions[pb2.repeated_lazy_message_extension].add().bb = 227 extensions[pb2.repeated_nested_enum_extension].append(pb2.TestAllTypes.BAR) extensions[pb2.repeated_foreign_enum_extension].append(pb2.FOREIGN_BAR) extensions[pb2.repeated_import_enum_extension].append(import_pb2.IMPORT_BAR) extensions[pb2.repeated_string_piece_extension].append("224") extensions[pb2.repeated_cord_extension].append("225") # Append a second one of each field. extensions[pb2.repeated_int32_extension].append(301) extensions[pb2.repeated_int64_extension].append(302) extensions[pb2.repeated_uint32_extension].append(303) extensions[pb2.repeated_uint64_extension].append(304) extensions[pb2.repeated_sint32_extension].append(305) extensions[pb2.repeated_sint64_extension].append(306) extensions[pb2.repeated_fixed32_extension].append(307) extensions[pb2.repeated_fixed64_extension].append(308) extensions[pb2.repeated_sfixed32_extension].append(309) extensions[pb2.repeated_sfixed64_extension].append(310) extensions[pb2.repeated_float_extension].append(311) extensions[pb2.repeated_double_extension].append(312) extensions[pb2.repeated_bool_extension].append(False) extensions[pb2.repeated_string_extension].append("315") extensions[pb2.repeated_bytes_extension].append(b"316") extensions[pb2.repeatedgroup_extension].add().a = 317 extensions[pb2.repeated_nested_message_extension].add().bb = 318 extensions[pb2.repeated_foreign_message_extension].add().c = 319 extensions[pb2.repeated_import_message_extension].add().d = 320 extensions[pb2.repeated_lazy_message_extension].add().bb = 327 extensions[pb2.repeated_nested_enum_extension].append(pb2.TestAllTypes.BAZ) extensions[pb2.repeated_foreign_enum_extension].append(pb2.FOREIGN_BAZ) extensions[pb2.repeated_import_enum_extension].append(import_pb2.IMPORT_BAZ) extensions[pb2.repeated_string_piece_extension].append("324") extensions[pb2.repeated_cord_extension].append("325") # # Fields with defaults. # extensions[pb2.default_int32_extension] = 401 extensions[pb2.default_int64_extension] = 402 extensions[pb2.default_uint32_extension] = 403 extensions[pb2.default_uint64_extension] = 404 extensions[pb2.default_sint32_extension] = 405 extensions[pb2.default_sint64_extension] = 406 extensions[pb2.default_fixed32_extension] = 407 extensions[pb2.default_fixed64_extension] = 408 extensions[pb2.default_sfixed32_extension] = 409 extensions[pb2.default_sfixed64_extension] = 410 extensions[pb2.default_float_extension] = 411 extensions[pb2.default_double_extension] = 412 extensions[pb2.default_bool_extension] = False extensions[pb2.default_string_extension] = "415" extensions[pb2.default_bytes_extension] = b"416" extensions[pb2.default_nested_enum_extension] = pb2.TestAllTypes.FOO extensions[pb2.default_foreign_enum_extension] = pb2.FOREIGN_FOO extensions[pb2.default_import_enum_extension] = import_pb2.IMPORT_FOO extensions[pb2.default_string_piece_extension] = "424" extensions[pb2.default_cord_extension] = "425" extensions[pb2.oneof_uint32_extension] = 601 extensions[pb2.oneof_nested_message_extension].bb = 602 extensions[pb2.oneof_string_extension] = "603" extensions[pb2.oneof_bytes_extension] = b"604" def SetAllFieldsAndExtensions(message): """Sets every field and extension in the message to a unique value. Args: message: A unittest_pb2.TestAllExtensions message. """ message.my_int = 1 message.my_string = "foo" message.my_float = 1.0 message.Extensions[unittest_pb2.my_extension_int] = 23 message.Extensions[unittest_pb2.my_extension_string] = "bar" def ExpectAllFieldsAndExtensionsInOrder(serialized): """Ensures that serialized is the serialization we expect for a message filled with SetAllFieldsAndExtensions(). (Specifically, ensures that the serialization is in canonical, tag-number order). """ my_extension_int = unittest_pb2.my_extension_int my_extension_string = unittest_pb2.my_extension_string expected_strings = [] message = unittest_pb2.TestFieldOrderings() message.my_int = 1 # Field 1. expected_strings.append(message.SerializeToString()) message.Clear() message.Extensions[my_extension_int] = 23 # Field 5. expected_strings.append(message.SerializeToString()) message.Clear() message.my_string = "foo" # Field 11. expected_strings.append(message.SerializeToString()) message.Clear() message.Extensions[my_extension_string] = "bar" # Field 50. expected_strings.append(message.SerializeToString()) message.Clear() message.my_float = 1.0 expected_strings.append(message.SerializeToString()) message.Clear() expected = b"".join(expected_strings) if expected != serialized: raise ValueError("Expected %r, found %r" % (expected, serialized)) def ExpectAllFieldsSet(test_case, message): """Check all fields for correct values have after Set*Fields() is called.""" test_case.assertTrue(message.HasField("optional_int32")) test_case.assertTrue(message.HasField("optional_int64")) test_case.assertTrue(message.HasField("optional_uint32")) test_case.assertTrue(message.HasField("optional_uint64")) test_case.assertTrue(message.HasField("optional_sint32")) test_case.assertTrue(message.HasField("optional_sint64")) test_case.assertTrue(message.HasField("optional_fixed32")) test_case.assertTrue(message.HasField("optional_fixed64")) test_case.assertTrue(message.HasField("optional_sfixed32")) test_case.assertTrue(message.HasField("optional_sfixed64")) test_case.assertTrue(message.HasField("optional_float")) test_case.assertTrue(message.HasField("optional_double")) test_case.assertTrue(message.HasField("optional_bool")) test_case.assertTrue(message.HasField("optional_string")) test_case.assertTrue(message.HasField("optional_bytes")) test_case.assertTrue(message.HasField("optionalgroup")) test_case.assertTrue(message.HasField("optional_nested_message")) test_case.assertTrue(message.HasField("optional_foreign_message")) test_case.assertTrue(message.HasField("optional_import_message")) test_case.assertTrue(message.optionalgroup.HasField("a")) test_case.assertTrue(message.optional_nested_message.HasField("bb")) test_case.assertTrue(message.optional_foreign_message.HasField("c")) test_case.assertTrue(message.optional_import_message.HasField("d")) test_case.assertTrue(message.HasField("optional_nested_enum")) test_case.assertTrue(message.HasField("optional_foreign_enum")) test_case.assertTrue(message.HasField("optional_import_enum")) test_case.assertTrue(message.HasField("optional_string_piece")) test_case.assertTrue(message.HasField("optional_cord")) test_case.assertEqual(101, message.optional_int32) test_case.assertEqual(102, message.optional_int64) test_case.assertEqual(103, message.optional_uint32) test_case.assertEqual(104, message.optional_uint64) test_case.assertEqual(105, message.optional_sint32) test_case.assertEqual(106, message.optional_sint64) test_case.assertEqual(107, message.optional_fixed32) test_case.assertEqual(108, message.optional_fixed64) test_case.assertEqual(109, message.optional_sfixed32) test_case.assertEqual(110, message.optional_sfixed64) test_case.assertEqual(111, message.optional_float) test_case.assertEqual(112, message.optional_double) test_case.assertEqual(True, message.optional_bool) test_case.assertEqual("115", message.optional_string) test_case.assertEqual(b"116", message.optional_bytes) test_case.assertEqual(117, message.optionalgroup.a) test_case.assertEqual(118, message.optional_nested_message.bb) test_case.assertEqual(119, message.optional_foreign_message.c) test_case.assertEqual(120, message.optional_import_message.d) test_case.assertEqual(126, message.optional_public_import_message.e) test_case.assertEqual(127, message.optional_lazy_message.bb) test_case.assertEqual(unittest_pb2.TestAllTypes.BAZ, message.optional_nested_enum) test_case.assertEqual(unittest_pb2.FOREIGN_BAZ, message.optional_foreign_enum) test_case.assertEqual(unittest_import_pb2.IMPORT_BAZ, message.optional_import_enum) # ----------------------------------------------------------------- test_case.assertEqual(2, len(message.repeated_int32)) test_case.assertEqual(2, len(message.repeated_int64)) test_case.assertEqual(2, len(message.repeated_uint32)) test_case.assertEqual(2, len(message.repeated_uint64)) test_case.assertEqual(2, len(message.repeated_sint32)) test_case.assertEqual(2, len(message.repeated_sint64)) test_case.assertEqual(2, len(message.repeated_fixed32)) test_case.assertEqual(2, len(message.repeated_fixed64)) test_case.assertEqual(2, len(message.repeated_sfixed32)) test_case.assertEqual(2, len(message.repeated_sfixed64)) test_case.assertEqual(2, len(message.repeated_float)) test_case.assertEqual(2, len(message.repeated_double)) test_case.assertEqual(2, len(message.repeated_bool)) test_case.assertEqual(2, len(message.repeated_string)) test_case.assertEqual(2, len(message.repeated_bytes)) test_case.assertEqual(2, len(message.repeatedgroup)) test_case.assertEqual(2, len(message.repeated_nested_message)) test_case.assertEqual(2, len(message.repeated_foreign_message)) test_case.assertEqual(2, len(message.repeated_import_message)) test_case.assertEqual(2, len(message.repeated_nested_enum)) test_case.assertEqual(2, len(message.repeated_foreign_enum)) test_case.assertEqual(2, len(message.repeated_import_enum)) test_case.assertEqual(2, len(message.repeated_string_piece)) test_case.assertEqual(2, len(message.repeated_cord)) test_case.assertEqual(201, message.repeated_int32[0]) test_case.assertEqual(202, message.repeated_int64[0]) test_case.assertEqual(203, message.repeated_uint32[0]) test_case.assertEqual(204, message.repeated_uint64[0]) test_case.assertEqual(205, message.repeated_sint32[0]) test_case.assertEqual(206, message.repeated_sint64[0]) test_case.assertEqual(207, message.repeated_fixed32[0]) test_case.assertEqual(208, message.repeated_fixed64[0]) test_case.assertEqual(209, message.repeated_sfixed32[0]) test_case.assertEqual(210, message.repeated_sfixed64[0]) test_case.assertEqual(211, message.repeated_float[0]) test_case.assertEqual(212, message.repeated_double[0]) test_case.assertEqual(True, message.repeated_bool[0]) test_case.assertEqual("215", message.repeated_string[0]) test_case.assertEqual(b"216", message.repeated_bytes[0]) test_case.assertEqual(217, message.repeatedgroup[0].a) test_case.assertEqual(218, message.repeated_nested_message[0].bb) test_case.assertEqual(219, message.repeated_foreign_message[0].c) test_case.assertEqual(220, message.repeated_import_message[0].d) test_case.assertEqual(227, message.repeated_lazy_message[0].bb) test_case.assertEqual( unittest_pb2.TestAllTypes.BAR, message.repeated_nested_enum[0] ) test_case.assertEqual(unittest_pb2.FOREIGN_BAR, message.repeated_foreign_enum[0]) test_case.assertEqual( unittest_import_pb2.IMPORT_BAR, message.repeated_import_enum[0] ) test_case.assertEqual(301, message.repeated_int32[1]) test_case.assertEqual(302, message.repeated_int64[1]) test_case.assertEqual(303, message.repeated_uint32[1]) test_case.assertEqual(304, message.repeated_uint64[1]) test_case.assertEqual(305, message.repeated_sint32[1]) test_case.assertEqual(306, message.repeated_sint64[1]) test_case.assertEqual(307, message.repeated_fixed32[1]) test_case.assertEqual(308, message.repeated_fixed64[1]) test_case.assertEqual(309, message.repeated_sfixed32[1]) test_case.assertEqual(310, message.repeated_sfixed64[1]) test_case.assertEqual(311, message.repeated_float[1]) test_case.assertEqual(312, message.repeated_double[1]) test_case.assertEqual(False, message.repeated_bool[1]) test_case.assertEqual("315", message.repeated_string[1]) test_case.assertEqual(b"316", message.repeated_bytes[1]) test_case.assertEqual(317, message.repeatedgroup[1].a) test_case.assertEqual(318, message.repeated_nested_message[1].bb) test_case.assertEqual(319, message.repeated_foreign_message[1].c) test_case.assertEqual(320, message.repeated_import_message[1].d) test_case.assertEqual(327, message.repeated_lazy_message[1].bb) test_case.assertEqual( unittest_pb2.TestAllTypes.BAZ, message.repeated_nested_enum[1] ) test_case.assertEqual(unittest_pb2.FOREIGN_BAZ, message.repeated_foreign_enum[1]) test_case.assertEqual( unittest_import_pb2.IMPORT_BAZ, message.repeated_import_enum[1] ) # ----------------------------------------------------------------- test_case.assertTrue(message.HasField("default_int32")) test_case.assertTrue(message.HasField("default_int64")) test_case.assertTrue(message.HasField("default_uint32")) test_case.assertTrue(message.HasField("default_uint64")) test_case.assertTrue(message.HasField("default_sint32")) test_case.assertTrue(message.HasField("default_sint64")) test_case.assertTrue(message.HasField("default_fixed32")) test_case.assertTrue(message.HasField("default_fixed64")) test_case.assertTrue(message.HasField("default_sfixed32")) test_case.assertTrue(message.HasField("default_sfixed64")) test_case.assertTrue(message.HasField("default_float")) test_case.assertTrue(message.HasField("default_double")) test_case.assertTrue(message.HasField("default_bool")) test_case.assertTrue(message.HasField("default_string")) test_case.assertTrue(message.HasField("default_bytes")) test_case.assertTrue(message.HasField("default_nested_enum")) test_case.assertTrue(message.HasField("default_foreign_enum")) test_case.assertTrue(message.HasField("default_import_enum")) test_case.assertEqual(401, message.default_int32) test_case.assertEqual(402, message.default_int64) test_case.assertEqual(403, message.default_uint32) test_case.assertEqual(404, message.default_uint64) test_case.assertEqual(405, message.default_sint32) test_case.assertEqual(406, message.default_sint64) test_case.assertEqual(407, message.default_fixed32) test_case.assertEqual(408, message.default_fixed64) test_case.assertEqual(409, message.default_sfixed32) test_case.assertEqual(410, message.default_sfixed64) test_case.assertEqual(411, message.default_float) test_case.assertEqual(412, message.default_double) test_case.assertEqual(False, message.default_bool) test_case.assertEqual("415", message.default_string) test_case.assertEqual(b"416", message.default_bytes) test_case.assertEqual(unittest_pb2.TestAllTypes.FOO, message.default_nested_enum) test_case.assertEqual(unittest_pb2.FOREIGN_FOO, message.default_foreign_enum) test_case.assertEqual(unittest_import_pb2.IMPORT_FOO, message.default_import_enum) def GoldenFile(filename): """Finds the given golden file and returns a file object representing it.""" # Search up the directory tree looking for the C++ protobuf source code. path = "." while os.path.exists(path): if os.path.exists(os.path.join(path, "src/google/protobuf")): # Found it. Load the golden file from the testdata directory. full_path = os.path.join(path, "src/google/protobuf/testdata", filename) return open(full_path, "rb") path = os.path.join(path, "..") raise RuntimeError( "Could not find golden files. This test must be run from within the " "protobuf source package so that it can read test data files from the " "C++ source tree." ) def GoldenFileData(filename): """Finds the given golden file and returns its contents.""" with GoldenFile(filename) as f: return f.read() def SetAllPackedFields(message): """Sets every field in the message to a unique value. Args: message: A unittest_pb2.TestPackedTypes instance. """ message.packed_int32.extend([601, 701]) message.packed_int64.extend([602, 702]) message.packed_uint32.extend([603, 703]) message.packed_uint64.extend([604, 704]) message.packed_sint32.extend([605, 705]) message.packed_sint64.extend([606, 706]) message.packed_fixed32.extend([607, 707]) message.packed_fixed64.extend([608, 708]) message.packed_sfixed32.extend([609, 709]) message.packed_sfixed64.extend([610, 710]) message.packed_float.extend([611.0, 711.0]) message.packed_double.extend([612.0, 712.0]) message.packed_bool.extend([True, False]) message.packed_enum.extend([unittest_pb2.FOREIGN_BAR, unittest_pb2.FOREIGN_BAZ]) def SetAllPackedExtensions(message): """Sets every extension in the message to a unique value. Args: message: A unittest_pb2.TestPackedExtensions instance. """ extensions = message.Extensions pb2 = unittest_pb2 extensions[pb2.packed_int32_extension].extend([601, 701]) extensions[pb2.packed_int64_extension].extend([602, 702]) extensions[pb2.packed_uint32_extension].extend([603, 703]) extensions[pb2.packed_uint64_extension].extend([604, 704]) extensions[pb2.packed_sint32_extension].extend([605, 705]) extensions[pb2.packed_sint64_extension].extend([606, 706]) extensions[pb2.packed_fixed32_extension].extend([607, 707]) extensions[pb2.packed_fixed64_extension].extend([608, 708]) extensions[pb2.packed_sfixed32_extension].extend([609, 709]) extensions[pb2.packed_sfixed64_extension].extend([610, 710]) extensions[pb2.packed_float_extension].extend([611.0, 711.0]) extensions[pb2.packed_double_extension].extend([612.0, 712.0]) extensions[pb2.packed_bool_extension].extend([True, False]) extensions[pb2.packed_enum_extension].extend( [unittest_pb2.FOREIGN_BAR, unittest_pb2.FOREIGN_BAZ] ) def SetAllUnpackedFields(message): """Sets every field in the message to a unique value. Args: message: A unittest_pb2.TestUnpackedTypes instance. """ message.unpacked_int32.extend([601, 701]) message.unpacked_int64.extend([602, 702]) message.unpacked_uint32.extend([603, 703]) message.unpacked_uint64.extend([604, 704]) message.unpacked_sint32.extend([605, 705]) message.unpacked_sint64.extend([606, 706]) message.unpacked_fixed32.extend([607, 707]) message.unpacked_fixed64.extend([608, 708]) message.unpacked_sfixed32.extend([609, 709]) message.unpacked_sfixed64.extend([610, 710]) message.unpacked_float.extend([611.0, 711.0]) message.unpacked_double.extend([612.0, 712.0]) message.unpacked_bool.extend([True, False]) message.unpacked_enum.extend([unittest_pb2.FOREIGN_BAR, unittest_pb2.FOREIGN_BAZ])
"""SCons.Debug Code for debugging SCons internal things. Shouldn't be needed by most users. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # __revision__ = "src/engine/SCons/Debug.py 2014/07/05 09:42:21 garyo" import os import sys import time import weakref # Global variable that gets set to 'True' by the Main script, # when the creation of class instances should get tracked. track_instances = False # List of currently tracked classes tracked_classes = {} def logInstanceCreation(instance, name=None): if name is None: name = instance.__class__.__name__ if name not in tracked_classes: tracked_classes[name] = [] tracked_classes[name].append(weakref.ref(instance)) def string_to_classes(s): if s == "*": return sorted(tracked_classes.keys()) else: return s.split() def fetchLoggedInstances(classes="*"): classnames = string_to_classes(classes) return [(cn, len(tracked_classes[cn])) for cn in classnames] def countLoggedInstances(classes, file=sys.stdout): for classname in string_to_classes(classes): file.write("%s: %d\n" % (classname, len(tracked_classes[classname]))) def listLoggedInstances(classes, file=sys.stdout): for classname in string_to_classes(classes): file.write("\n%s:\n" % classname) for ref in tracked_classes[classname]: obj = ref() if obj is not None: file.write(" %s\n" % repr(obj)) def dumpLoggedInstances(classes, file=sys.stdout): for classname in string_to_classes(classes): file.write("\n%s:\n" % classname) for ref in tracked_classes[classname]: obj = ref() if obj is not None: file.write(" %s:\n" % obj) for key, value in list(obj.__dict__.items()): file.write(" %20s : %s\n" % (key, value)) if sys.platform[:5] == "linux": # Linux doesn't actually support memory usage stats from getrusage(). def memory(): mstr = open("/proc/self/stat").read() mstr = mstr.split()[22] return int(mstr) elif sys.platform[:6] == "darwin": # TODO really get memory stats for OS X def memory(): return 0 else: try: import resource except ImportError: try: import win32process import win32api except ImportError: def memory(): return 0 else: def memory(): process_handle = win32api.GetCurrentProcess() memory_info = win32process.GetProcessMemoryInfo(process_handle) return memory_info["PeakWorkingSetSize"] else: def memory(): res = resource.getrusage(resource.RUSAGE_SELF) return res[4] # returns caller's stack def caller_stack(): import traceback tb = traceback.extract_stack() # strip itself and the caller from the output tb = tb[:-2] result = [] for back in tb: # (filename, line number, function name, text) key = back[:3] result.append("%s:%d(%s)" % func_shorten(key)) return result caller_bases = {} caller_dicts = {} # trace a caller's stack def caller_trace(back=0): import traceback tb = traceback.extract_stack(limit=3 + back) tb.reverse() callee = tb[1][:3] caller_bases[callee] = caller_bases.get(callee, 0) + 1 for caller in tb[2:]: caller = callee + caller[:3] try: entry = caller_dicts[callee] except KeyError: caller_dicts[callee] = entry = {} entry[caller] = entry.get(caller, 0) + 1 callee = caller # print a single caller and its callers, if any def _dump_one_caller(key, file, level=0): leader = " " * level for v, c in sorted([(-v, c) for c, v in list(caller_dicts[key].items())]): file.write("%s %6d %s:%d(%s)\n" % ((leader, -v) + func_shorten(c[-3:]))) if c in caller_dicts: _dump_one_caller(c, file, level + 1) # print each call tree def dump_caller_counts(file=sys.stdout): for k in sorted(caller_bases.keys()): file.write( "Callers of %s:%d(%s), %d calls:\n" % (func_shorten(k) + (caller_bases[k],)) ) _dump_one_caller(k, file) shorten_list = [ ("/scons/SCons/", 1), ("/src/engine/SCons/", 1), ("/usr/lib/python", 0), ] if os.sep != "/": shorten_list = [(t[0].replace("/", os.sep), t[1]) for t in shorten_list] def func_shorten(func_tuple): f = func_tuple[0] for t in shorten_list: i = f.find(t[0]) if i >= 0: if t[1]: i = i + len(t[0]) return (f[i:],) + func_tuple[1:] return func_tuple TraceFP = {} if sys.platform == "win32": TraceDefault = "con" else: TraceDefault = "/dev/tty" TimeStampDefault = None StartTime = time.time() PreviousTime = StartTime def Trace(msg, file=None, mode="w", tstamp=None): """Write a trace message to a file. Whenever a file is specified, it becomes the default for the next call to Trace().""" global TraceDefault global TimeStampDefault global PreviousTime if file is None: file = TraceDefault else: TraceDefault = file if tstamp is None: tstamp = TimeStampDefault else: TimeStampDefault = tstamp try: fp = TraceFP[file] except KeyError: try: fp = TraceFP[file] = open(file, mode) except TypeError: # Assume we were passed an open file pointer. fp = file if tstamp: now = time.time() fp.write("%8.4f %8.4f: " % (now - StartTime, now - PreviousTime)) PreviousTime = now fp.write(msg) fp.flush() # Local Variables: # tab-width:4 # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=4 shiftwidth=4:
"""SCons.SConf Autoconf-like configuration support. In other words, this package allows to run series of tests to detect capabilities of current system and generate config files (header files in C/C++) that turn on system-specific options and optimizations. For example, it is possible to detect if optional libraries are present on current system and generate config that makes compiler include them. C compilers do not have ability to catch ImportError if some library is not found, so these checks should be done externally. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # __revision__ = "src/engine/SCons/SConf.py 2014/07/05 09:42:21 garyo" import SCons.compat import io import os import re import sys import traceback import SCons.Action import SCons.Builder import SCons.Errors import SCons.Job import SCons.Node.FS import SCons.Taskmaster import SCons.Util import SCons.Warnings import SCons.Conftest from SCons.Debug import Trace # Turn off the Conftest error logging SCons.Conftest.LogInputFiles = 0 SCons.Conftest.LogErrorMessages = 0 # Set build_type = None build_types = ["clean", "help"] def SetBuildType(type): global build_type build_type = type # to be set, if we are in dry-run mode dryrun = 0 AUTO = 0 # use SCons dependency scanning for up-to-date checks FORCE = 1 # force all tests to be rebuilt CACHE = 2 # force all tests to be taken from cache (raise an error, if necessary) cache_mode = AUTO def SetCacheMode(mode): """Set the Configure cache mode. mode must be one of "auto", "force", or "cache".""" global cache_mode if mode == "auto": cache_mode = AUTO elif mode == "force": cache_mode = FORCE elif mode == "cache": cache_mode = CACHE else: raise ValueError("SCons.SConf.SetCacheMode: Unknown mode " + mode) progress_display = SCons.Util.display # will be overwritten by SCons.Script def SetProgressDisplay(display): """Set the progress display to use (called from SCons.Script)""" global progress_display progress_display = display SConfFS = None _ac_build_counter = 0 # incremented, whenever TryBuild is called _ac_config_logs = {} # all config.log files created in this build _ac_config_hs = {} # all config.h files created in this build sconf_global = None # current sconf object def _createConfigH(target, source, env): t = open(str(target[0]), "w") defname = re.sub("[^A-Za-z0-9_]", "_", str(target[0]).upper()) t.write( """#ifndef %(DEFNAME)s_SEEN #define %(DEFNAME)s_SEEN """ % {"DEFNAME": defname} ) t.write(source[0].get_contents()) t.write( """ #endif /* %(DEFNAME)s_SEEN */ """ % {"DEFNAME": defname} ) t.close() def _stringConfigH(target, source, env): return "scons: Configure: creating " + str(target[0]) def NeedConfigHBuilder(): if len(_ac_config_hs) == 0: return False else: return True def CreateConfigHBuilder(env): """Called if necessary just before the building targets phase begins.""" action = SCons.Action.Action(_createConfigH, _stringConfigH) sconfigHBld = SCons.Builder.Builder(action=action) env.Append(BUILDERS={"SConfigHBuilder": sconfigHBld}) for k in list(_ac_config_hs.keys()): env.SConfigHBuilder(k, env.Value(_ac_config_hs[k])) class SConfWarning(SCons.Warnings.Warning): pass SCons.Warnings.enableWarningClass(SConfWarning) # some error definitions class SConfError(SCons.Errors.UserError): def __init__(self, msg): SCons.Errors.UserError.__init__(self, msg) class ConfigureDryRunError(SConfError): """Raised when a file or directory needs to be updated during a Configure process, but the user requested a dry-run""" def __init__(self, target): if not isinstance(target, SCons.Node.FS.File): msg = 'Cannot create configure directory "%s" within a dry-run.' % str( target ) else: msg = 'Cannot update configure test "%s" within a dry-run.' % str(target) SConfError.__init__(self, msg) class ConfigureCacheError(SConfError): """Raised when a use explicitely requested the cache feature, but the test is run the first time.""" def __init__(self, target): SConfError.__init__( self, '"%s" is not yet built and cache is forced.' % str(target) ) # define actions for building text files def _createSource(target, source, env): fd = open(str(target[0]), "w") fd.write(source[0].get_contents()) fd.close() def _stringSource(target, source, env): return str(target[0]) + " <-\n |" + source[0].get_contents().replace("\n", "\n |") class SConfBuildInfo(SCons.Node.FS.FileBuildInfo): """ Special build info for targets of configure tests. Additional members are result (did the builder succeed last time?) and string, which contains messages of the original build phase. """ result = None # -> 0/None -> no error, != 0 error string = None # the stdout / stderr output when building the target def set_build_result(self, result, string): self.result = result self.string = string class Streamer(object): """ 'Sniffer' for a file-like writable object. Similar to the unix tool tee. """ def __init__(self, orig): self.orig = orig self.s = io.StringIO() def write(self, str): if self.orig: self.orig.write(str) try: self.s.write(str) except TypeError as e: if e.message.startswith("unicode argument expected"): self.s.write(str.decode()) else: raise def writelines(self, lines): for l in lines: self.write(l + "\n") def getvalue(self): """ Return everything written to orig since the Streamer was created. """ return self.s.getvalue() def flush(self): if self.orig: self.orig.flush() self.s.flush() class SConfBuildTask(SCons.Taskmaster.AlwaysTask): """ This is almost the same as SCons.Script.BuildTask. Handles SConfErrors correctly and knows about the current cache_mode. """ def display(self, message): if sconf_global.logstream: sconf_global.logstream.write("scons: Configure: " + message + "\n") def display_cached_string(self, bi): """ Logs the original builder messages, given the SConfBuildInfo instance bi. """ if not isinstance(bi, SConfBuildInfo): SCons.Warnings.warn( SConfWarning, "The stored build information has an unexpected class: %s" % bi.__class__, ) else: self.display( "The original builder output was:\n" + (" |" + str(bi.string)).replace("\n", "\n |") ) def failed(self): # check, if the reason was a ConfigureDryRunError or a # ConfigureCacheError and if yes, reraise the exception exc_type = self.exc_info()[0] if issubclass(exc_type, SConfError): raise elif issubclass(exc_type, SCons.Errors.BuildError): # we ignore Build Errors (occurs, when a test doesn't pass) # Clear the exception to prevent the contained traceback # to build a reference cycle. self.exc_clear() else: self.display('Caught exception while building "%s":\n' % self.targets[0]) try: excepthook = sys.excepthook except AttributeError: # Earlier versions of Python don't have sys.excepthook... def excepthook(type, value, tb): traceback.print_tb(tb) print(type, value) excepthook(*self.exc_info()) return SCons.Taskmaster.Task.failed(self) def collect_node_states(self): # returns (is_up_to_date, cached_error, cachable) # where is_up_to_date is 1, if the node(s) are up_to_date # cached_error is 1, if the node(s) are up_to_date, but the # build will fail # cachable is 0, if some nodes are not in our cache T = 0 changed = False cached_error = False cachable = True for t in self.targets: if T: Trace("%s" % (t)) bi = t.get_stored_info().binfo if isinstance(bi, SConfBuildInfo): if T: Trace(": SConfBuildInfo") if cache_mode == CACHE: t.set_state(SCons.Node.up_to_date) if T: Trace(": set_state(up_to-date)") else: if T: Trace(": get_state() %s" % t.get_state()) if T: Trace(": changed() %s" % t.changed()) if t.get_state() != SCons.Node.up_to_date and t.changed(): changed = True if T: Trace(": changed %s" % changed) cached_error = cached_error or bi.result else: if T: Trace(": else") # the node hasn't been built in a SConf context or doesn't # exist cachable = False changed = t.get_state() != SCons.Node.up_to_date if T: Trace(": changed %s" % changed) if T: Trace("\n") return (not changed, cached_error, cachable) def execute(self): if not self.targets[0].has_builder(): return sconf = sconf_global is_up_to_date, cached_error, cachable = self.collect_node_states() if cache_mode == CACHE and not cachable: raise ConfigureCacheError(self.targets[0]) elif cache_mode == FORCE: is_up_to_date = 0 if cached_error and is_up_to_date: self.display( 'Building "%s" failed in a previous run and all ' "its sources are up to date." % str(self.targets[0]) ) binfo = self.targets[0].get_stored_info().binfo self.display_cached_string(binfo) raise SCons.Errors.BuildError # will be 'caught' in self.failed elif is_up_to_date: self.display('"%s" is up to date.' % str(self.targets[0])) binfo = self.targets[0].get_stored_info().binfo self.display_cached_string(binfo) elif dryrun: raise ConfigureDryRunError(self.targets[0]) else: # note stdout and stderr are the same here s = sys.stdout = sys.stderr = Streamer(sys.stdout) try: env = self.targets[0].get_build_env() if cache_mode == FORCE: # Set up the Decider() to force rebuilds by saying # that every source has changed. Note that we still # call the environment's underlying source decider so # that the correct .sconsign info will get calculated # and keep the build state consistent. def force_build( dependency, target, prev_ni, env_decider=env.decide_source ): env_decider(dependency, target, prev_ni) return True if env.decide_source.__code__ is not force_build.__code__: env.Decider(force_build) env["PSTDOUT"] = env["PSTDERR"] = s try: sconf.cached = 0 self.targets[0].build() finally: sys.stdout = sys.stderr = env["PSTDOUT"] = env[ "PSTDERR" ] = sconf.logstream except KeyboardInterrupt: raise except SystemExit: exc_value = sys.exc_info()[1] raise SCons.Errors.ExplicitExit(self.targets[0], exc_value.code) except Exception as e: for t in self.targets: binfo = t.get_binfo() binfo.__class__ = SConfBuildInfo binfo.set_build_result(1, s.getvalue()) sconsign_entry = SCons.SConsign.SConsignEntry() sconsign_entry.binfo = binfo # sconsign_entry.ninfo = self.get_ninfo() # We'd like to do this as follows: # t.store_info(binfo) # However, we need to store it as an SConfBuildInfo # object, and store_info() will turn it into a # regular FileNodeInfo if the target is itself a # regular File. sconsign = t.dir.sconsign() sconsign.set_entry(t.name, sconsign_entry) sconsign.merge() raise e else: for t in self.targets: binfo = t.get_binfo() binfo.__class__ = SConfBuildInfo binfo.set_build_result(0, s.getvalue()) sconsign_entry = SCons.SConsign.SConsignEntry() sconsign_entry.binfo = binfo # sconsign_entry.ninfo = self.get_ninfo() # We'd like to do this as follows: # t.store_info(binfo) # However, we need to store it as an SConfBuildInfo # object, and store_info() will turn it into a # regular FileNodeInfo if the target is itself a # regular File. sconsign = t.dir.sconsign() sconsign.set_entry(t.name, sconsign_entry) sconsign.merge() class SConfBase(object): """This is simply a class to represent a configure context. After creating a SConf object, you can call any tests. After finished with your tests, be sure to call the Finish() method, which returns the modified environment. Some words about caching: In most cases, it is not necessary to cache Test results explicitely. Instead, we use the scons dependency checking mechanism. For example, if one wants to compile a test program (SConf.TryLink), the compiler is only called, if the program dependencies have changed. However, if the program could not be compiled in a former SConf run, we need to explicitely cache this error. """ def __init__( self, env, custom_tests={}, conf_dir="$CONFIGUREDIR", log_file="$CONFIGURELOG", config_h=None, _depth=0, ): """Constructor. Pass additional tests in the custom_tests-dictinary, e.g. custom_tests={'CheckPrivate':MyPrivateTest}, where MyPrivateTest defines a custom test. Note also the conf_dir and log_file arguments (you may want to build tests in the VariantDir, not in the SourceDir) """ global SConfFS if not SConfFS: SConfFS = SCons.Node.FS.default_fs or SCons.Node.FS.FS(env.fs.pathTop) if sconf_global is not None: raise SCons.Errors.UserError self.env = env if log_file is not None: log_file = SConfFS.File(env.subst(log_file)) self.logfile = log_file self.logstream = None self.lastTarget = None self.depth = _depth self.cached = 0 # will be set, if all test results are cached # add default tests default_tests = { "CheckCC": CheckCC, "CheckCXX": CheckCXX, "CheckSHCC": CheckSHCC, "CheckSHCXX": CheckSHCXX, "CheckFunc": CheckFunc, "CheckType": CheckType, "CheckTypeSize": CheckTypeSize, "CheckDeclaration": CheckDeclaration, "CheckHeader": CheckHeader, "CheckCHeader": CheckCHeader, "CheckCXXHeader": CheckCXXHeader, "CheckLib": CheckLib, "CheckLibWithHeader": CheckLibWithHeader, } self.AddTests(default_tests) self.AddTests(custom_tests) self.confdir = SConfFS.Dir(env.subst(conf_dir)) if config_h is not None: config_h = SConfFS.File(config_h) self.config_h = config_h self._startup() def Finish(self): """Call this method after finished with your tests: env = sconf.Finish() """ self._shutdown() return self.env def Define(self, name, value=None, comment=None): """ Define a pre processor symbol name, with the optional given value in the current config header. If value is None (default), then #define name is written. If value is not none, then #define name value is written. comment is a string which will be put as a C comment in the header, to explain the meaning of the value (appropriate C comments /* and */ will be put automatically.""" lines = [] if comment: comment_str = "/* %s */" % comment lines.append(comment_str) if value is not None: define_str = "#define %s %s" % (name, value) else: define_str = "#define %s" % name lines.append(define_str) lines.append("") self.config_h_text = self.config_h_text + "\n".join(lines) def BuildNodes(self, nodes): """ Tries to build the given nodes immediately. Returns 1 on success, 0 on error. """ if self.logstream is not None: # override stdout / stderr to write in log file oldStdout = sys.stdout sys.stdout = self.logstream oldStderr = sys.stderr sys.stderr = self.logstream # the engine assumes the current path is the SConstruct directory ... old_fs_dir = SConfFS.getcwd() old_os_dir = os.getcwd() SConfFS.chdir(SConfFS.Top, change_os_dir=1) # Because we take responsibility here for writing out our # own .sconsign info (see SConfBuildTask.execute(), above), # we override the store_info() method with a null place-holder # so we really control how it gets written. for n in nodes: n.store_info = n.do_not_store_info if not hasattr(n, "attributes"): n.attributes = SCons.Node.Node.Attrs() n.attributes.keep_targetinfo = 1 ret = 1 try: # ToDo: use user options for calc save_max_drift = SConfFS.get_max_drift() SConfFS.set_max_drift(0) tm = SCons.Taskmaster.Taskmaster(nodes, SConfBuildTask) # we don't want to build tests in parallel jobs = SCons.Job.Jobs(1, tm) jobs.run() for n in nodes: state = n.get_state() if state != SCons.Node.executed and state != SCons.Node.up_to_date: # the node could not be built. we return 0 in this case ret = 0 finally: SConfFS.set_max_drift(save_max_drift) os.chdir(old_os_dir) SConfFS.chdir(old_fs_dir, change_os_dir=0) if self.logstream is not None: # restore stdout / stderr sys.stdout = oldStdout sys.stderr = oldStderr return ret def pspawn_wrapper(self, sh, escape, cmd, args, env): """Wrapper function for handling piped spawns. This looks to the calling interface (in Action.py) like a "normal" spawn, but associates the call with the PSPAWN variable from the construction environment and with the streams to which we want the output logged. This gets slid into the construction environment as the SPAWN variable so Action.py doesn't have to know or care whether it's spawning a piped command or not. """ return self.pspawn(sh, escape, cmd, args, env, self.logstream, self.logstream) def TryBuild(self, builder, text=None, extension=""): """Low level TryBuild implementation. Normally you don't need to call that - you can use TryCompile / TryLink / TryRun instead """ global _ac_build_counter # Make sure we have a PSPAWN value, and save the current # SPAWN value. try: self.pspawn = self.env["PSPAWN"] except KeyError: raise SCons.Errors.UserError("Missing PSPAWN construction variable.") try: save_spawn = self.env["SPAWN"] except KeyError: raise SCons.Errors.UserError("Missing SPAWN construction variable.") nodesToBeBuilt = [] f = "conftest_" + str(_ac_build_counter) pref = self.env.subst(builder.builder.prefix) suff = self.env.subst(builder.builder.suffix) target = self.confdir.File(pref + f + suff) try: # Slide our wrapper into the construction environment as # the SPAWN function. self.env["SPAWN"] = self.pspawn_wrapper sourcetext = self.env.Value(text) if text is not None: textFile = self.confdir.File(f + extension) textFileNode = self.env.SConfSourceBuilder( target=textFile, source=sourcetext ) nodesToBeBuilt.extend(textFileNode) source = textFileNode else: source = None nodes = builder(target=target, source=source) if not SCons.Util.is_List(nodes): nodes = [nodes] nodesToBeBuilt.extend(nodes) result = self.BuildNodes(nodesToBeBuilt) finally: self.env["SPAWN"] = save_spawn _ac_build_counter = _ac_build_counter + 1 if result: self.lastTarget = nodes[0] else: self.lastTarget = None return result def TryAction(self, action, text=None, extension=""): """Tries to execute the given action with optional source file contents <text> and optional source file extension <extension>, Returns the status (0 : failed, 1 : ok) and the contents of the output file. """ builder = SCons.Builder.Builder(action=action) self.env.Append(BUILDERS={"SConfActionBuilder": builder}) ok = self.TryBuild(self.env.SConfActionBuilder, text, extension) del self.env["BUILDERS"]["SConfActionBuilder"] if ok: outputStr = self.lastTarget.get_contents() return (1, outputStr) return (0, "") def TryCompile(self, text, extension): """Compiles the program given in text to an env.Object, using extension as file extension (e.g. '.c'). Returns 1, if compilation was successful, 0 otherwise. The target is saved in self.lastTarget (for further processing). """ return self.TryBuild(self.env.Object, text, extension) def TryLink(self, text, extension): """Compiles the program given in text to an executable env.Program, using extension as file extension (e.g. '.c'). Returns 1, if compilation was successful, 0 otherwise. The target is saved in self.lastTarget (for further processing). """ return self.TryBuild(self.env.Program, text, extension) def TryRun(self, text, extension): """Compiles and runs the program given in text, using extension as file extension (e.g. '.c'). Returns (1, outputStr) on success, (0, '') otherwise. The target (a file containing the program's stdout) is saved in self.lastTarget (for further processing). """ ok = self.TryLink(text, extension) if ok: prog = self.lastTarget pname = prog.path output = self.confdir.File(os.path.basename(pname) + ".out") node = self.env.Command(output, prog, [[pname, ">", "${TARGET}"]]) ok = self.BuildNodes(node) if ok: outputStr = output.get_contents() return (1, outputStr) return (0, "") class TestWrapper(object): """A wrapper around Tests (to ensure sanity)""" def __init__(self, test, sconf): self.test = test self.sconf = sconf def __call__(self, *args, **kw): if not self.sconf.active: raise SCons.Errors.UserError context = CheckContext(self.sconf) ret = self.test(context, *args, **kw) if self.sconf.config_h is not None: self.sconf.config_h_text = self.sconf.config_h_text + context.config_h context.Result("error: no result") return ret def AddTest(self, test_name, test_instance): """Adds test_class to this SConf instance. It can be called with self.test_name(...)""" setattr(self, test_name, SConfBase.TestWrapper(test_instance, self)) def AddTests(self, tests): """Adds all the tests given in the tests dictionary to this SConf instance """ for name in list(tests.keys()): self.AddTest(name, tests[name]) def _createDir(self, node): dirName = str(node) if dryrun: if not os.path.isdir(dirName): raise ConfigureDryRunError(dirName) else: if not os.path.isdir(dirName): os.makedirs(dirName) node._exists = 1 def _startup(self): """Private method. Set up logstream, and set the environment variables necessary for a piped build """ global _ac_config_logs global sconf_global global SConfFS self.lastEnvFs = self.env.fs self.env.fs = SConfFS self._createDir(self.confdir) self.confdir.up().add_ignore([self.confdir]) if self.logfile is not None and not dryrun: # truncate logfile, if SConf.Configure is called for the first time # in a build if self.logfile in _ac_config_logs: log_mode = "a" else: _ac_config_logs[self.logfile] = None log_mode = "w" fp = open(str(self.logfile), log_mode) self.logstream = SCons.Util.Unbuffered(fp) # logfile may stay in a build directory, so we tell # the build system not to override it with a eventually # existing file with the same name in the source directory self.logfile.dir.add_ignore([self.logfile]) tb = traceback.extract_stack()[-3 - self.depth] old_fs_dir = SConfFS.getcwd() SConfFS.chdir(SConfFS.Top, change_os_dir=0) self.logstream.write( "file %s,line %d:\n\tConfigure(confdir = %s)\n" % (tb[0], tb[1], str(self.confdir)) ) SConfFS.chdir(old_fs_dir) else: self.logstream = None # we use a special builder to create source files from TEXT action = SCons.Action.Action(_createSource, _stringSource) sconfSrcBld = SCons.Builder.Builder(action=action) self.env.Append(BUILDERS={"SConfSourceBuilder": sconfSrcBld}) self.config_h_text = _ac_config_hs.get(self.config_h, "") self.active = 1 # only one SConf instance should be active at a time ... sconf_global = self def _shutdown(self): """Private method. Reset to non-piped spawn""" global sconf_global, _ac_config_hs if not self.active: raise SCons.Errors.UserError("Finish may be called only once!") if self.logstream is not None and not dryrun: self.logstream.write("\n") self.logstream.close() self.logstream = None # remove the SConfSourceBuilder from the environment blds = self.env["BUILDERS"] del blds["SConfSourceBuilder"] self.env.Replace(BUILDERS=blds) self.active = 0 sconf_global = None if not self.config_h is None: _ac_config_hs[self.config_h] = self.config_h_text self.env.fs = self.lastEnvFs class CheckContext(object): """Provides a context for configure tests. Defines how a test writes to the screen and log file. A typical test is just a callable with an instance of CheckContext as first argument: def CheckCustom(context, ...) context.Message('Checking my weird test ... ') ret = myWeirdTestFunction(...) context.Result(ret) Often, myWeirdTestFunction will be one of context.TryCompile/context.TryLink/context.TryRun. The results of those are cached, for they are only rebuild, if the dependencies have changed. """ def __init__(self, sconf): """Constructor. Pass the corresponding SConf instance.""" self.sconf = sconf self.did_show_result = 0 # for Conftest.py: self.vardict = {} self.havedict = {} self.headerfilename = None self.config_h = "" # config_h text will be stored here # we don't regenerate the config.h file after each test. That means, # that tests won't be able to include the config.h file, and so # they can't do an #ifdef HAVE_XXX_H. This shouldn't be a major # issue, though. If it turns out, that we need to include config.h # in tests, we must ensure, that the dependencies are worked out # correctly. Note that we can't use Conftest.py's support for config.h, # cause we will need to specify a builder for the config.h file ... def Message(self, text): """Inform about what we are doing right now, e.g. 'Checking for SOMETHING ... ' """ self.Display(text) self.sconf.cached = 1 self.did_show_result = 0 def Result(self, res): """Inform about the result of the test. If res is not a string, displays 'yes' or 'no' depending on whether res is evaluated as true or false. The result is only displayed when self.did_show_result is not set. """ if isinstance(res, str): text = res elif res: text = "yes" else: text = "no" if self.did_show_result == 0: # Didn't show result yet, do it now. self.Display(text + "\n") self.did_show_result = 1 def TryBuild(self, *args, **kw): return self.sconf.TryBuild(*args, **kw) def TryAction(self, *args, **kw): return self.sconf.TryAction(*args, **kw) def TryCompile(self, *args, **kw): return self.sconf.TryCompile(*args, **kw) def TryLink(self, *args, **kw): return self.sconf.TryLink(*args, **kw) def TryRun(self, *args, **kw): return self.sconf.TryRun(*args, **kw) def __getattr__(self, attr): if attr == "env": return self.sconf.env elif attr == "lastTarget": return self.sconf.lastTarget else: raise AttributeError("CheckContext instance has no attribute '%s'" % attr) #### Stuff used by Conftest.py (look there for explanations). def BuildProg(self, text, ext): self.sconf.cached = 1 # TODO: should use self.vardict for $CC, $CPPFLAGS, etc. return not self.TryBuild(self.env.Program, text, ext) def CompileProg(self, text, ext): self.sconf.cached = 1 # TODO: should use self.vardict for $CC, $CPPFLAGS, etc. return not self.TryBuild(self.env.Object, text, ext) def CompileSharedObject(self, text, ext): self.sconf.cached = 1 # TODO: should use self.vardict for $SHCC, $CPPFLAGS, etc. return not self.TryBuild(self.env.SharedObject, text, ext) def RunProg(self, text, ext): self.sconf.cached = 1 # TODO: should use self.vardict for $CC, $CPPFLAGS, etc. st, out = self.TryRun(text, ext) return not st, out def AppendLIBS(self, lib_name_list): oldLIBS = self.env.get("LIBS", []) self.env.Append(LIBS=lib_name_list) return oldLIBS def PrependLIBS(self, lib_name_list): oldLIBS = self.env.get("LIBS", []) self.env.Prepend(LIBS=lib_name_list) return oldLIBS def SetLIBS(self, val): oldLIBS = self.env.get("LIBS", []) self.env.Replace(LIBS=val) return oldLIBS def Display(self, msg): if self.sconf.cached: # We assume that Display is called twice for each test here # once for the Checking for ... message and once for the result. # The self.sconf.cached flag can only be set between those calls msg = "(cached) " + msg self.sconf.cached = 0 progress_display(msg, append_newline=0) self.Log("scons: Configure: " + msg + "\n") def Log(self, msg): if self.sconf.logstream is not None: self.sconf.logstream.write(msg) #### End of stuff used by Conftest.py. def SConf(*args, **kw): if kw.get(build_type, True): kw["_depth"] = kw.get("_depth", 0) + 1 for bt in build_types: try: del kw[bt] except KeyError: pass return SConfBase(*args, **kw) else: return SCons.Util.Null() def CheckFunc(context, function_name, header=None, language=None): res = SCons.Conftest.CheckFunc( context, function_name, header=header, language=language ) context.did_show_result = 1 return not res def CheckType(context, type_name, includes="", language=None): res = SCons.Conftest.CheckType( context, type_name, header=includes, language=language ) context.did_show_result = 1 return not res def CheckTypeSize(context, type_name, includes="", language=None, expect=None): res = SCons.Conftest.CheckTypeSize( context, type_name, header=includes, language=language, expect=expect ) context.did_show_result = 1 return res def CheckDeclaration(context, declaration, includes="", language=None): res = SCons.Conftest.CheckDeclaration( context, declaration, includes=includes, language=language ) context.did_show_result = 1 return not res def createIncludesFromHeaders(headers, leaveLast, include_quotes='""'): # used by CheckHeader and CheckLibWithHeader to produce C - #include # statements from the specified header (list) if not SCons.Util.is_List(headers): headers = [headers] l = [] if leaveLast: lastHeader = headers[-1] headers = headers[:-1] else: lastHeader = None for s in headers: l.append("#include %s%s%s\n" % (include_quotes[0], s, include_quotes[1])) return "".join(l), lastHeader def CheckHeader(context, header, include_quotes="<>", language=None): """ A test for a C or C++ header file. """ prog_prefix, hdr_to_check = createIncludesFromHeaders(header, 1, include_quotes) res = SCons.Conftest.CheckHeader( context, hdr_to_check, prog_prefix, language=language, include_quotes=include_quotes, ) context.did_show_result = 1 return not res def CheckCC(context): res = SCons.Conftest.CheckCC(context) context.did_show_result = 1 return not res def CheckCXX(context): res = SCons.Conftest.CheckCXX(context) context.did_show_result = 1 return not res def CheckSHCC(context): res = SCons.Conftest.CheckSHCC(context) context.did_show_result = 1 return not res def CheckSHCXX(context): res = SCons.Conftest.CheckSHCXX(context) context.did_show_result = 1 return not res # Bram: Make this function obsolete? CheckHeader() is more generic. def CheckCHeader(context, header, include_quotes='""'): """ A test for a C header file. """ return CheckHeader(context, header, include_quotes, language="C") # Bram: Make this function obsolete? CheckHeader() is more generic. def CheckCXXHeader(context, header, include_quotes='""'): """ A test for a C++ header file. """ return CheckHeader(context, header, include_quotes, language="C++") def CheckLib( context, library=None, symbol="main", header=None, language=None, autoadd=1 ): """ A test for a library. See also CheckLibWithHeader. Note that library may also be None to test whether the given symbol compiles without flags. """ if library == []: library = [None] if not SCons.Util.is_List(library): library = [library] # ToDo: accept path for the library res = SCons.Conftest.CheckLib( context, library, symbol, header=header, language=language, autoadd=autoadd ) context.did_show_result = 1 return not res # XXX # Bram: Can only include one header and can't use #ifdef HAVE_HEADER_H. def CheckLibWithHeader(context, libs, header, language, call=None, autoadd=1): # ToDo: accept path for library. Support system header files. """ Another (more sophisticated) test for a library. Checks, if library and header is available for language (may be 'C' or 'CXX'). Call maybe be a valid expression _with_ a trailing ';'. As in CheckLib, we support library=None, to test if the call compiles without extra link flags. """ prog_prefix, dummy = createIncludesFromHeaders(header, 0) if libs == []: libs = [None] if not SCons.Util.is_List(libs): libs = [libs] res = SCons.Conftest.CheckLib( context, libs, None, prog_prefix, call=call, language=language, autoadd=autoadd ) context.did_show_result = 1 return not res # Local Variables: # tab-width:4 # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=4 shiftwidth=4:
"SCons.Tool.docbook\n\nTool-specific initialization for Docbook.\n\nThere normally shouldn't be any need to import this module directly.\nIt will usually be imported through the generic SCons.Tool.Tool()\nselection method.\n\n" import os import glob import re import SCons.Action import SCons.Builder import SCons.Defaults import SCons.Script import SCons.Tool import SCons.Util scriptpath = ((__file__)) db_xsl_folder = 'docbook-xsl-1.76.1' has_libxml2 = True has_lxml = True try: import libxml2 import libxslt except: has_libxml2 = False try: import lxml except: has_lxml = False prefer_xsltproc = False re_manvolnum = ('<manvolnum>([^<]*)</manvolnum>') re_refname = ('<refname>([^<]*)</refname>') def __extend_targets_sources(target, source): 'Prepare the lists of target and source files.' if (not (target)): target = [target] if (not source): source = target[:] elif (not (source)): source = [source] if ((target) < (source)): (source[(target):]) return (target, source) def __init_xsl_stylesheet(kw, env, user_xsl_var, default_path): if (('DOCBOOK_XSL', '') == ''): xsl_style = ('xsl', (user_xsl_var)) if (xsl_style == ''): path_args = ([scriptpath, db_xsl_folder] + default_path) xsl_style = (*path_args) kw['DOCBOOK_XSL'] = xsl_style def __select_builder(lxml_builder, libxml2_builder, cmdline_builder): 'Selects a builder, based on which Python modules are present.' if prefer_xsltproc: return cmdline_builder if (not has_libxml2): if has_lxml: return lxml_builder else: return cmdline_builder return libxml2_builder def __ensure_suffix(t, suffix): 'Ensure that the target t has the given suffix.' tpath = (t) if (not (suffix)): return (tpath + suffix) return t def __ensure_suffix_stem(t, suffix): "Ensure that the target t has the given suffix, and return the file's stem." tpath = (t) if (not (suffix)): stem = tpath tpath += suffix return (tpath, stem) else: (stem, ext) = (tpath) return (t, stem) def __get_xml_text(root): 'Return the text for the given root node (xml.dom.minidom).' txt = '' for e in root.childNodes: if (e.nodeType == e.TEXT_NODE): txt += e.data return txt def __create_output_dir(base_dir): 'Ensure that the output directory base_dir exists.' (root, tail) = (base_dir) dir = None if tail: if ('/'): dir = base_dir else: dir = root elif ('/'): dir = base_dir if (dir and (not (dir))): (dir) xsltproc_com = {'xsltproc': '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE', 'saxon': '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS', 'saxon-xslt': '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS', 'xalan': '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -q -out $TARGET -xsl $DOCBOOK_XSL -in $SOURCE'} xmllint_com = {'xmllint': '$DOCBOOK_XMLLINT $DOCBOOK_XMLLINTFLAGS --xinclude $SOURCE > $TARGET'} fop_com = {'fop': '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -fo $SOURCE -pdf $TARGET', 'xep': '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -valid -fo $SOURCE -pdf $TARGET', 'jw': '$DOCBOOK_FOP $DOCBOOK_FOPFLAGS -f docbook -b pdf $SOURCE -o $TARGET'} def __detect_cl_tool(env, chainkey, cdict): '\n Helper function, picks a command line tool from the list\n and initializes its environment variables.\n ' if ((chainkey, '') == ''): clpath = '' for cltool in cdict: clpath = (cltool) if clpath: env[chainkey] = clpath if (not env[(chainkey + 'COM')]): env[(chainkey + 'COM')] = cdict[cltool] def _detect(env): '\n Detect all the command line tools that we might need for creating\n the requested output formats.\n ' global prefer_xsltproc if ('DOCBOOK_PREFER_XSLTPROC', ''): prefer_xsltproc = True if (((not has_libxml2) and (not has_lxml)) or prefer_xsltproc): (env, 'DOCBOOK_XSLTPROC', xsltproc_com) (env, 'DOCBOOK_XMLLINT', xmllint_com) (env, 'DOCBOOK_FOP', fop_com) include_re = ('fileref\\s*=\\s*["|\']([^\\n]*)["|\']') sentity_re = ('<!ENTITY\\s+%*\\s*[^\\s]+\\s+SYSTEM\\s+["|\']([^\\n]*)["|\']>') def __xml_scan(node, env, path, arg): 'Simple XML file scanner, detecting local images and XIncludes as implicit dependencies.' if (not ((node))): return [] if ('DOCBOOK_SCANENT', ''): contents = () return (contents) xsl_file = (scriptpath, 'utils', 'xmldepend.xsl') if ((not has_libxml2) or prefer_xsltproc): if (has_lxml and (not prefer_xsltproc)): from lxml import etree xsl_tree = (xsl_file) doc = ((node)) result = (xsl_tree) depfiles = [() for x in () if ((() != '') and (not ('<?xml ')))] return depfiles else: xsltproc = ('$DOCBOOK_XSLTPROC') if (xsltproc and ('xsltproc')): result = (([xsltproc, xsl_file, (node)])) depfiles = [() for x in () if ((() != '') and (not ('<?xml ')))] return depfiles else: contents = () return (contents) styledoc = (xsl_file) style = (styledoc) doc = ((node), None, libxml2.XML_PARSE_NOENT) result = (doc, None) depfiles = [] for x in (): if ((() != '') and (not ('<?xml '))): (()) () () () return depfiles docbook_xml_scanner = () def __generate_xsltproc_action(source, target, env, for_signature): cmd = env['DOCBOOK_XSLTPROCCOM'] base_dir = ('$base_dir') if base_dir: return ('$TARGET', '${TARGET.file}') return cmd def __emit_xsl_basedir(target, source, env): base_dir = ('$base_dir') if base_dir: return ([(base_dir, (t)) for t in target], source) return (target, source) def __build_libxml2(target, source, env): '\n General XSLT builder (HTML/FO), using the libxml2 module.\n ' xsl_style = ('$DOCBOOK_XSL') styledoc = (xsl_style) style = (styledoc) doc = ((source[0]), None, libxml2.XML_PARSE_NOENT) parampass = {} if parampass: result = (doc, parampass) else: result = (doc, None) ((target[0]), result, 0) () () () return None def __build_lxml(target, source, env): '\n General XSLT builder (HTML/FO), using the lxml module.\n ' from lxml import etree xslt_ac = () xsl_style = ('$DOCBOOK_XSL') xsl_tree = (xsl_style) transform = (xsl_tree) doc = ((source[0])) parampass = {} if parampass: result = (doc) else: result = (doc) try: of = ((target[0]), 'w') (((result))) () except: raise return None def __xinclude_libxml2(target, source, env): '\n Resolving XIncludes, using the libxml2 module.\n ' doc = ((source[0]), None, libxml2.XML_PARSE_NOENT) (libxml2.XML_PARSE_NOENT) ((target[0])) () return None def __xinclude_lxml(target, source, env): '\n Resolving XIncludes, using the lxml module.\n ' from lxml import etree doc = ((source[0])) () try: ((target[0])) except: raise return None __libxml2_builder = () __lxml_builder = () __xinclude_libxml2_builder = () __xinclude_lxml_builder = () __xsltproc_builder = () __xmllint_builder = () __fop_builder = () def DocbookEpub(env, target, source=None, *args, **kw): '\n A pseudo-Builder, providing a Docbook toolchain for ePub output.\n ' import zipfile import shutil def build_open_container(target, source, env): 'Generate the *.epub file from intermediate outputs\n\n Constructs the epub file according to the Open Container Format. This\n function could be replaced by a call to the SCons Zip builder if support\n was added for different compression formats for separate source nodes.\n ' zf = ((target[0]), 'w') mime_file = ('mimetype', 'w') ('application/epub+zip') () (mime_file.name) for s in source: if ((s)): (head, tail) = ((s)) if (not head): continue s = head for (dirpath, dirnames, filenames) in ((s)): for fname in filenames: path = (dirpath, fname) if (path): (path, (path, (('ZIPROOT', ''))), zipfile.ZIP_DEFLATED) () def add_resources(target, source, env): 'Add missing resources to the OEBPS directory\n\n Ensure all the resources in the manifest are present in the OEBPS directory.\n ' hrefs = [] content_file = (source[0].abspath, 'content.opf') if (not (content_file)): return hrefs = [] if has_libxml2: nsmap = {'opf': 'http://www.idpf.org/2007/opf'} doc = (content_file, None, 0) opf = () xpath_context = () for (key, val) in (): (key, val) if ((opf, 'xpathEval') and xpath_context): (opf) items = ('.//opf:item') else: items = (".//{'http://www.idpf.org/2007/opf'}item") for item in items: if (item, 'prop'): (('href')) else: (item.attrib['href']) () () elif has_lxml: from lxml import etree opf = (content_file) for item in ('//opf:item'): (item.attrib['href']) for href in hrefs: referenced_file = (source[0].abspath, href) if (not (referenced_file)): (href, (source[0].abspath, href)) (target, source) = (target, source) (kw, env, '$DOCBOOK_DEFAULT_XSL_EPUB', ['epub', 'docbook.xsl']) __builder = (__lxml_builder, __libxml2_builder, __xsltproc_builder) result = [] if (not ('clean')): ('OEBPS/') ('META-INF/') dirs = (['OEBPS', 'META-INF']) kw['base_dir'] = 'OEBPS/' tocncx = (env, 'toc.ncx', source[0]) cxml = ('META-INF/container.xml') (cxml, tocncx) (tocncx, kw['DOCBOOK_XSL']) ((tocncx + [cxml])) container = (((target[0]), '.epub'), (tocncx + [cxml]), [add_resources, build_open_container]) mimetype = ('mimetype') (mimetype, container) (container) (tocncx, dirs) return result def DocbookHtml(env, target, source=None, *args, **kw): '\n A pseudo-Builder, providing a Docbook toolchain for HTML output.\n ' (target, source) = (target, source) (kw, env, '$DOCBOOK_DEFAULT_XSL_HTML', ['html', 'docbook.xsl']) __builder = (__lxml_builder, __libxml2_builder, __xsltproc_builder) result = [] for (t, s) in (target, source): r = (env, (t, '.html'), s) (r, kw['DOCBOOK_XSL']) (r) return result def DocbookHtmlChunked(env, target, source=None, *args, **kw): '\n A pseudo-Builder, providing a Docbook toolchain for chunked HTML output.\n ' if (not (target)): target = [target] if (not source): source = target target = ['index.html'] elif (not (source)): source = [source] (kw, env, '$DOCBOOK_DEFAULT_XSL_HTMLCHUNKED', ['html', 'chunkfast.xsl']) __builder = (__lxml_builder, __libxml2_builder, __xsltproc_builder) base_dir = ('base_dir', '') if base_dir: (base_dir) result = [] r = (env, ((target[0]), '.html'), source[0]) (r, kw['DOCBOOK_XSL']) (r) (r, ((base_dir, '*.html'))) return result def DocbookHtmlhelp(env, target, source=None, *args, **kw): '\n A pseudo-Builder, providing a Docbook toolchain for HTMLHELP output.\n ' if (not (target)): target = [target] if (not source): source = target target = ['index.html'] elif (not (source)): source = [source] (kw, env, '$DOCBOOK_DEFAULT_XSL_HTMLHELP', ['htmlhelp', 'htmlhelp.xsl']) __builder = (__lxml_builder, __libxml2_builder, __xsltproc_builder) base_dir = ('base_dir', '') if base_dir: (base_dir) result = [] r = (env, ((target[0]), '.html'), source[0]) (r, kw['DOCBOOK_XSL']) (r) (r, (['toc.hhc', 'htmlhelp.hhp', 'index.hhk'] + ((base_dir, '[ar|bk|ch]*.html')))) return result def DocbookPdf(env, target, source=None, *args, **kw): '\n A pseudo-Builder, providing a Docbook toolchain for PDF output.\n ' (target, source) = (target, source) (kw, env, '$DOCBOOK_DEFAULT_XSL_PDF', ['fo', 'docbook.xsl']) __builder = (__lxml_builder, __libxml2_builder, __xsltproc_builder) result = [] for (t, s) in (target, source): (t, stem) = (t, '.pdf') xsl = (env, (stem + '.fo'), s) (xsl) (xsl, kw['DOCBOOK_XSL']) ((env, t, xsl)) return result def DocbookMan(env, target, source=None, *args, **kw): '\n A pseudo-Builder, providing a Docbook toolchain for Man page output.\n ' (target, source) = (target, source) (kw, env, '$DOCBOOK_DEFAULT_XSL_MAN', ['manpages', 'docbook.xsl']) __builder = (__lxml_builder, __libxml2_builder, __xsltproc_builder) result = [] for (t, s) in (target, source): volnum = '1' outfiles = [] srcfile = ((s), '.xml') if (srcfile): try: import xml.dom.minidom dom = (((s), '.xml')) for node in ('refmeta'): for vol in ('manvolnum'): volnum = (vol) for node in ('refnamediv'): for ref in ('refname'): ((((ref) + '.') + volnum)) except: f = (((s), '.xml'), 'r') content = () () for m in (content): volnum = (1) for m in (content): ((((1) + '.') + volnum)) if (not outfiles): spath = (s) if (not ('.xml')): (((spath + '.') + volnum)) else: (stem, ext) = (spath) (((stem + '.') + volnum)) else: (t) (env, outfiles[0], s) (outfiles[0], kw['DOCBOOK_XSL']) (outfiles[0]) if ((outfiles) > 1): (outfiles[0], outfiles[1:]) return result def DocbookSlidesPdf(env, target, source=None, *args, **kw): '\n A pseudo-Builder, providing a Docbook toolchain for PDF slides output.\n ' (target, source) = (target, source) (kw, env, '$DOCBOOK_DEFAULT_XSL_SLIDESPDF', ['slides', 'fo', 'plain.xsl']) __builder = (__lxml_builder, __libxml2_builder, __xsltproc_builder) result = [] for (t, s) in (target, source): (t, stem) = (t, '.pdf') xsl = (env, (stem + '.fo'), s) (xsl, kw['DOCBOOK_XSL']) (xsl) ((env, t, xsl)) return result def DocbookSlidesHtml(env, target, source=None, *args, **kw): '\n A pseudo-Builder, providing a Docbook toolchain for HTML slides output.\n ' if (not (target)): target = [target] if (not source): source = target target = ['index.html'] elif (not (source)): source = [source] (kw, env, '$DOCBOOK_DEFAULT_XSL_SLIDESHTML', ['slides', 'html', 'plain.xsl']) __builder = (__lxml_builder, __libxml2_builder, __xsltproc_builder) base_dir = ('base_dir', '') if base_dir: (base_dir) result = [] r = (env, ((target[0]), '.html'), source[0]) (r, kw['DOCBOOK_XSL']) (r) (r, ([(base_dir, 'toc.html')] + ((base_dir, 'foil*.html')))) return result def DocbookXInclude(env, target, source, *args, **kw): '\n A pseudo-Builder, for resolving XIncludes in a separate processing step.\n ' (target, source) = (target, source) __builder = (__xinclude_lxml_builder, __xinclude_libxml2_builder, __xmllint_builder) result = [] for (t, s) in (target, source): ((env, t, s)) return result def DocbookXslt(env, target, source=None, *args, **kw): '\n A pseudo-Builder, applying a simple XSL transformation to the input file.\n ' (target, source) = (target, source) kw['DOCBOOK_XSL'] = ('xsl', 'transform.xsl') __builder = (__lxml_builder, __libxml2_builder, __xsltproc_builder) result = [] for (t, s) in (target, source): r = (env, t, s) (r, kw['DOCBOOK_XSL']) (r) return result def generate(env): 'Add Builders and construction variables for docbook to an Environment.' () (env) try: (DocbookEpub, 'DocbookEpub') (DocbookHtml, 'DocbookHtml') (DocbookHtmlChunked, 'DocbookHtmlChunked') (DocbookHtmlhelp, 'DocbookHtmlhelp') (DocbookPdf, 'DocbookPdf') (DocbookMan, 'DocbookMan') (DocbookSlidesPdf, 'DocbookSlidesPdf') (DocbookSlidesHtml, 'DocbookSlidesHtml') (DocbookXInclude, 'DocbookXInclude') (DocbookXslt, 'DocbookXslt') except AttributeError: from SCons.Script.SConscript import SConsEnvironment SConsEnvironment.DocbookEpub = DocbookEpub SConsEnvironment.DocbookHtml = DocbookHtml SConsEnvironment.DocbookHtmlChunked = DocbookHtmlChunked SConsEnvironment.DocbookHtmlhelp = DocbookHtmlhelp SConsEnvironment.DocbookPdf = DocbookPdf SConsEnvironment.DocbookMan = DocbookMan SConsEnvironment.DocbookSlidesPdf = DocbookSlidesPdf SConsEnvironment.DocbookSlidesHtml = DocbookSlidesHtml SConsEnvironment.DocbookXInclude = DocbookXInclude SConsEnvironment.DocbookXslt = DocbookXslt def exists(env): return 1
"SCons.Tool.icl\n\nTool-specific initialization for the Intel C/C++ compiler.\nSupports Linux and Windows compilers, v7 and up.\n\nThere normally shouldn't be any need to import this module directly.\nIt will usually be imported through the generic SCons.Tool.Tool()\nselection method.\n\n" __revision__ = 'src/engine/SCons/Tool/intelc.py 2014/07/05 09:42:21 garyo' import math, sys, os.path, glob, string, re is_windows = (sys.platform == 'win32') is_win64 = (is_windows and ((os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64') or (('PROCESSOR_ARCHITEW6432' in os.environ) and (os.environ['PROCESSOR_ARCHITEW6432'] == 'AMD64')))) is_linux = ('linux') is_mac = (sys.platform == 'darwin') if is_windows: import SCons.Tool.msvc elif is_linux: import SCons.Tool.gcc elif is_mac: import SCons.Tool.gcc import SCons.Util import SCons.Warnings class IntelCError(SCons.Errors.InternalError): pass class MissingRegistryError(IntelCError): pass class MissingDirError(IntelCError): pass class NoRegistryModuleError(IntelCError): pass def uniquify(s): 'Return a sequence containing only one copy of each unique element from input sequence s.\n Does not preserve order.\n Input sequence must be hashable (i.e. must be usable as a dictionary key).' u = {} for x in s: u[x] = 1 return (()) def linux_ver_normalize(vstr): 'Normalize a Linux compiler version number.\n Intel changed from "80" to "9.0" in 2005, so we assume if the number\n is greater than 60 it\'s an old-style number and otherwise new-style.\n Always returns an old-style float like 80 or 90 for compatibility with Windows.\n Shades of Y2K!' m = ('([0-9]+)\\.([0-9]+)\\.([0-9]+)', vstr) if m: (vmaj, vmin, build) = () return ((((vmaj) * 10.0) + (vmin)) + ((build) / 1000.0)) else: f = (vstr) if is_windows: return f elif (f < 60): return (f * 10.0) else: return f def check_abi(abi): 'Check for valid ABI (application binary interface) name,\n and map into canonical one' if (not abi): return None abi = () if is_windows: valid_abis = {'ia32': 'ia32', 'x86': 'ia32', 'ia64': 'ia64', 'em64t': 'em64t', 'amd64': 'em64t'} if is_linux: valid_abis = {'ia32': 'ia32', 'x86': 'ia32', 'x86_64': 'x86_64', 'em64t': 'x86_64', 'amd64': 'x86_64'} if is_mac: valid_abis = {'ia32': 'ia32', 'x86': 'ia32', 'x86_64': 'x86_64', 'em64t': 'x86_64'} try: abi = valid_abis[abi] except KeyError: raise (('Intel compiler: Invalid ABI %s, valid values are %s' % (abi, (())))) return abi def vercmp(a, b): 'Compare strings as floats,\n but Intel changed Linux naming convention at 9.0' return ((b), (a)) def get_version_from_list(v, vlist): 'See if we can match v (string) in vlist (list of strings)\n Linux has to match in a fuzzy way.' if is_windows: if (v in vlist): return v else: return None else: fuzz = 0.001 for vi in vlist: if ((((vi) - (v))) < fuzz): return vi return None def get_intel_registry_value(valuename, version=None, abi=None): '\n Return a value from the Intel compiler registry tree. (Windows only)\n ' if is_win64: K = ((('Software\\Wow6432Node\\Intel\\Compilers\\C++\\' + version) + '\\') + ()) else: K = ((('Software\\Intel\\Compilers\\C++\\' + version) + '\\') + ()) try: k = (SCons.Util.HKEY_LOCAL_MACHINE, K) except SCons.Util.RegError: if is_win64: K = ((('Software\\Wow6432Node\\Intel\\Suites\\' + version) + '\\Defaults\\C++\\') + ()) else: K = ((('Software\\Intel\\Suites\\' + version) + '\\Defaults\\C++\\') + ()) try: k = (SCons.Util.HKEY_LOCAL_MACHINE, K) uuid = (k, 'SubKey')[0] if is_win64: K = (((('Software\\Wow6432Node\\Intel\\Suites\\' + version) + '\\') + uuid) + '\\C++') else: K = (((('Software\\Intel\\Suites\\' + version) + '\\') + uuid) + '\\C++') k = (SCons.Util.HKEY_LOCAL_MACHINE, K) try: v = (k, valuename)[0] return v except SCons.Util.RegError: if (() == 'EM64T'): abi = 'em64t_native' if is_win64: K = ((((('Software\\Wow6432Node\\Intel\\Suites\\' + version) + '\\') + uuid) + '\\C++\\') + ()) else: K = ((((('Software\\Intel\\Suites\\' + version) + '\\') + uuid) + '\\C++\\') + ()) k = (SCons.Util.HKEY_LOCAL_MACHINE, K) try: v = (k, valuename)[0] return v except SCons.Util.RegError: raise (("%s was not found in the registry, for Intel compiler version %s, abi='%s'" % (K, version, abi))) except SCons.Util.RegError: raise (("%s was not found in the registry, for Intel compiler version %s, abi='%s'" % (K, version, abi))) except WindowsError: raise (("%s was not found in the registry, for Intel compiler version %s, abi='%s'" % (K, version, abi))) try: v = (k, valuename)[0] return v except SCons.Util.RegError: raise (('%s\\%s was not found in the registry.' % (K, valuename))) def get_all_compiler_versions(): 'Returns a sorted list of strings, like "70" or "80" or "9.0"\n with most recent compiler version first.\n ' versions = [] if is_windows: if is_win64: keyname = 'Software\\WoW6432Node\\Intel\\Compilers\\C++' else: keyname = 'Software\\Intel\\Compilers\\C++' try: k = (SCons.Util.HKEY_LOCAL_MACHINE, keyname) except WindowsError: if is_win64: keyname = 'Software\\WoW6432Node\\Intel\\Suites' else: keyname = 'Software\\Intel\\Suites' try: k = (SCons.Util.HKEY_LOCAL_MACHINE, keyname) except WindowsError: return [] i = 0 versions = [] try: while (i < 100): subkey = (k, i) if (subkey == 'Defaults'): i = (i + 1) continue ok = False for try_abi in ('IA32', 'IA32e', 'IA64', 'EM64T'): try: d = ('ProductDir', subkey, try_abi) except MissingRegistryError: continue if (d): ok = True if ok: (subkey) else: try: value = ('ProductDir', subkey, 'IA32') except MissingRegistryError as e: (('scons: *** Ignoring the registry key for the Intel compiler version %s.\nscons: *** It seems that the compiler was uninstalled and that the registry\nscons: *** was not cleaned up properly.\n' % subkey)) else: (('scons: *** Ignoring ' + (value))) i = (i + 1) except EnvironmentError: raise elif (is_linux or is_mac): for d in ('/opt/intel_cc_*'): m = ('cc_(.*)$', d) if m: ((1)) for d in ('/opt/intel/cc*/*'): m = ('([0-9][0-9.]*)$', d) if m: ((1)) for d in ('/opt/intel/Compiler/*'): m = ('([0-9][0-9.]*)$', d) if m: ((1)) for d in ('/opt/intel/composerxe-*'): m = ('([0-9][0-9.]*)$', d) if m: ((1)) for d in ('/opt/intel/composer_xe_*'): m = ('([0-9]{0,4})(?:_sp\\d*)?\\.([0-9][0-9.]*)$', d) if m: (('%s.%s' % ((1), (2)))) def keyfunc(str): 'Given a dot-separated version string, return a tuple of ints representing it.' return [(x) for x in ('.')] return ((versions)) def get_intel_compiler_top(version, abi): '\n Return the main path to the top-level dir of the Intel compiler,\n using the given version.\n The compiler will be in <top>/bin/icl.exe (icc on linux),\n the include dir is <top>/include, etc.\n ' if is_windows: if (not SCons.Util.can_read_reg): raise ('No Windows registry module was found') top = ('ProductDir', version, abi) archdir = {'x86_64': 'intel64', 'amd64': 'intel64', 'em64t': 'intel64', 'x86': 'ia32', 'i386': 'ia32', 'ia32': 'ia32'}[abi] if ((not ((top, 'Bin', 'icl.exe'))) and (not ((top, 'Bin', abi, 'icl.exe'))) and (not ((top, 'Bin', archdir, 'icl.exe')))): raise (("Can't find Intel compiler in %s" % top)) elif (is_mac or is_linux): def find_in_2008style_dir(version): dirs = ('/opt/intel/cc/%s', '/opt/intel_cc_%s') if (abi == 'x86_64'): dirs = ('/opt/intel/cce/%s',) top = None for d in dirs: if (((d % version), 'bin', 'icc')): top = (d % version) break return top def find_in_2010style_dir(version): dirs = ('/opt/intel/Compiler/%s/*' % version) dirs = (dirs) () () top = None for d in dirs: if (((d, 'bin', 'ia32', 'icc')) or ((d, 'bin', 'intel64', 'icc'))): top = d break return top def find_in_2011style_dir(version): top = None for d in ('/opt/intel/composer_xe_*'): m = ('([0-9]{0,4})(?:_sp\\d*)?\\.([0-9][0-9.]*)$', d) if m: cur_ver = ('%s.%s' % ((1), (2))) if ((cur_ver == version) and (((d, 'bin', 'ia32', 'icc')) or ((d, 'bin', 'intel64', 'icc')))): top = d break if (not top): for d in ('/opt/intel/composerxe-*'): m = ('([0-9][0-9.]*)$', d) if (m and ((1) == version) and (((d, 'bin', 'ia32', 'icc')) or ((d, 'bin', 'intel64', 'icc')))): top = d break return top top = ((version) or (version) or (version)) if (not top): raise (("Can't find version %s Intel compiler in %s (abi='%s')" % (version, top, abi))) return top def generate(env, version=None, abi=None, topdir=None, verbose=0): 'Add Builders and construction variables for Intel C/C++ compiler\n to an Environment.\n args:\n version: (string) compiler version to use, like "80"\n abi: (string) \'win32\' or whatever Itanium version wants\n topdir: (string) compiler top dir, like\n "c:\\Program Files\\Intel\\Compiler70"\n If topdir is used, version and abi are ignored.\n verbose: (int) if >0, prints compiler version used.\n ' if (not (is_mac or is_linux or is_windows)): return if is_windows: (env) elif is_linux: (env) elif is_mac: (env) vlist = () if (not version): if vlist: version = vlist[0] else: v = (version, vlist) if (not v): raise ((('Invalid Intel compiler version %s: ' % version) + ('installed versions are %s' % (vlist)))) version = v abi = (abi) if (abi is None): if (is_mac or is_linux): uname_m = ()[4] if (uname_m == 'x86_64'): abi = 'x86_64' else: abi = 'ia32' elif is_win64: abi = 'em64t' else: abi = 'ia32' if (version and (not topdir)): try: topdir = (version, abi) except (SCons.Util.RegError, IntelCError): topdir = None if (not topdir): class ICLTopDirWarning(SCons.Warnings.Warning): pass if (((is_mac or is_linux) and (not ('icc'))) or (is_windows and (not ('icl')))): (ICLTopDirWarning) (ICLTopDirWarning, ("Failed to find Intel compiler for version='%s', abi='%s'" % ((version), (abi)))) else: (ICLTopDirWarning) (ICLTopDirWarning, ("Can't find Intel compiler top dir for version='%s', abi='%s'" % ((version), (abi)))) if topdir: archdir = {'x86_64': 'intel64', 'amd64': 'intel64', 'em64t': 'intel64', 'x86': 'ia32', 'i386': 'ia32', 'ia32': 'ia32'}[abi] if ((topdir, 'bin', archdir)): bindir = ('bin/%s' % archdir) libdir = ('lib/%s' % archdir) else: bindir = 'bin' libdir = 'lib' if verbose: (("Intel C compiler: using version %s (%g), abi %s, in '%s/%s'" % ((version), (version), abi, topdir, bindir))) if is_linux: (('%s/%s/icc --version' % (topdir, bindir))) if is_mac: (('%s/%s/icc --version' % (topdir, bindir))) env['INTEL_C_COMPILER_TOP'] = topdir if is_linux: paths = {'INCLUDE': 'include', 'LIB': libdir, 'PATH': bindir, 'LD_LIBRARY_PATH': libdir} for p in (()): (p, (topdir, paths[p])) if is_mac: paths = {'INCLUDE': 'include', 'LIB': libdir, 'PATH': bindir, 'LD_LIBRARY_PATH': libdir} for p in (()): (p, (topdir, paths[p])) if is_windows: paths = (('INCLUDE', 'IncludeDir', 'Include'), ('LIB', 'LibDir', 'Lib'), ('PATH', 'BinDir', 'Bin')) if (version is None): version = '' for p in paths: try: path = (p[1], version, abi) path = ('$(ICInstallDir)', (topdir + os.sep)) except IntelCError: (p[0], (topdir, p[2])) else: (p[0], (os.pathsep)) if is_windows: env['CC'] = 'icl' env['CXX'] = 'icl' env['LINK'] = 'xilink' else: env['CC'] = 'icc' env['CXX'] = 'icpc' env['AR'] = 'xiar' env['LD'] = 'xild' if version: env['INTEL_C_COMPILER_VERSION'] = (version) if is_windows: envlicdir = ('INTEL_LICENSE_FILE', '') K = 'SOFTWARE\\Intel\\Licenses' try: k = (SCons.Util.HKEY_LOCAL_MACHINE, K) reglicdir = (k, 'w_cpp')[0] except (AttributeError, SCons.Util.RegError): reglicdir = '' defaultlicdir = 'C:\\Program Files\\Common Files\\Intel\\Licenses' licdir = None for ld in [envlicdir, reglicdir]: if (ld and ((('@') != (- 1)) or (ld))): licdir = ld break if (not licdir): licdir = defaultlicdir if (not (licdir)): class ICLLicenseDirWarning(SCons.Warnings.Warning): pass (ICLLicenseDirWarning) (ICLLicenseDirWarning, ('Intel license dir was not found. Tried using the INTEL_LICENSE_FILE environment variable (%s), the registry (%s) and the default path (%s). Using the default path as a last resort.' % (envlicdir, reglicdir, defaultlicdir))) env['ENV']['INTEL_LICENSE_FILE'] = licdir def exists(env): if (not (is_mac or is_linux or is_windows)): return 0 try: versions = () except (SCons.Util.RegError, IntelCError): versions = None detected = ((versions is not None) and ((versions) > 0)) if (not detected): if is_windows: return ('icl') elif is_linux: return ('icc') elif is_mac: return ('icc') return detected
"""SCons.Tool.Packaging.rpm The rpm packager. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. __revision__ = "src/engine/SCons/Tool/packaging/rpm.py 2014/07/05 09:42:21 garyo" import os import SCons.Builder import SCons.Tool.rpmutils from SCons.Environment import OverrideEnvironment from SCons.Tool.packaging import stripinstallbuilder, src_targz from SCons.Errors import UserError def package( env, target, source, PACKAGEROOT, NAME, VERSION, PACKAGEVERSION, DESCRIPTION, SUMMARY, X_RPM_GROUP, LICENSE, **kw ): # initialize the rpm tool SCons.Tool.Tool("rpm").generate(env) bld = env["BUILDERS"]["Rpm"] # Generate a UserError whenever the target name has been set explicitly, # since rpm does not allow for controlling it. This is detected by # checking if the target has been set to the default by the Package() # Environment function. if str(target[0]) != "%s-%s" % (NAME, VERSION): raise UserError("Setting target is not supported for rpm.") else: # This should be overridable from the construction environment, # which it is by using ARCHITECTURE=. buildarchitecture = SCons.Tool.rpmutils.defaultMachine() if "ARCHITECTURE" in kw: buildarchitecture = kw["ARCHITECTURE"] fmt = "%s-%s-%s.%s.rpm" srcrpm = fmt % (NAME, VERSION, PACKAGEVERSION, "src") binrpm = fmt % (NAME, VERSION, PACKAGEVERSION, buildarchitecture) target = [srcrpm, binrpm] # get the correct arguments into the kw hash loc = locals() del loc["kw"] kw.update(loc) del kw["source"], kw["target"], kw["env"] # if no "SOURCE_URL" tag is given add a default one. if "SOURCE_URL" not in kw: # kw['SOURCE_URL']=(str(target[0])+".tar.gz").replace('.rpm', '') kw["SOURCE_URL"] = (str(target[0]) + ".tar.gz").replace(".rpm", "") # mangle the source and target list for the rpmbuild env = OverrideEnvironment(env, kw) target, source = stripinstallbuilder(target, source, env) target, source = addspecfile(target, source, env) target, source = collectintargz(target, source, env) # now call the rpm builder to actually build the packet. return bld(env, target, source, **kw) def collectintargz(target, source, env): """Puts all source files into a tar.gz file.""" # the rpm tool depends on a source package, until this is chagned # this hack needs to be here that tries to pack all sources in. sources = env.FindSourceFiles() # filter out the target we are building the source list for. # sources = [s for s in sources if not (s in target)] sources = [s for s in sources if s not in target] # find the .spec file for rpm and add it since it is not necessarily found # by the FindSourceFiles function. # sources.extend( [s for s in source if str(s).rfind('.spec')!=-1] ) spec_file = lambda s: str(s).rfind(".spec") != -1 sources.extend(list(filter(spec_file, source))) # as the source contains the url of the source package this rpm package # is built from, we extract the target name # tarball = (str(target[0])+".tar.gz").replace('.rpm', '') tarball = (str(target[0]) + ".tar.gz").replace(".rpm", "") try: # tarball = env['SOURCE_URL'].split('/')[-1] tarball = env["SOURCE_URL"].split("/")[-1] except KeyError as e: raise SCons.Errors.UserError( "Missing PackageTag '%s' for RPM packager" % e.args[0] ) tarball = src_targz.package( env, source=sources, target=tarball, PACKAGEROOT=env["PACKAGEROOT"], ) return (target, tarball) def addspecfile(target, source, env): specfile = "%s-%s" % (env["NAME"], env["VERSION"]) bld = SCons.Builder.Builder( action=build_specfile, suffix=".spec", target_factory=SCons.Node.FS.File ) source.extend(bld(env, specfile, source)) return (target, source) def build_specfile(target, source, env): """Builds a RPM specfile from a dictionary with string metadata and by analyzing a tree of nodes. """ file = open(target[0].abspath, "w") str = "" try: file.write(build_specfile_header(env)) file.write(build_specfile_sections(env)) file.write(build_specfile_filesection(env, source)) file.close() # call a user specified function if "CHANGE_SPECFILE" in env: env["CHANGE_SPECFILE"](target, source) except KeyError as e: raise SCons.Errors.UserError( '"%s" package field for RPM is missing.' % e.args[0] ) # # mandatory and optional package tag section # def build_specfile_sections(spec): """Builds the sections of a rpm specfile.""" str = "" mandatory_sections = { "DESCRIPTION": "\n%%description\n%s\n\n", } str = str + SimpleTagCompiler(mandatory_sections).compile(spec) optional_sections = { "DESCRIPTION_": "%%description -l %s\n%s\n\n", "CHANGELOG": "%%changelog\n%s\n\n", "X_RPM_PREINSTALL": "%%pre\n%s\n\n", "X_RPM_POSTINSTALL": "%%post\n%s\n\n", "X_RPM_PREUNINSTALL": "%%preun\n%s\n\n", "X_RPM_POSTUNINSTALL": "%%postun\n%s\n\n", "X_RPM_VERIFY": "%%verify\n%s\n\n", # These are for internal use but could possibly be overriden "X_RPM_PREP": "%%prep\n%s\n\n", "X_RPM_BUILD": "%%build\n%s\n\n", "X_RPM_INSTALL": "%%install\n%s\n\n", "X_RPM_CLEAN": "%%clean\n%s\n\n", } # Default prep, build, install and clean rules # TODO: optimize those build steps, to not compile the project a second time if "X_RPM_PREP" not in spec: spec["X_RPM_PREP"] = ( '[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"' + "\n%setup -q" ) if "X_RPM_BUILD" not in spec: spec["X_RPM_BUILD"] = 'mkdir "$RPM_BUILD_ROOT"' if "X_RPM_INSTALL" not in spec: spec[ "X_RPM_INSTALL" ] = 'scons --install-sandbox="$RPM_BUILD_ROOT" "$RPM_BUILD_ROOT"' if "X_RPM_CLEAN" not in spec: spec[ "X_RPM_CLEAN" ] = '[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"' str = str + SimpleTagCompiler(optional_sections, mandatory=0).compile(spec) return str def build_specfile_header(spec): """Builds all section but the %file of a rpm specfile""" str = "" # first the mandatory sections mandatory_header_fields = { "NAME": "%%define name %s\nName: %%{name}\n", "VERSION": "%%define version %s\nVersion: %%{version}\n", "PACKAGEVERSION": "%%define release %s\nRelease: %%{release}\n", "X_RPM_GROUP": "Group: %s\n", "SUMMARY": "Summary: %s\n", "LICENSE": "License: %s\n", } str = str + SimpleTagCompiler(mandatory_header_fields).compile(spec) # now the optional tags optional_header_fields = { "VENDOR": "Vendor: %s\n", "X_RPM_URL": "Url: %s\n", "SOURCE_URL": "Source: %s\n", "SUMMARY_": "Summary(%s): %s\n", "X_RPM_DISTRIBUTION": "Distribution: %s\n", "X_RPM_ICON": "Icon: %s\n", "X_RPM_PACKAGER": "Packager: %s\n", "X_RPM_GROUP_": "Group(%s): %s\n", "X_RPM_REQUIRES": "Requires: %s\n", "X_RPM_PROVIDES": "Provides: %s\n", "X_RPM_CONFLICTS": "Conflicts: %s\n", "X_RPM_BUILDREQUIRES": "BuildRequires: %s\n", "X_RPM_SERIAL": "Serial: %s\n", "X_RPM_EPOCH": "Epoch: %s\n", "X_RPM_AUTOREQPROV": "AutoReqProv: %s\n", "X_RPM_EXCLUDEARCH": "ExcludeArch: %s\n", "X_RPM_EXCLUSIVEARCH": "ExclusiveArch: %s\n", "X_RPM_PREFIX": "Prefix: %s\n", "X_RPM_CONFLICTS": "Conflicts: %s\n", # internal use "X_RPM_BUILDROOT": "BuildRoot: %s\n", } # fill in default values: # Adding a BuildRequires renders the .rpm unbuildable under System, which # are not managed by rpm, since the database to resolve this dependency is # missing (take Gentoo as an example) # if not s.has_key('x_rpm_BuildRequires'): # s['x_rpm_BuildRequires'] = 'scons' if "X_RPM_BUILDROOT" not in spec: spec["X_RPM_BUILDROOT"] = "%{_tmppath}/%{name}-%{version}-%{release}" str = str + SimpleTagCompiler(optional_header_fields, mandatory=0).compile(spec) return str # # mandatory and optional file tags # def build_specfile_filesection(spec, files): """builds the %file section of the specfile""" str = "%files\n" if "X_RPM_DEFATTR" not in spec: spec["X_RPM_DEFATTR"] = "(-,root,root)" str = str + "%%defattr %s\n" % spec["X_RPM_DEFATTR"] supported_tags = { "PACKAGING_CONFIG": "%%config %s", "PACKAGING_CONFIG_NOREPLACE": "%%config(noreplace) %s", "PACKAGING_DOC": "%%doc %s", "PACKAGING_UNIX_ATTR": "%%attr %s", "PACKAGING_LANG_": "%%lang(%s) %s", "PACKAGING_X_RPM_VERIFY": "%%verify %s", "PACKAGING_X_RPM_DIR": "%%dir %s", "PACKAGING_X_RPM_DOCDIR": "%%docdir %s", "PACKAGING_X_RPM_GHOST": "%%ghost %s", } for file in files: # build the tagset tags = {} for k in list(supported_tags.keys()): try: tags[k] = getattr(file, k) except AttributeError: pass # compile the tagset str = str + SimpleTagCompiler(supported_tags, mandatory=0).compile(tags) str = str + " " str = str + file.PACKAGING_INSTALL_LOCATION str = str + "\n\n" return str class SimpleTagCompiler(object): """This class is a simple string substition utility: the replacement specfication is stored in the tagset dictionary, something like: { "abc" : "cdef %s ", "abc_" : "cdef %s %s" } the compile function gets a value dictionary, which may look like: { "abc" : "ghij", "abc_gh" : "ij" } The resulting string will be: "cdef ghij cdef gh ij" """ def __init__(self, tagset, mandatory=1): self.tagset = tagset self.mandatory = mandatory def compile(self, values): """compiles the tagset and returns a str containing the result""" def is_international(tag): # return tag.endswith('_') return tag[-1:] == "_" def get_country_code(tag): return tag[-2:] def strip_country_code(tag): return tag[:-2] replacements = list(self.tagset.items()) str = "" # domestic = [ (k,v) for k,v in replacements if not is_international(k) ] domestic = [t for t in replacements if not is_international(t[0])] for key, replacement in domestic: try: str = str + replacement % values[key] except KeyError as e: if self.mandatory: raise e # international = [ (k,v) for k,v in replacements if is_international(k) ] international = [t for t in replacements if is_international(t[0])] for key, replacement in international: try: # int_values_for_key = [ (get_country_code(k),v) for k,v in values.items() if strip_country_code(k) == key ] x = [t for t in list(values.items()) if strip_country_code(t[0]) == key] int_values_for_key = [(get_country_code(t[0]), t[1]) for t in x] for v in int_values_for_key: str = str + replacement % v except KeyError as e: if self.mandatory: raise e return str # Local Variables: # tab-width:4 # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=4 shiftwidth=4:
"""SCons.Tool.tex Tool-specific initialization for TeX. Generates .dvi files from .tex files There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # __revision__ = "src/engine/SCons/Tool/tex.py 2014/07/05 09:42:21 garyo" import os.path import re import shutil import sys import platform import glob import SCons.Action import SCons.Node import SCons.Node.FS import SCons.Util import SCons.Scanner.LaTeX Verbose = False must_rerun_latex = True # these are files that just need to be checked for changes and then rerun latex check_suffixes = [".toc", ".lof", ".lot", ".out", ".nav", ".snm"] # these are files that require bibtex or makeindex to be run when they change all_suffixes = check_suffixes + [".bbl", ".idx", ".nlo", ".glo", ".acn", ".bcf"] # # regular expressions used to search for Latex features # or outputs that require rerunning latex # # search for all .aux files opened by latex (recorded in the .fls file) openout_aux_re = re.compile(r"OUTPUT *(.*\.aux)") # search for all .bcf files opened by latex (recorded in the .fls file) # for use by biber openout_bcf_re = re.compile(r"OUTPUT *(.*\.bcf)") # printindex_re = re.compile(r"^[^%]*\\printindex", re.MULTILINE) # printnomenclature_re = re.compile(r"^[^%]*\\printnomenclature", re.MULTILINE) # printglossary_re = re.compile(r"^[^%]*\\printglossary", re.MULTILINE) # search to find rerun warnings warning_rerun_str = "(^LaTeX Warning:.*Rerun)|(^Package \w+ Warning:.*Rerun)" warning_rerun_re = re.compile(warning_rerun_str, re.MULTILINE) # search to find citation rerun warnings rerun_citations_str = "^LaTeX Warning:.*\n.*Rerun to get citations correct" rerun_citations_re = re.compile(rerun_citations_str, re.MULTILINE) # search to find undefined references or citations warnings undefined_references_str = "(^LaTeX Warning:.*undefined references)|(^Package \w+ Warning:.*undefined citations)" undefined_references_re = re.compile(undefined_references_str, re.MULTILINE) # used by the emitter auxfile_re = re.compile(r".", re.MULTILINE) tableofcontents_re = re.compile(r"^[^%\n]*\\tableofcontents", re.MULTILINE) makeindex_re = re.compile(r"^[^%\n]*\\makeindex", re.MULTILINE) bibliography_re = re.compile(r"^[^%\n]*\\bibliography", re.MULTILINE) bibunit_re = re.compile(r"^[^%\n]*\\begin\{bibunit\}", re.MULTILINE) multibib_re = re.compile(r"^[^%\n]*\\newcites\{([^\}]*)\}", re.MULTILINE) addbibresource_re = re.compile( r"^[^%\n]*\\(addbibresource|addglobalbib|addsectionbib)", re.MULTILINE ) listoffigures_re = re.compile(r"^[^%\n]*\\listoffigures", re.MULTILINE) listoftables_re = re.compile(r"^[^%\n]*\\listoftables", re.MULTILINE) hyperref_re = re.compile(r"^[^%\n]*\\usepackage.*\{hyperref\}", re.MULTILINE) makenomenclature_re = re.compile(r"^[^%\n]*\\makenomenclature", re.MULTILINE) makeglossary_re = re.compile(r"^[^%\n]*\\makeglossary", re.MULTILINE) makeglossaries_re = re.compile(r"^[^%\n]*\\makeglossaries", re.MULTILINE) makeacronyms_re = re.compile(r"^[^%\n]*\\makeglossaries", re.MULTILINE) beamer_re = re.compile(r"^[^%\n]*\\documentclass\{beamer\}", re.MULTILINE) regex = r"^[^%\n]*\\newglossary\s*\[([^\]]+)\]?\s*\{([^}]*)\}\s*\{([^}]*)\}\s*\{([^}]*)\}\s*\{([^}]*)\}" newglossary_re = re.compile(regex, re.MULTILINE) biblatex_re = re.compile(r"^[^%\n]*\\usepackage.*\{biblatex\}", re.MULTILINE) newglossary_suffix = [] # search to find all files included by Latex include_re = re.compile(r"^[^%\n]*\\(?:include|input){([^}]*)}", re.MULTILINE) includeOnly_re = re.compile(r"^[^%\n]*\\(?:include){([^}]*)}", re.MULTILINE) # search to find all graphics files included by Latex includegraphics_re = re.compile( r"^[^%\n]*\\(?:includegraphics(?:\[[^\]]+\])?){([^}]*)}", re.MULTILINE ) # search to find all files opened by Latex (recorded in .log file) openout_re = re.compile(r"OUTPUT *(.*)") # list of graphics file extensions for TeX and LaTeX TexGraphics = SCons.Scanner.LaTeX.TexGraphics LatexGraphics = SCons.Scanner.LaTeX.LatexGraphics # An Action sufficient to build any generic tex file. TeXAction = None # An action to build a latex file. This action might be needed more # than once if we are dealing with labels and bibtex. LaTeXAction = None # An action to run BibTeX on a file. BibTeXAction = None # An action to run Biber on a file. BiberAction = None # An action to run MakeIndex on a file. MakeIndexAction = None # An action to run MakeIndex (for nomencl) on a file. MakeNclAction = None # An action to run MakeIndex (for glossary) on a file. MakeGlossaryAction = None # An action to run MakeIndex (for acronyms) on a file. MakeAcronymsAction = None # An action to run MakeIndex (for newglossary commands) on a file. MakeNewGlossaryAction = None # Used as a return value of modify_env_var if the variable is not set. _null = SCons.Scanner.LaTeX._null modify_env_var = SCons.Scanner.LaTeX.modify_env_var def check_file_error_message(utility, filename="log"): msg = "%s returned an error, check the %s file\n" % (utility, filename) sys.stdout.write(msg) def FindFile(name, suffixes, paths, env, requireExt=False): if requireExt: name, ext = SCons.Util.splitext(name) # if the user gave an extension use it. if ext: name = name + ext if Verbose: print(" searching for '%s' with extensions: " % name, suffixes) for path in paths: testName = os.path.join(path, name) if Verbose: print(" look for '%s'" % testName) if os.path.isfile(testName): if Verbose: print(" found '%s'" % testName) return env.fs.File(testName) else: name_ext = SCons.Util.splitext(testName)[1] if name_ext: continue # if no suffix try adding those passed in for suffix in suffixes: testNameExt = testName + suffix if Verbose: print(" look for '%s'" % testNameExt) if os.path.isfile(testNameExt): if Verbose: print(" found '%s'" % testNameExt) return env.fs.File(testNameExt) if Verbose: print(" did not find '%s'" % name) return None def InternalLaTeXAuxAction(XXXLaTeXAction, target=None, source=None, env=None): """A builder for LaTeX files that checks the output in the aux file and decides how many times to use LaTeXAction, and BibTeXAction.""" global must_rerun_latex # This routine is called with two actions. In this file for DVI builds # with LaTeXAction and from the pdflatex.py with PDFLaTeXAction # set this up now for the case where the user requests a different extension # for the target filename if XXXLaTeXAction == LaTeXAction: callerSuffix = ".dvi" else: callerSuffix = env["PDFSUFFIX"] basename = SCons.Util.splitext(str(source[0]))[0] basedir = os.path.split(str(source[0]))[0] basefile = os.path.split(str(basename))[1] abspath = os.path.abspath(basedir) targetext = os.path.splitext(str(target[0]))[1] targetdir = os.path.split(str(target[0]))[0] saved_env = {} for var in SCons.Scanner.LaTeX.LaTeX.env_variables: saved_env[var] = modify_env_var(env, var, abspath) # Create base file names with the target directory since the auxiliary files # will be made there. That's because the *COM variables have the cd # command in the prolog. We check # for the existence of files before opening them--even ones like the # aux file that TeX always creates--to make it possible to write tests # with stubs that don't necessarily generate all of the same files. targetbase = os.path.join(targetdir, basefile) # if there is a \makeindex there will be a .idx and thus # we have to run makeindex at least once to keep the build # happy even if there is no index. # Same for glossaries, nomenclature, and acronyms src_content = source[0].get_text_contents() run_makeindex = makeindex_re.search(src_content) and not os.path.isfile( targetbase + ".idx" ) run_nomenclature = makenomenclature_re.search(src_content) and not os.path.isfile( targetbase + ".nlo" ) run_glossary = makeglossary_re.search(src_content) and not os.path.isfile( targetbase + ".glo" ) run_glossaries = makeglossaries_re.search(src_content) and not os.path.isfile( targetbase + ".glo" ) run_acronyms = makeacronyms_re.search(src_content) and not os.path.isfile( targetbase + ".acn" ) saved_hashes = {} suffix_nodes = {} for suffix in all_suffixes + sum(newglossary_suffix, []): theNode = env.fs.File(targetbase + suffix) suffix_nodes[suffix] = theNode saved_hashes[suffix] = theNode.get_csig() if Verbose: print("hashes: ", saved_hashes) must_rerun_latex = True # .aux files already processed by BibTex already_bibtexed = [] # # routine to update MD5 hash and compare # def check_MD5(filenode, suffix): global must_rerun_latex # two calls to clear old csig filenode.clear_memoized_values() filenode.ninfo = filenode.new_ninfo() new_md5 = filenode.get_csig() if saved_hashes[suffix] == new_md5: if Verbose: print("file %s not changed" % (targetbase + suffix)) return False # unchanged saved_hashes[suffix] = new_md5 must_rerun_latex = True if Verbose: print( "file %s changed, rerunning Latex, new hash = " % (targetbase + suffix), new_md5, ) return True # changed # generate the file name that latex will generate resultfilename = targetbase + callerSuffix count = 0 while must_rerun_latex and count < int(env.subst("$LATEXRETRIES")): result = XXXLaTeXAction(target, source, env) if result != 0: return result count = count + 1 must_rerun_latex = False # Decide if various things need to be run, or run again. # Read the log file to find warnings/errors logfilename = targetbase + ".log" logContent = "" if os.path.isfile(logfilename): logContent = open(logfilename, "rb").read() # Read the fls file to find all .aux files flsfilename = targetbase + ".fls" flsContent = "" auxfiles = [] if os.path.isfile(flsfilename): flsContent = open(flsfilename, "rb").read() auxfiles = openout_aux_re.findall(flsContent) # remove duplicates dups = {} for x in auxfiles: dups[x] = 1 auxfiles = list(dups.keys()) bcffiles = [] if os.path.isfile(flsfilename): flsContent = open(flsfilename, "rb").read() bcffiles = openout_bcf_re.findall(flsContent) # remove duplicates dups = {} for x in bcffiles: dups[x] = 1 bcffiles = list(dups.keys()) if Verbose: print("auxfiles ", auxfiles) print("bcffiles ", bcffiles) # Now decide if bibtex will need to be run. # The information that bibtex reads from the .aux file is # pass-independent. If we find (below) that the .bbl file is unchanged, # then the last latex saw a correct bibliography. # Therefore only do this once # Go through all .aux files and remember the files already done. for auxfilename in auxfiles: if auxfilename not in already_bibtexed: already_bibtexed.append(auxfilename) target_aux = os.path.join(targetdir, auxfilename) if os.path.isfile(target_aux): content = open(target_aux, "rb").read() if content.find("bibdata") != -1: if Verbose: print("Need to run bibtex on ", auxfilename) bibfile = env.fs.File(SCons.Util.splitext(target_aux)[0]) result = BibTeXAction(bibfile, bibfile, env) if result != 0: check_file_error_message(env["BIBTEX"], "blg") must_rerun_latex = True # Now decide if biber will need to be run. # When the backend for biblatex is biber (by choice or default) the # citation information is put in the .bcf file. # The information that biber reads from the .bcf file is # pass-independent. If we find (below) that the .bbl file is unchanged, # then the last latex saw a correct bibliography. # Therefore only do this once # Go through all .bcf files and remember the files already done. for bcffilename in bcffiles: if bcffilename not in already_bibtexed: already_bibtexed.append(bcffilename) target_bcf = os.path.join(targetdir, bcffilename) if os.path.isfile(target_bcf): content = open(target_bcf, "rb").read() if content.find("bibdata") != -1: if Verbose: print("Need to run biber on ", bcffilename) bibfile = env.fs.File(SCons.Util.splitext(target_bcf)[0]) result = BiberAction(bibfile, bibfile, env) if result != 0: check_file_error_message(env["BIBER"], "blg") must_rerun_latex = True # Now decide if latex will need to be run again due to index. if check_MD5(suffix_nodes[".idx"], ".idx") or (count == 1 and run_makeindex): # We must run makeindex if Verbose: print("Need to run makeindex") idxfile = suffix_nodes[".idx"] result = MakeIndexAction(idxfile, idxfile, env) if result != 0: check_file_error_message(env["MAKEINDEX"], "ilg") return result # TO-DO: need to add a way for the user to extend this list for whatever # auxiliary files they create in other (or their own) packages # Harder is case is where an action needs to be called -- that should be rare (I hope?) for index in check_suffixes: check_MD5(suffix_nodes[index], index) # Now decide if latex will need to be run again due to nomenclature. if check_MD5(suffix_nodes[".nlo"], ".nlo") or (count == 1 and run_nomenclature): # We must run makeindex if Verbose: print("Need to run makeindex for nomenclature") nclfile = suffix_nodes[".nlo"] result = MakeNclAction(nclfile, nclfile, env) if result != 0: check_file_error_message("%s (nomenclature)" % env["MAKENCL"], "nlg") # return result # Now decide if latex will need to be run again due to glossary. if ( check_MD5(suffix_nodes[".glo"], ".glo") or (count == 1 and run_glossaries) or (count == 1 and run_glossary) ): # We must run makeindex if Verbose: print("Need to run makeindex for glossary") glofile = suffix_nodes[".glo"] result = MakeGlossaryAction(glofile, glofile, env) if result != 0: check_file_error_message("%s (glossary)" % env["MAKEGLOSSARY"], "glg") # return result # Now decide if latex will need to be run again due to acronyms. if check_MD5(suffix_nodes[".acn"], ".acn") or (count == 1 and run_acronyms): # We must run makeindex if Verbose: print("Need to run makeindex for acronyms") acrfile = suffix_nodes[".acn"] result = MakeAcronymsAction(acrfile, acrfile, env) if result != 0: check_file_error_message("%s (acronyms)" % env["MAKEACRONYMS"], "alg") return result # Now decide if latex will need to be run again due to newglossary command. for ig in range(len(newglossary_suffix)): if check_MD5( suffix_nodes[newglossary_suffix[ig][2]], newglossary_suffix[ig][2] ) or (count == 1): # We must run makeindex if Verbose: print("Need to run makeindex for newglossary") newglfile = suffix_nodes[newglossary_suffix[ig][2]] MakeNewGlossaryAction = SCons.Action.Action( "$MAKENEWGLOSSARY ${SOURCE.filebase}%s -s ${SOURCE.filebase}.ist -t ${SOURCE.filebase}%s -o ${SOURCE.filebase}%s" % ( newglossary_suffix[ig][2], newglossary_suffix[ig][0], newglossary_suffix[ig][1], ), "$MAKENEWGLOSSARYCOMSTR", ) result = MakeNewGlossaryAction(newglfile, newglfile, env) if result != 0: check_file_error_message( "%s (newglossary)" % env["MAKENEWGLOSSARY"], newglossary_suffix[ig][0], ) return result # Now decide if latex needs to be run yet again to resolve warnings. if warning_rerun_re.search(logContent): must_rerun_latex = True if Verbose: print("rerun Latex due to latex or package rerun warning") if rerun_citations_re.search(logContent): must_rerun_latex = True if Verbose: print("rerun Latex due to 'Rerun to get citations correct' warning") if undefined_references_re.search(logContent): must_rerun_latex = True if Verbose: print("rerun Latex due to undefined references or citations") if count >= int(env.subst("$LATEXRETRIES")) and must_rerun_latex: print( "reached max number of retries on Latex ,", int(env.subst("$LATEXRETRIES")), ) # end of while loop # rename Latex's output to what the target name is if not (str(target[0]) == resultfilename and os.path.isfile(resultfilename)): if os.path.isfile(resultfilename): print( "move %s to %s" % ( resultfilename, str(target[0]), ) ) shutil.move(resultfilename, str(target[0])) # Original comment (when TEXPICTS was not restored): # The TEXPICTS enviroment variable is needed by a dvi -> pdf step # later on Mac OSX so leave it # # It is also used when searching for pictures (implicit dependencies). # Why not set the variable again in the respective builder instead # of leaving local modifications in the environment? What if multiple # latex builds in different directories need different TEXPICTS? for var in SCons.Scanner.LaTeX.LaTeX.env_variables: if var == "TEXPICTS": continue if saved_env[var] is _null: try: del env["ENV"][var] except KeyError: pass # was never set else: env["ENV"][var] = saved_env[var] return result def LaTeXAuxAction(target=None, source=None, env=None): result = InternalLaTeXAuxAction(LaTeXAction, target, source, env) return result LaTeX_re = re.compile("\\\\document(style|class)") def is_LaTeX(flist, env, abspath): """Scan a file list to decide if it's TeX- or LaTeX-flavored.""" # We need to scan files that are included in case the # \documentclass command is in them. # get path list from both env['TEXINPUTS'] and env['ENV']['TEXINPUTS'] savedpath = modify_env_var(env, "TEXINPUTS", abspath) paths = env["ENV"]["TEXINPUTS"] if SCons.Util.is_List(paths): pass else: # Split at os.pathsep to convert into absolute path paths = paths.split(os.pathsep) # now that we have the path list restore the env if savedpath is _null: try: del env["ENV"]["TEXINPUTS"] except KeyError: pass # was never set else: env["ENV"]["TEXINPUTS"] = savedpath if Verbose: print("is_LaTeX search path ", paths) print("files to search :", flist) # Now that we have the search path and file list, check each one for f in flist: if Verbose: print(" checking for Latex source ", str(f)) content = f.get_text_contents() if LaTeX_re.search(content): if Verbose: print("file %s is a LaTeX file" % str(f)) return 1 if Verbose: print("file %s is not a LaTeX file" % str(f)) # now find included files inc_files = [] inc_files.extend(include_re.findall(content)) if Verbose: print("files included by '%s': " % str(f), inc_files) # inc_files is list of file names as given. need to find them # using TEXINPUTS paths. # search the included files for src in inc_files: srcNode = FindFile( src, [".tex", ".ltx", ".latex"], paths, env, requireExt=False ) # make this a list since is_LaTeX takes a list. fileList = [ srcNode, ] if Verbose: print("FindFile found ", srcNode) if srcNode is not None: file_test = is_LaTeX(fileList, env, abspath) # return on first file that finds latex is needed. if file_test: return file_test if Verbose: print(" done scanning ", str(f)) return 0 def TeXLaTeXFunction(target=None, source=None, env=None): """A builder for TeX and LaTeX that scans the source file to decide the "flavor" of the source and then executes the appropriate program.""" # find these paths for use in is_LaTeX to search for included files basedir = os.path.split(str(source[0]))[0] abspath = os.path.abspath(basedir) if is_LaTeX(source, env, abspath): result = LaTeXAuxAction(target, source, env) if result != 0: check_file_error_message(env["LATEX"]) else: result = TeXAction(target, source, env) if result != 0: check_file_error_message(env["TEX"]) return result def TeXLaTeXStrFunction(target=None, source=None, env=None): """A strfunction for TeX and LaTeX that scans the source file to decide the "flavor" of the source and then returns the appropriate command string.""" if env.GetOption("no_exec"): # find these paths for use in is_LaTeX to search for included files basedir = os.path.split(str(source[0]))[0] abspath = os.path.abspath(basedir) if is_LaTeX(source, env, abspath): result = env.subst("$LATEXCOM", 0, target, source) + " ..." else: result = env.subst("$TEXCOM", 0, target, source) + " ..." else: result = "" return result def tex_eps_emitter(target, source, env): """An emitter for TeX and LaTeX sources when executing tex or latex. It will accept .ps and .eps graphics files """ (target, source) = tex_emitter_core(target, source, env, TexGraphics) return (target, source) def tex_pdf_emitter(target, source, env): """An emitter for TeX and LaTeX sources when executing pdftex or pdflatex. It will accept graphics files of types .pdf, .jpg, .png, .gif, and .tif """ (target, source) = tex_emitter_core(target, source, env, LatexGraphics) return (target, source) def ScanFiles( theFile, target, paths, file_tests, file_tests_search, env, graphics_extensions, targetdir, aux_files, ): """For theFile (a Node) update any file_tests and search for graphics files then find all included files and call ScanFiles recursively for each of them""" content = theFile.get_text_contents() if Verbose: print(" scanning ", str(theFile)) for i in range(len(file_tests_search)): if file_tests[i][0] is None: if Verbose: print("scan i ", i, " files_tests[i] ", file_tests[i], file_tests[i][1]) file_tests[i][0] = file_tests_search[i].search(content) if Verbose and file_tests[i][0]: print(" found match for ", file_tests[i][1][-1]) # for newglossary insert the suffixes in file_tests[i] if file_tests[i][0] and file_tests[i][1][-1] == "newglossary": findresult = file_tests_search[i].findall(content) for l in range(len(findresult)): (file_tests[i][1]).insert(0, "." + findresult[l][3]) (file_tests[i][1]).insert(0, "." + findresult[l][2]) (file_tests[i][1]).insert(0, "." + findresult[l][0]) suffix_list = [ "." + findresult[l][0], "." + findresult[l][2], "." + findresult[l][3], ] newglossary_suffix.append(suffix_list) if Verbose: print(" new suffixes for newglossary ", newglossary_suffix) incResult = includeOnly_re.search(content) if incResult: aux_files.append(os.path.join(targetdir, incResult.group(1))) if Verbose: print("\include file names : ", aux_files) # recursively call this on each of the included files inc_files = [] inc_files.extend(include_re.findall(content)) if Verbose: print("files included by '%s': " % str(theFile), inc_files) # inc_files is list of file names as given. need to find them # using TEXINPUTS paths. for src in inc_files: srcNode = FindFile( src, [".tex", ".ltx", ".latex"], paths, env, requireExt=False ) if srcNode is not None: file_tests = ScanFiles( srcNode, target, paths, file_tests, file_tests_search, env, graphics_extensions, targetdir, aux_files, ) if Verbose: print(" done scanning ", str(theFile)) return file_tests def tex_emitter_core(target, source, env, graphics_extensions): """An emitter for TeX and LaTeX sources. For LaTeX sources we try and find the common created files that are needed on subsequent runs of latex to finish tables of contents, bibliographies, indices, lists of figures, and hyperlink references. """ basename = SCons.Util.splitext(str(source[0]))[0] basefile = os.path.split(str(basename))[1] targetdir = os.path.split(str(target[0]))[0] targetbase = os.path.join(targetdir, basefile) basedir = os.path.split(str(source[0]))[0] abspath = os.path.abspath(basedir) target[0].attributes.path = abspath # # file names we will make use of in searching the sources and log file # emit_suffixes = [ ".aux", ".log", ".ilg", ".blg", ".nls", ".nlg", ".gls", ".glg", ".alg", ] + all_suffixes auxfilename = targetbase + ".aux" logfilename = targetbase + ".log" flsfilename = targetbase + ".fls" syncfilename = targetbase + ".synctex.gz" env.SideEffect(auxfilename, target[0]) env.SideEffect(logfilename, target[0]) env.SideEffect(flsfilename, target[0]) env.SideEffect(syncfilename, target[0]) if Verbose: print("side effect :", auxfilename, logfilename, flsfilename, syncfilename) env.Clean(target[0], auxfilename) env.Clean(target[0], logfilename) env.Clean(target[0], flsfilename) env.Clean(target[0], syncfilename) content = source[0].get_text_contents() # These variables are no longer used. # idx_exists = os.path.isfile(targetbase + '.idx') # nlo_exists = os.path.isfile(targetbase + '.nlo') # glo_exists = os.path.isfile(targetbase + '.glo') # acr_exists = os.path.isfile(targetbase + '.acn') # set up list with the regular expressions # we use to find features used file_tests_search = [ auxfile_re, makeindex_re, bibliography_re, bibunit_re, multibib_re, addbibresource_re, tableofcontents_re, listoffigures_re, listoftables_re, hyperref_re, makenomenclature_re, makeglossary_re, makeglossaries_re, makeacronyms_re, beamer_re, newglossary_re, biblatex_re, ] # set up list with the file suffixes that need emitting # when a feature is found file_tests_suff = [ [".aux", "aux_file"], [".idx", ".ind", ".ilg", "makeindex"], [".bbl", ".blg", "bibliography"], [".bbl", ".blg", "bibunit"], [".bbl", ".blg", "multibib"], [".bbl", ".blg", ".bcf", "addbibresource"], [".toc", "contents"], [".lof", "figures"], [".lot", "tables"], [".out", "hyperref"], [".nlo", ".nls", ".nlg", "nomenclature"], [".glo", ".gls", ".glg", "glossary"], [".glo", ".gls", ".glg", "glossaries"], [".acn", ".acr", ".alg", "acronyms"], [".nav", ".snm", ".out", ".toc", "beamer"], [ "newglossary", ], [".bcf", ".blg", "biblatex"], ] # for newglossary the suffixes are added as we find the command # build the list of lists file_tests = [] for i in range(len(file_tests_search)): file_tests.append([None, file_tests_suff[i]]) # TO-DO: need to add a way for the user to extend this list for whatever # auxiliary files they create in other (or their own) packages # get path list from both env['TEXINPUTS'] and env['ENV']['TEXINPUTS'] savedpath = modify_env_var(env, "TEXINPUTS", abspath) paths = env["ENV"]["TEXINPUTS"] if SCons.Util.is_List(paths): pass else: # Split at os.pathsep to convert into absolute path paths = paths.split(os.pathsep) # now that we have the path list restore the env if savedpath is _null: try: del env["ENV"]["TEXINPUTS"] except KeyError: pass # was never set else: env["ENV"]["TEXINPUTS"] = savedpath if Verbose: print("search path ", paths) # scan all sources for side effect files aux_files = [] file_tests = ScanFiles( source[0], target, paths, file_tests, file_tests_search, env, graphics_extensions, targetdir, aux_files, ) for theSearch, suffix_list in file_tests: # add side effects if feature is present.If file is to be generated,add all side effects if Verbose and theSearch: print("check side effects for ", suffix_list[-1]) if (theSearch != None) or (not source[0].exists()): file_list = [ targetbase, ] # for bibunit we need a list of files if suffix_list[-1] == "bibunit": file_basename = os.path.join(targetdir, "bu*.aux") file_list = glob.glob(file_basename) # remove the suffix '.aux' for i in range(len(file_list)): file_list.append(SCons.Util.splitext(file_list[i])[0]) # for multibib we need a list of files if suffix_list[-1] == "multibib": for multibibmatch in multibib_re.finditer(content): if Verbose: print("multibib match ", multibibmatch.group(1)) if multibibmatch != None: baselist = multibibmatch.group(1).split(",") if Verbose: print("multibib list ", baselist) for i in range(len(baselist)): file_list.append(os.path.join(targetdir, baselist[i])) # now define the side effects for file_name in file_list: for suffix in suffix_list[:-1]: env.SideEffect(file_name + suffix, target[0]) if Verbose: print( "side effect tst :", file_name + suffix, " target is ", str(target[0]), ) env.Clean(target[0], file_name + suffix) for aFile in aux_files: aFile_base = SCons.Util.splitext(aFile)[0] env.SideEffect(aFile_base + ".aux", target[0]) if Verbose: print("side effect aux :", aFile_base + ".aux") env.Clean(target[0], aFile_base + ".aux") # read fls file to get all other files that latex creates and will read on the next pass # remove files from list that we explicitly dealt with above if os.path.isfile(flsfilename): content = open(flsfilename, "rb").read() out_files = openout_re.findall(content) myfiles = [ auxfilename, logfilename, flsfilename, targetbase + ".dvi", targetbase + ".pdf", ] for filename in out_files[:]: if filename in myfiles: out_files.remove(filename) env.SideEffect(out_files, target[0]) if Verbose: print("side effect fls :", out_files) env.Clean(target[0], out_files) return (target, source) TeXLaTeXAction = None def generate(env): """Add Builders and construction variables for TeX to an Environment.""" global TeXLaTeXAction if TeXLaTeXAction is None: TeXLaTeXAction = SCons.Action.Action( TeXLaTeXFunction, strfunction=TeXLaTeXStrFunction ) env.AppendUnique(LATEXSUFFIXES=SCons.Tool.LaTeXSuffixes) generate_common(env) import dvi dvi.generate(env) bld = env["BUILDERS"]["DVI"] bld.add_action(".tex", TeXLaTeXAction) bld.add_emitter(".tex", tex_eps_emitter) def generate_darwin(env): try: environ = env["ENV"] except KeyError: environ = {} env["ENV"] = environ if platform.system() == "Darwin": try: ospath = env["ENV"]["PATHOSX"] except: ospath = None if ospath: env.AppendENVPath("PATH", ospath) def generate_common(env): """Add internal Builders and construction variables for LaTeX to an Environment.""" # Add OSX system paths so TeX tools can be found # when a list of tools is given the exists() method is not called generate_darwin(env) # A generic tex file Action, sufficient for all tex files. global TeXAction if TeXAction is None: TeXAction = SCons.Action.Action("$TEXCOM", "$TEXCOMSTR") # An Action to build a latex file. This might be needed more # than once if we are dealing with labels and bibtex. global LaTeXAction if LaTeXAction is None: LaTeXAction = SCons.Action.Action("$LATEXCOM", "$LATEXCOMSTR") # Define an action to run BibTeX on a file. global BibTeXAction if BibTeXAction is None: BibTeXAction = SCons.Action.Action("$BIBTEXCOM", "$BIBTEXCOMSTR") # Define an action to run Biber on a file. global BiberAction if BiberAction is None: BiberAction = SCons.Action.Action("$BIBERCOM", "$BIBERCOMSTR") # Define an action to run MakeIndex on a file. global MakeIndexAction if MakeIndexAction is None: MakeIndexAction = SCons.Action.Action("$MAKEINDEXCOM", "$MAKEINDEXCOMSTR") # Define an action to run MakeIndex on a file for nomenclatures. global MakeNclAction if MakeNclAction is None: MakeNclAction = SCons.Action.Action("$MAKENCLCOM", "$MAKENCLCOMSTR") # Define an action to run MakeIndex on a file for glossaries. global MakeGlossaryAction if MakeGlossaryAction is None: MakeGlossaryAction = SCons.Action.Action( "$MAKEGLOSSARYCOM", "$MAKEGLOSSARYCOMSTR" ) # Define an action to run MakeIndex on a file for acronyms. global MakeAcronymsAction if MakeAcronymsAction is None: MakeAcronymsAction = SCons.Action.Action( "$MAKEACRONYMSCOM", "$MAKEACRONYMSCOMSTR" ) try: environ = env["ENV"] except KeyError: environ = {} env["ENV"] = environ # Some Linux platforms have pdflatex set up in a way # that requires that the HOME environment variable be set. # Add it here if defined. v = os.environ.get("HOME") if v: environ["HOME"] = v CDCOM = "cd " if platform.system() == "Windows": # allow cd command to change drives on Windows CDCOM = "cd /D " env["TEX"] = "tex" env["TEXFLAGS"] = SCons.Util.CLVar("-interaction=nonstopmode -recorder") env["TEXCOM"] = CDCOM + "${TARGET.dir} && $TEX $TEXFLAGS ${SOURCE.file}" env["PDFTEX"] = "pdftex" env["PDFTEXFLAGS"] = SCons.Util.CLVar("-interaction=nonstopmode -recorder") env["PDFTEXCOM"] = CDCOM + "${TARGET.dir} && $PDFTEX $PDFTEXFLAGS ${SOURCE.file}" env["LATEX"] = "latex" env["LATEXFLAGS"] = SCons.Util.CLVar("-interaction=nonstopmode -recorder") env["LATEXCOM"] = CDCOM + "${TARGET.dir} && $LATEX $LATEXFLAGS ${SOURCE.file}" env["LATEXRETRIES"] = 4 env["PDFLATEX"] = "pdflatex" env["PDFLATEXFLAGS"] = SCons.Util.CLVar("-interaction=nonstopmode -recorder") env["PDFLATEXCOM"] = ( CDCOM + "${TARGET.dir} && $PDFLATEX $PDFLATEXFLAGS ${SOURCE.file}" ) env["BIBTEX"] = "bibtex" env["BIBTEXFLAGS"] = SCons.Util.CLVar("") env["BIBTEXCOM"] = ( CDCOM + "${TARGET.dir} && $BIBTEX $BIBTEXFLAGS ${SOURCE.filebase}" ) env["BIBER"] = "biber" env["BIBERFLAGS"] = SCons.Util.CLVar("") env["BIBERCOM"] = CDCOM + "${TARGET.dir} && $BIBER $BIBERFLAGS ${SOURCE.filebase}" env["MAKEINDEX"] = "makeindex" env["MAKEINDEXFLAGS"] = SCons.Util.CLVar("") env["MAKEINDEXCOM"] = ( CDCOM + "${TARGET.dir} && $MAKEINDEX $MAKEINDEXFLAGS ${SOURCE.file}" ) env["MAKEGLOSSARY"] = "makeindex" env["MAKEGLOSSARYSTYLE"] = "${SOURCE.filebase}.ist" env["MAKEGLOSSARYFLAGS"] = SCons.Util.CLVar( "-s ${MAKEGLOSSARYSTYLE} -t ${SOURCE.filebase}.glg" ) env["MAKEGLOSSARYCOM"] = ( CDCOM + "${TARGET.dir} && $MAKEGLOSSARY ${SOURCE.filebase}.glo $MAKEGLOSSARYFLAGS -o ${SOURCE.filebase}.gls" ) env["MAKEACRONYMS"] = "makeindex" env["MAKEACRONYMSSTYLE"] = "${SOURCE.filebase}.ist" env["MAKEACRONYMSFLAGS"] = SCons.Util.CLVar( "-s ${MAKEACRONYMSSTYLE} -t ${SOURCE.filebase}.alg" ) env["MAKEACRONYMSCOM"] = ( CDCOM + "${TARGET.dir} && $MAKEACRONYMS ${SOURCE.filebase}.acn $MAKEACRONYMSFLAGS -o ${SOURCE.filebase}.acr" ) env["MAKENCL"] = "makeindex" env["MAKENCLSTYLE"] = "nomencl.ist" env["MAKENCLFLAGS"] = "-s ${MAKENCLSTYLE} -t ${SOURCE.filebase}.nlg" env["MAKENCLCOM"] = ( CDCOM + "${TARGET.dir} && $MAKENCL ${SOURCE.filebase}.nlo $MAKENCLFLAGS -o ${SOURCE.filebase}.nls" ) env["MAKENEWGLOSSARY"] = "makeindex" env["MAKENEWGLOSSARYCOM"] = CDCOM + "${TARGET.dir} && $MAKENEWGLOSSARY " def exists(env): generate_darwin(env) return env.Detect("tex") # Local Variables: # tab-width:4 # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=4 shiftwidth=4:
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ Branch related codes. """ from .ConditionalCodes import generateConditionCode from .LabelCodes import getGotoCode, getLabelCode def generateBranchCode(statement, emit, context): from .CodeGeneration import generateStatementSequenceCode true_target = context.allocateLabel("branch_yes") false_target = context.allocateLabel("branch_no") end_target = context.allocateLabel("branch_end") old_true_target = context.getTrueBranchTarget() old_false_target = context.getFalseBranchTarget() context.setTrueBranchTarget(true_target) context.setFalseBranchTarget(false_target) generateConditionCode( condition=statement.getCondition(), emit=emit, context=context ) context.setTrueBranchTarget(old_true_target) context.setFalseBranchTarget(old_false_target) getLabelCode(true_target, emit) generateStatementSequenceCode( statement_sequence=statement.getBranchYes(), emit=emit, context=context ) if statement.getBranchNo() is not None: getGotoCode(end_target, emit) getLabelCode(false_target, emit) generateStatementSequenceCode( statement_sequence=statement.getBranchNo(), emit=emit, context=context ) getLabelCode(end_target, emit) else: getLabelCode(false_target, emit)
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ Iteration related codes. Next variants and unpacking with related checks. """ from nuitka.PythonVersions import python_version from .ErrorCodes import getErrorExitCode, getErrorExitReleaseCode, getReleaseCode from .Helpers import generateChildExpressionsCode, generateExpressionCode from .Indentation import indented from .LineNumberCodes import getLineNumberUpdateCode from .PythonAPICodes import generateCAPIObjectCode from .templates.CodeTemplatesIterators import ( template_iterator_check, template_loop_break_next, ) def generateBuiltinNext1Code(to_name, expression, emit, context): (value_name,) = generateChildExpressionsCode( expression=expression, emit=emit, context=context ) emit( "%s = %s;" % ( to_name, "ITERATOR_NEXT( %s )" % value_name, ) ) getReleaseCode(release_name=value_name, emit=emit, context=context) getErrorExitCode( check_name=to_name, quick_exception="StopIteration", emit=emit, context=context ) context.addCleanupTempName(to_name) def getBuiltinLoopBreakNextCode(to_name, value, emit, context): emit( "%s = %s;" % ( to_name, "ITERATOR_NEXT( %s )" % value, ) ) getReleaseCode(release_name=value, emit=emit, context=context) break_target = context.getLoopBreakTarget() if type(break_target) is tuple: break_indicator_code = "%s = true;" % break_target[1] break_target = break_target[0] else: break_indicator_code = "" emit( template_loop_break_next % { "to_name": to_name, "break_indicator_code": break_indicator_code, "break_target": break_target, "release_temps": indented(getErrorExitReleaseCode(context), 2), "line_number_code": indented(getLineNumberUpdateCode(context), 2), "exception_target": context.getExceptionEscape(), } ) context.addCleanupTempName(to_name) def getUnpackNextCode(to_name, value, expected, count, emit, context): if python_version < 350: emit("%s = UNPACK_NEXT( %s, %s );" % (to_name, value, count - 1)) else: emit("%s = UNPACK_NEXT( %s, %s, %s );" % (to_name, value, count - 1, expected)) getErrorExitCode( check_name=to_name, quick_exception="StopIteration", emit=emit, context=context ) getReleaseCode(release_name=value, emit=emit, context=context) context.addCleanupTempName(to_name) def generateSpecialUnpackCode(to_name, expression, emit, context): value_name = context.allocateTempName("unpack") generateExpressionCode( to_name=value_name, expression=expression.getValue(), emit=emit, context=context ) getUnpackNextCode( to_name=to_name, value=value_name, count=expression.getCount(), expected=expression.getExpected(), emit=emit, context=context, ) def generateUnpackCheckCode(statement, emit, context): iterator_name = context.allocateTempName("iterator_name") generateExpressionCode( to_name=iterator_name, expression=statement.getIterator(), emit=emit, context=context, ) # These variable cannot collide, as it's used very locally. attempt_name = context.allocateTempName("iterator_attempt", unique=True) release_code = getErrorExitReleaseCode(context) emit( template_iterator_check % { "iterator_name": iterator_name, "attempt_name": attempt_name, "count": statement.getCount(), "exception_exit": context.getExceptionEscape(), "release_temps_1": indented(release_code, 2), "release_temps_2": indented(release_code), } ) getReleaseCode(release_name=iterator_name, emit=emit, context=context) def generateBuiltinNext2Code(to_name, expression, emit, context): generateCAPIObjectCode( to_name=to_name, capi="BUILTIN_NEXT2", arg_desc=( ("next_arg", expression.getIterator()), ("next_default", expression.getDefault()), ), may_raise=expression.mayRaiseException(BaseException), source_ref=expression.getCompatibleSourceReference(), emit=emit, context=context, ) def generateBuiltinIter1Code(to_name, expression, emit, context): generateCAPIObjectCode( to_name=to_name, capi="MAKE_ITERATOR", arg_desc=(("iter_arg", expression.getValue()),), may_raise=expression.mayRaiseException(BaseException), source_ref=expression.getCompatibleSourceReference(), emit=emit, context=context, ) def generateBuiltinIter2Code(to_name, expression, emit, context): generateCAPIObjectCode( to_name=to_name, capi="BUILTIN_ITER2", arg_desc=( ("iter_callable", expression.getCallable()), ("iter_sentinel", expression.getSentinel()), ), may_raise=expression.mayRaiseException(BaseException), source_ref=expression.getCompatibleSourceReference(), emit=emit, context=context, ) def generateBuiltinLenCode(to_name, expression, emit, context): generateCAPIObjectCode( to_name=to_name, capi="BUILTIN_LEN", arg_desc=(("len_arg", expression.getValue()),), may_raise=expression.mayRaiseException(BaseException), source_ref=expression.getCompatibleSourceReference(), emit=emit, context=context, )
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ Templates for code to load frozen bytecode. """ template_frozen_modules = """\ // This provides the frozen (compiled bytecode) files that are included if // any. #include <Python.h> // Blob from which modules are unstreamed. #if defined(_WIN32) && defined(_NUITKA_EXE) extern const unsigned char* constant_bin; #else extern "C" const unsigned char constant_bin[]; #endif #define stream_data constant_bin // These modules should be loaded as bytecode. They may e.g. have to be loadable // during "Py_Initialize" already, or for irrelevance, they are only included // in this un-optimized form. These are not compiled by Nuitka, and therefore // are not accelerated at all, merely bundled with the binary or module, so // that CPython library can start out finding them. void copyFrozenModulesTo( void* destination ) { _frozen frozen_modules[] = { %(frozen_modules)s { NULL, NULL, 0 } }; memcpy( destination, frozen_modules, ( _NUITKA_FROZEN + 1 ) * sizeof( struct _frozen ) ); } """ from . import TemplateDebugWrapper # isort:skip TemplateDebugWrapper.checkDebug(globals())
" Node for the calls to the 'dict' built-in.\n\n" from nuitka.nodes.DictionaryNodes import ExpressionKeyValuePair, ExpressionMakeDict from nuitka.nodes.NodeMakingHelpers import wrapExpressionWithNodeSideEffects from nuitka.optimizations.BuiltinOptimization import builtin_dict_spec from .BuiltinIteratorNodes import ExpressionBuiltinIter1 from .ConstantRefNodes import ExpressionConstantRef from .NodeBases import ExpressionChildrenHavingBase class ExpressionBuiltinDict(ExpressionChildrenHavingBase): kind = 'EXPRESSION_BUILTIN_DICT' named_children = ('pos_arg', 'pairs') def __init__(self, pos_arg, pairs, source_ref): if (not ((pos_arg) not in (tuple, list))): raise (source_ref) if (not ((pairs) in (tuple, list))): raise (source_ref) (self) getPositionalArgument = ('pos_arg') getNamedArgumentPairs = ('pairs') def hasOnlyConstantArguments(self): pos_arg = () if ((pos_arg is not None) and (not ())): return False for arg_pair in (): if (not ()): return False if (not ()): return False return True def computeExpression(self, constraint_collection): pos_arg = () pairs = () if (pos_arg is None): new_node = () return (new_node, 'new_expression', "Replace 'dict' built-in call dictionary creation from arguments.") pos_iteration_length = () if (pos_iteration_length == 0): new_node = () new_node = () if (BaseException): (BaseException) return (new_node, 'new_expression', "Replace 'dict' built-in call dictionary creation from arguments.") if ((pos_iteration_length is not None) and ((pos_iteration_length + (pairs)) < 256) and ()): if (pos_arg is not None): pos_args = (pos_arg,) else: pos_args = None return () else: (BaseException) return (self, None, None) def mayRaiseException(self, exception_type): pos_arg = () if (pos_arg is not None): return True for arg_pair in (): if (exception_type): return True return False def hasShapeDictionaryExact(self): return True
' Loop nodes.\n\nThere are for and loop nodes, but both are reduced to loops with break/continue\nstatements for it. These re-formulations require that optimization of loops has\nto be very general, yet the node type for loop, becomes very simple.\n' from nuitka.optimizations.TraceCollections import ConstraintCollectionBranch from nuitka.tree.Extractions import getVariablesWritten from .Checkers import checkStatementsSequenceOrNone from .NodeBases import NodeBase, StatementChildrenHavingBase class StatementLoop(StatementChildrenHavingBase): kind = 'STATEMENT_LOOP' named_children = ('body',) checkers = {'body': checkStatementsSequenceOrNone} def __init__(self, body, source_ref): (self) self.loop_variables = None getLoopBody = ('body') setLoopBody = ('body') def mayReturn(self): loop_body = () if ((loop_body is not None) and ()): return True return False def mayBreak(self): return False def mayContinue(self): return False def isStatementAborting(self): loop_body = () if (loop_body is None): return True else: return (not ()) def mayRaiseException(self, exception_type): return True def computeLoopBody(self, constraint_collection): abort_context = () with abort_context: loop_body = () if (loop_body is not None): if (self.loop_variables is None): self.loop_variables = (loop_body) loop_entry_traces = () for variable in self.loop_variables: (()) result = () if (result is not loop_body): (result) loop_body = result if (loop_body is not None): if (not ()): () continue_collections = () self.loop_variables = () for loop_entry_trace in loop_entry_traces: variable = () loop_end_traces = () for continue_collection in continue_collections: loop_end_trace = (variable) if (loop_end_trace is not loop_entry_trace): (loop_end_trace) if loop_end_traces: (loop_end_traces) (variable) break_collections = () return (loop_body, break_collections) def computeStatement(self, constraint_collection): outer_constraint_collection = constraint_collection constraint_collection = () (loop_body, break_collections) = (constraint_collection) if (loop_body is not None): if (not ()): raise () statements = () if (not statements): raise () last_statement = statements[(- 1)] if (): if ((statements) == 1): (None) loop_body = None else: (None) ('new_statements', (), "Removed useless terminal 'continue' as last statement of loop.") if break_collections: (break_collections) if (loop_body is not None): if (not ()): raise () statements = () if (not statements): raise () if (((statements) == 1) and ()): return (None, 'new_statements', "Removed useless loop with immediate 'break' statement.") (BaseException) return (self, None, None) class StatementLoopContinue(NodeBase): kind = 'STATEMENT_LOOP_CONTINUE' def __init__(self, source_ref): (self) def isStatementAborting(self): return True def mayRaiseException(self, exception_type): return False def mayContinue(self): return True def computeStatement(self, constraint_collection): () return (self, None, None) class StatementLoopBreak(NodeBase): kind = 'STATEMENT_LOOP_BREAK' def __init__(self, source_ref): (self) def isStatementAborting(self): return True def mayRaiseException(self, exception_type): return False def mayBreak(self): return True def computeStatement(self, constraint_collection): () return (self, None, None)
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ Standard plug-in to take advantage of pylint or PyDev annotations. Nuitka can detect some things that PyLint and PyDev will complain about too, and sometimes it's a false alarm, so people add disable markers into their source code. Nuitka does it itself. This tries to parse the code for these markers and uses hooks to prevent Nuitka from warning about things, disabled to PyLint or Eclipse. The idea is that we won't have another mechanism for Nuitka, but use existing ones instead. The code for this is very incomplete, barely good enough to cover Nuitka's own usage of PyLint markers. PyDev is still largely to be started. You are welcome to grow both. """ import re from nuitka.plugins.PluginBase import NuitkaPluginBase class NuitkaPluginPylintEclipseAnnotations(NuitkaPluginBase): plugin_name = "pylint-warnings" def __init__(self): self.line_annotations = {} def onModuleSourceCode(self, module_name, source_code): annotations = {} for count, line in enumerate(source_code.split("\n")): match = re.search(r"#.*pylint:\s*disable=\s*([\w,]+)", line) if match: comment_only = line[: line.find("#") - 1].strip() == "" if comment_only: # TODO: Parse block wide annotations too. pass else: annotations[count + 1] = set( match.strip() for match in match.group(1).split(",") ) # Only remember them if there were any. if annotations: self.line_annotations[module_name] = annotations # Do nothing to it. return source_code def suppressUnknownImportWarning(self, importing, module_name, source_ref): annotations = self.line_annotations.get(importing.getFullName(), {}) line_annotations = annotations.get(source_ref.getLineNumber(), ()) if "F0401" in line_annotations: return True return False class NuitkaPluginDetectorPylintEclipseAnnotations(NuitkaPluginBase): plugin_name = "pylint-warnings" @staticmethod def isRelevant(): return True def onModuleSourceCode(self, module_name, source_code): if re.search(r"#\s*pylint:\s*disable=\s*(\w+)", source_code): self.warnUnusedPlugin("Understand PyLint/PyDev annotations for warnings.") # Do nothing to it. return source_code
' Reformulation of sequence creations.\n\nSequences might be directly translated to constants, or they might become\nnodes that build tuples, lists, or sets.\n\nFor Python3.5, unpacking can happen while creating sequences, these are\nbeing re-formulated to an internal function.\n\nConsult the developer manual for information. TODO: Add ability to sync\nsource code comments with developer manual sections.\n\n' from nuitka.nodes.AssignNodes import ExpressionTargetTempVariableRef, StatementAssignmentVariable, StatementReleaseVariable from nuitka.nodes.BuiltinIteratorNodes import ExpressionBuiltinIter1, ExpressionBuiltinNext1 from nuitka.nodes.BuiltinTypeNodes import ExpressionBuiltinTuple from nuitka.nodes.ConstantRefNodes import ExpressionConstantRef from nuitka.nodes.ContainerMakingNodes import ExpressionMakeTuple from nuitka.nodes.ContainerOperationNodes import ExpressionListOperationExtend, ExpressionSetOperationUpdate from nuitka.nodes.FunctionNodes import ExpressionFunctionBody, ExpressionFunctionCall, ExpressionFunctionCreation, ExpressionFunctionRef from nuitka.nodes.LoopNodes import StatementLoop, StatementLoopBreak from nuitka.nodes.ParameterSpecs import ParameterSpec from nuitka.nodes.ReturnNodes import StatementReturn from nuitka.nodes.StatementNodes import StatementExpressionOnly from nuitka.nodes.VariableRefNodes import ExpressionTempVariableRef, ExpressionVariableRef from nuitka.PythonVersions import python_version from . import SyntaxErrors from .Helpers import buildNode, buildNodeList, getKind, makeSequenceCreationOrConstant, makeStatementsSequenceFromStatement, makeStatementsSequenceFromStatements from .InternalModule import getInternalModule, internal_source_ref, once_decorator from .ReformulationTryExceptStatements import makeTryExceptSingleHandlerNode from .ReformulationTryFinallyStatements import makeTryFinallyStatement def buildSequenceCreationNode(provider, node, source_ref): if (python_version >= 300): for element in node.elts: if ((element) == 'Starred'): if (python_version < 350): () else: return () return () @once_decorator def getListUnpackingHelper(): helper_name = '_unpack_list' result = () temp_scope = None tmp_result_variable = (temp_scope, 'list') tmp_iter_variable = (temp_scope, 'iter') tmp_item_variable = (temp_scope, 'keys') loop_body = ((), ()) args_variable = () final = ((), (), ()) tried = ((), (), (), ()) ((())) return result @once_decorator def getSetUnpackingHelper(): helper_name = '_unpack_set' result = () temp_scope = None tmp_result_variable = (temp_scope, 'set') tmp_iter_variable = (temp_scope, 'iter') tmp_item_variable = (temp_scope, 'keys') loop_body = ((), ()) args_variable = () final = ((), (), ()) tried = ((), (), (), ()) ((())) return result def buildListUnpacking(provider, elements, source_ref): helper_args = [] for element in elements: if ((element) == 'Starred'): ((provider, element.value, source_ref)) else: (()) result = () (()) return result def _buildTupleUnpacking(provider, elements, source_ref): return () def _buildSetUnpacking(provider, elements, source_ref): helper_args = [] for element in elements: if ((element) == 'Starred'): ((provider, element.value, source_ref)) else: (()) result = () (()) return result def _buildSequenceUnpacking(provider, node, source_ref): kind = (node) if (kind == 'List'): return (provider, node.elts, source_ref) elif (kind == 'Tuple'): return (provider, node.elts, source_ref) elif (kind == 'Set'): return (provider, node.elts, source_ref) elif (not False): raise (kind)
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # def simple_comparisons(x, y): if "a" <= x <= y <= "z": print("One") if "a" <= x <= "z": print("Two") if "a" <= x > "z": print("Three") print("Simple comparisons:") simple_comparisons("c", "d") def side_effect(): print("<side_effect>") return 7 def side_effect_comparisons(): print("Should have side effect:") print(1 < side_effect() < 9) print("Should not have side effect due to short circuit:") print(3 < 2 < side_effect() < 9) print("Check for expected side effects only:") side_effect_comparisons() def function_torture_is(): a = (1, 2, 3) for x in a: for y in a: for z in a: print(x, y, z, ":", x is y is z, x is not y is not z) function_torture_is() print("Check if lambda can have expression chains:", end="") def function_lambda_with_chain(): a = (1, 2, 3) x = lambda x: x[0] < x[1] < x[2] print("lambda result is", x(a)) function_lambda_with_chain() print("Check if generators can have expression chains:", end="") def generator_function_with_chain(): x = (1, 2, 3) yield x[0] < x[1] < x[2] print(list(generator_function_with_chain())) print("Check if list contractions can have expression chains:", end="") def contraction_with_chain(): return [x[0] < x[1] < x[2] for x in [(1, 2, 3)]] print(contraction_with_chain()) print("Check if generator expressions can have expression chains:", end="") def genexpr_with_chain(): return (x[0] < x[1] < x[2] for x in [(1, 2, 3)]) print(list(genexpr_with_chain())) print("Check if class bodies can have expression chains:", end="") class class_with_chain: x = (1, 2, 3) print(x[0] < x[1] < x[2]) x = (1, 2, 3) print(x[0] < x[1] < x[2]) class CustomOps(int): def __lt__(self, other): print("enter <", self, other) return True def __gt__(self, other): print("enter >", self, other) return False print("Custom ops, to enforce chain eval order and short circuit:", end="") print(CustomOps(7) < CustomOps(8) > CustomOps(6)) print("Custom ops, doing short circuit:", end="") print(CustomOps(8) > CustomOps(7) < CustomOps(6)) def inOperatorChain(): print("In operator chains:") print(3 in [3, 4] in [[3, 4]]) print(3 in [3, 4] not in [[3, 4]]) if 3 in [3, 4] in [[3, 4]]: print("Yes") else: print("No") if 3 in [3, 4] not in [[3, 4]]: print("Yes") else: print("No") inOperatorChain() # Make sure the values are called and order is correct: class A(object): def __init__(self, name, value): self.name = name self.value = value def __repr__(self): return "<Value %s %d>" % (self.name, self.value) def __lt__(self, other): print( "less than called for:", self, other, self.value, other.value, self.value < other.value, ) if self.value < other.value: print("good") return 7 else: print("bad") return 0 a = A("a", 1) b = A("b", 2) c = A("c", 0) print(a < b < c) print("*" * 80) a = A("a", 2) b = A("b", 1) c = A("c", 0) print(a < b < c)
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # print("Module name is", __name__) class SomeClass: pass print("Class inside main module names its module as", repr(SomeClass.__module__)) if __name__ == "__main__": print("Executed as __main__:") import sys, os # The sys.argv[0] might contain ".exe", ".py" or no suffix at all. # Remove it, so the "diff" output is more acceptable. args = sys.argv[:] args[0] = os.path.basename(args[0]).replace(".exe", ".py").replace(".py", "") print("Arguments were (stripped argv[0] suffix):", repr(args)) # Output the flags, so we can test if we are compatible with these too. print("The sys.flags are:", sys.flags)
# -*- coding: utf-8 -*- # Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # def plain_list_dict_args_function(plain, *arg_list, **arg_dict): print("plain", plain, "arg_list", arg_list, "arg_dict", arg_dict) def plain_list_args_function(plain, *arg_list): print(plain, arg_list) def plain_dict_args_function(plain, **arg_dict): print(plain, arg_dict) print("Function with plain arg and varargs dict:") plain_dict_args_function(1, a=2, b=3, c=4) plain_dict_args_function(1) print("Function with plain arg and varargs list:") plain_list_args_function(1, 2, 3, 4) plain_list_args_function(1) print("Function with plain arg, varargs list and varargs dict:") plain_list_dict_args_function(1, 2, z=3) plain_list_dict_args_function(1, 2, 3) plain_list_dict_args_function(1, a=2, b=3, c=4) def list_dict_args_function(*arg_list, **arg_dict): print(arg_list, arg_dict) def list_args_function(*arg_list): print(arg_list) def dict_args_function(**arg_dict): print(arg_dict) print("Function with plain arg and varargs dict:") dict_args_function(a=2, b=3, c=4) dict_args_function() print("Function with plain arg and varargs list:") list_args_function(2, 3, 4) list_args_function() print("Function with plain arg, varargs list and varargs dict:") list_dict_args_function(2, z=3) list_dict_args_function(2, 3) list_dict_args_function(a=2, b=3, c=4)
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # def calledRepeatedly(): # We measure making a generator iterator step or not. gen = (x for x in range(3)) x = next(gen) # construct_begin next(gen) # construct_end return x for x in range(50000): calledRepeatedly() print("OK.")
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # def container(): x = [x * 2 for x in range(100000)] container()
#!/usr/bin/env python # Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # """ clockres - calculates the resolution in seconds of a given timer. Copyright (c) 2006, Marc-Andre Lemburg (mal@egenix.com). See the documentation for further information on copyrights, or contact the author. All Rights Reserved. """ import time TEST_TIME = 1.0 def clockres(timer): d = {} wallclock = time.time start = wallclock() stop = wallclock() + TEST_TIME spin_loops = list(range(1000)) while 1: now = wallclock() if now >= stop: break for i in spin_loops: d[timer()] = 1 values = list(d.keys()) values.sort() min_diff = TEST_TIME for i in range(len(values) - 1): diff = values[i + 1] - values[i] if diff < min_diff: min_diff = diff return min_diff if __name__ == "__main__": print("Clock resolution of various timer implementations:") print("time.clock: %10.3fus" % (clockres(time.clock) * 1e6)) print("time.time: %10.3fus" % (clockres(time.time) * 1e6)) try: import systimes print("systimes.processtime: %10.3fus" % (clockres(systimes.processtime) * 1e6)) except ImportError: pass
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # print("This is for relative import.")
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import sys print((type(__builtins__))) sys.exit("Module doing sys.exit") print("This won't happen!")
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # defined_in_pyexpat_subpackage = "see me"
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # def deletingClosure(): a = 1 def closureTaker(): return a del a try: x = closureTaker() except Exception as e: print("Occurred %r" % e) deletingClosure()
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # def f(): a = [] print(a) for i in range(5): print(a) a.append(i) return len(a) print(f())
# $Id: cdp.py 23 2006-11-08 15:45:33Z dugsong $ # -*- coding: utf-8 -*- """Cisco Discovery Protocol.""" import struct import dpkt CDP_DEVID = 1 # string CDP_ADDRESS = 2 CDP_PORTID = 3 # string CDP_CAPABILITIES = 4 # 32-bit bitmask CDP_VERSION = 5 # string CDP_PLATFORM = 6 # string CDP_IPPREFIX = 7 CDP_VTP_MGMT_DOMAIN = 9 # string CDP_NATIVE_VLAN = 10 # 16-bit integer CDP_DUPLEX = 11 # 8-bit boolean CDP_TRUST_BITMAP = 18 # 8-bit bitmask0x13 CDP_UNTRUST_COS = 19 # 8-bit port CDP_SYSTEM_NAME = 20 # string CDP_SYSTEM_OID = 21 # 10-byte binary string CDP_MGMT_ADDRESS = 22 # 32-bit number of addrs, Addresses CDP_LOCATION = 23 # string class CDP(dpkt.Packet): __hdr__ = (("version", "B", 2), ("ttl", "B", 180), ("sum", "H", 0)) class Address(dpkt.Packet): # XXX - only handle NLPID/IP for now __hdr__ = ( ("ptype", "B", 1), # protocol type (NLPID) ("plen", "B", 1), # protocol length ("p", "B", 0xCC), # IP ("alen", "H", 4), # address length ) def unpack(self, buf): dpkt.Packet.unpack(self, buf) self.data = self.data[: self.alen] class TLV(dpkt.Packet): __hdr__ = (("type", "H", 0), ("len", "H", 4)) def unpack(self, buf): dpkt.Packet.unpack(self, buf) self.data = self.data[: self.len - 4] if self.type == CDP_ADDRESS: n = struct.unpack(">I", self.data[:4])[0] buf = self.data[4:] l = [] for i in range(n): a = CDP.Address(buf) l.append(a) buf = buf[len(a) :] self.data = l def __len__(self): if self.type == CDP_ADDRESS: n = 4 + sum(map(len, self.data)) else: n = len(self.data) return self.__hdr_len__ + n def __str__(self): self.len = len(self) if self.type == CDP_ADDRESS: s = struct.pack(">I", len(self.data)) + "".join(map(str, self.data)) else: s = self.data return self.pack_hdr() + s def unpack(self, buf): dpkt.Packet.unpack(self, buf) buf = self.data l = [] while buf: tlv = self.TLV(buf) l.append(tlv) buf = buf[len(tlv) :] self.data = l def __len__(self): return self.__hdr_len__ + sum(map(len, self.data)) def __str__(self): data = "".join(map(str, self.data)) if not self.sum: self.sum = dpkt.in_cksum(self.pack_hdr() + data) return self.pack_hdr() + data
# $Id: ospf.py 23 2006-11-08 15:45:33Z dugsong $ # -*- coding: utf-8 -*- """Open Shortest Path First.""" import dpkt AUTH_NONE = 0 AUTH_PASSWORD = 1 AUTH_CRYPTO = 2 class OSPF(dpkt.Packet): __hdr__ = ( ("v", "B", 0), ("type", "B", 0), ("len", "H", 0), ("router", "I", 0), ("area", "I", 0), ("sum", "H", 0), ("atype", "H", 0), ("auth", "8s", ""), ) def __str__(self): if not self.sum: self.sum = dpkt.in_cksum(dpkt.Packet.__str__(self)) return dpkt.Packet.__str__(self)
#!/usr/bin/python2.7 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab from glob import glob from setuptools import setup NAME = "pycopia-CLI" VERSION = "1.0" setup( name=NAME, version=VERSION, namespace_packages=["pycopia"], packages=["pycopia"], # install_requires = ['pycopia-core==dev'], dependency_links=["http://www.pycopia.net/download/"], scripts=glob("bin/*"), test_suite="test.CLITests", description="Pycopia framework for constructing POSIX/Cisco style command line interface tools.", long_description="""Pycopia framework for constructing POSIX/Cisco style command line interface tools. Supports context commands, argument parsing, debugging aids. Modular design allows you to wrap any object with a CLI tool. """, license="LGPL", author="Keith Dart", author_email="keith@kdart.com", keywords="pycopia CLI framework", url="http://www.pycopia.net/", # download_url = "ftp://ftp.pycopia.net/pub/python/%s.%s.tar.gz" % (NAME, VERSION), classifiers=[ "Operating System :: POSIX", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Networking :: Monitoring", "Intended Audience :: Developers", ], )
# Copyright (C) 2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU LGPL, version 2.1 or a later revision. class TreeWalker(object): """ Content provider for tree structures. Base class for a structured walk over acyclic graphs that can be displayed by :class:`TreeBox` widgets. Subclasses may implement methods * `next_sibling_position` * `prev_sibling_position` * `parent_position` * `first_child_position` * `last_child_position` that compute the next position in the respective direction. Also, they need to implement method `__getitem__` that returns a widget for a given position. The type of objects used as positions may vary in subclasses and is deliberately unspecified for the base class. """ root = None # local helper def _get(self, pos): """loads widget at given position; handling invalid arguments""" res = None, None if pos is not None: try: res = self[pos], pos except (IndexError, KeyError): pass return res def _last_in_direction(self, starting_pos, direction): """ recursively move in the tree in given direction and return the last position. :param starting_pos: position to start in :param direction: callable that transforms a position into a position. """ next_pos = direction(starting_pos) if next_pos is None: return starting_pos else: return self._last_in_direction(next_pos, direction) def depth(self, pos): """determine depth of node at pos""" parent = self.parent_position(pos) if parent is None: return 0 else: return self.depth(parent) + 1 def first_ancestor(self, pos): """ position of pos's ancestor with depth 0. usually, this should return the root node, but a Walker might represent a Forrest - have multiple nodes without parent. """ return self._last_in_direction(pos, self.parent_position) def last_decendant(self, pos): """position of last (in DFO) decendant of pos""" return self._last_in_direction(pos, self.last_child_position) def last_sibling_position(self, pos): """position of last sibling of pos""" return self._last_in_direction(pos, self.next_sibling_position) def first_sibling_position(self, pos): """position of first sibling of pos""" return self._last_in_direction(pos, self.prev_sibling_position) # To be overwritten by subclasses def parent_position(self, pos): """returns the position of the parent node of the node at `pos` or `None` if none exists.""" return None def first_child_position(self, pos): """returns the position of the first child of the node at `pos`, or `None` if none exists.""" return None def last_child_position(self, pos): """returns the position of the last child of the node at `pos`, or `None` if none exists.""" return None def next_sibling_position(self, pos): """returns the position of the next sibling of the node at `pos`, or `None` if none exists.""" return None def prev_sibling_position(self, pos): """returns the position of the previous sibling of the node at `pos`, or `None` if none exists.""" return None class CachingTreeWalker(TreeWalker): """TreeWalker that caches its contained widgets""" def __init__(self, load_widget): """ :param load_widget: a callable that returns a Widget for given position """ TreeWalker.__init__(self) self._content = {} self._load_widget = load_widget def __getitem__(self, pos): if pos not in self._content: widget = self._load_widget(pos) if widget is None: raise IndexError self._content[pos] = widget return self._content[pos] class SimpleTreeWalker(TreeWalker): """ Walks on a given fixed acyclic structure. The structure needs to be a list of nodes; every node is a tuple `(widget, children)`, where widget is a urwid.Widget to be displayed at that position and children is either `None` or a list of nodes. Positions are lists of integers determining a path from toplevel node. """ def __init__(self, treelist, **kwargs): self._treelist = treelist self.root = (0,) if treelist else None TreeWalker.__init__(self, **kwargs) # a few local helper methods def _get_subtree(self, treelist, path): """recursive helper to look up node-tuple for `path` in `treelist`""" subtree = None if len(path) > 1: subtree = self._get_subtree(treelist[path[0]][1], path[1:]) else: try: subtree = treelist[path[0]] except (IndexError, TypeError): pass return subtree def _get_node(self, treelist, path): """look up widget at `path` of `treelist`; default to None if nonexistent.""" node = None if path is not None: subtree = self._get_subtree(treelist, path) if subtree is not None: node = subtree[0] return node def _confirm_pos(self, pos): """look up widget for pos and default to None""" candidate = None if self._get_node(self._treelist, pos) is not None: candidate = pos return candidate # TreeWalker API def __getitem__(self, pos): return self._get_node(self._treelist, pos) def parent_position(self, pos): parent = None if pos is not None: if len(pos) > 1: parent = pos[:-1] return parent def first_child_position(self, pos): return self._confirm_pos(pos + (0,)) def last_child_position(self, pos): candidate = None subtree = self._get_subtree(self._treelist, pos) if subtree is not None: children = subtree[1] if children is not None: candidate = pos + (len(children) - 1,) return candidate def next_sibling_position(self, pos): return self._confirm_pos(pos[:-1] + (pos[-1] + 1,)) def prev_sibling_position(self, pos): return pos[:-1] + (pos[-1] - 1,) if (pos[-1] > 0) else None # optimizations def depth(self, pos): """more performant implementation due to specific structure of pos""" return len(pos) - 1
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab """Report object that populates the test results database. Include this report if you want a test to report its results into the database. The table schema is hierarchical, and some records will hold different set of data from another. The entire set is obtained by custom query in the model object. """ import sys import os import re from datetime import datetime from pycopia import passwd from pycopia import reports from sqlalchemy.orm.exc import NoResultFound from sqlalchemy import and_ from pycopia.db import models from pycopia.db import types [USECASE, SUITE, TEST, RUNNER, UNKNOWN] = types.OBJECTTYPES [EXPECTED_FAIL, NA, ABORT, INCOMPLETE, FAILED, PASSED] = types.TESTRESULTS PROJECT_RE = re.compile(r"(\w+)[ \-.:](\d+)\.(\d+)\.(\d+)[\.\-](\d+)") _COLUMNS = { "testcase": None, # test case record "environment": None, # from config "build": None, # BUILD "tester": None, # user running the test "testversion": None, # Version of test implementation "parent": None, # container object "objecttype": None, # Object type enumeration "starttime": None, # STARTTIME (Test, Suite), RUNNERSTART (module) "endtime": None, # ENDTIME (Test, Suite), RUNNEREND (module) "arguments": None, # TESTARGUMENTS (Test), RUNNERARGUMENTS (module) "result": NA, # PASSED, FAILED, EXPECTED_FAIL, INCOMPLETE, ABORT "diagnostic": None, # The diagnostic message before failure. "resultslocation": None, # url "testimplementation": None, # implementation "reportfilename": None, "note": None, # COMMENT "valid": True, "testsuite": None, # an associated suite } class ResultHolder(object): def __init__(self): self.parent = None self._children = [] self._data = _COLUMNS.copy() self._datapoints = [] # mutable type def __str__(self): d = self._data return "%s (%s) - %s start: %s end: %s" % ( types.OBJECTTYPES[d["objecttype"]], d["testimplementation"], d["result"], d["starttime"], d["endtime"], ) def get_result(self): new = ResultHolder() new.parent = self return new def append(self, obj): self._children.append(obj) def remove(self, obj): self._children.remove(obj) def destroy(self): if self.parent: self.parent.remove(self) for child in self._children: child.destroy() def set(self, cname, val): self._data[cname] = val def get(self, cname): return self._data[cname] def commit(self, dbsession, parentrecord=None): self._data["parent"] = parentrecord if self._data["objecttype"] == TEST: self.resolve_testcase(dbsession) if self._data["objecttype"] == SUITE: self.resolve_testsuite(dbsession) self.resolve_build(dbsession) tr = models.create(models.TestResult, **self._data) dbsession.add(tr) if self._data["objecttype"] == TEST: self.resolve_data(dbsession, tr) for child in self._children: child.commit(dbsession, tr) def emit(self, fo, level=0): fo.write(" " * level) fo.write(str(self)) fo.write("\n") for child in self._children: child.emit(fo, level + 1) def resolve_testcase(self, dbsession): ti = self._data.get("testimplementation") if ti: try: tc = ( dbsession.query(models.TestCase) .filter(models.TestCase.testimplementation == ti) .one() ) except NoResultFound: pass else: self._data["testcase"] = tc def resolve_testsuite(self, dbsession): ti = self._data.get("testimplementation") if ti: try: ts = ( dbsession.query(models.TestSuite) .filter(models.TestSuite.suiteimplementation == ti) .one() ) except NoResultFound: pass else: self._data["testsuite"] = ts def resolve_build(self, dbsession): buildstring = self._data.get("build") if buildstring is None: return mo = PROJECT_RE.search(buildstring) if mo: try: pname, major, minor, sub, build = mo.groups() major = int(major) minor = int(minor) sub = int(sub) build = int(build) except ValueError: self._data["build"] = None return try: proj = ( dbsession.query(models.Project) .filter(models.Project.name == pname) .one() ) except NoResultFound: self._data["build"] = None return try: projectversion = ( dbsession.query(models.ProjectVersion) .filter( and_( models.ProjectVersion.project == proj, models.ProjectVersion.valid == True, models.ProjectVersion.major == major, models.ProjectVersion.minor == minor, models.ProjectVersion.subminor == sub, models.ProjectVersion.build == build, ) ) .one() ) except NoResultFound: projectversion = models.create( models.ProjectVersion, project=proj, valid=True, major=major, minor=minor, subminor=sub, build=build, ) dbsession.add(projectversion) dbsession.commit() self._data["build"] = projectversion else: self._data["build"] = None def resolve_data(self, dbsession, testrecord): dp = self._datapoints if dp: tdl = [ models.create( models.TestResultData, data=hldr.data, note=hldr.note, testresult=testrecord, ) for hldr in dp ] for tr in tdl: dbsession.add(tr) testrecord.data = tdl self._datapoints = None class DataHolder(object): def __init__(self, data, note): self.data = data self.note = note def get_user(conf): sess = conf.session pwent = passwd.getpwuid(os.getuid()) try: # user = models.User.objects.get(username=pwent.name) user = sess.query(models.User).filter(models.User.username == pwent.name).one() except NoResultFound: user = models.create_user(sess, pwent) return user def get_environment(conf): sess = conf.session name = conf.get("environmentname", "default") return sess.query(models.Environment).filter(models.Environment.name == name).one() # When constructing a report from report messages: # transition table: # from: to: RUNNER USECASE SUITE TEST # RUNNER NA push push push # USECASE pop add push push # SUITE pop pop add push # TEST pop pop pop add class DatabaseReport(reports.NullReport): MIMETYPE = property(lambda self: self._MIMETYPE) def initialize(self, cf): # here is where information from the global configuration that is # needed in the database record is kept until the records are written # in the finalize method. self._dbsession = cf.session self._debug = cf.flags.DEBUG self._testid = None self._environment = get_environment(cf) self._rootresult = ResultHolder() self._rootresult.set("environment", self._environment) self._rootresult.set("result", NA) self._rootresult.set("objecttype", RUNNER) self._currentresult = self._rootresult self._MIMETYPE = "text/plain" # all reports have a mime type user = cf.get("user") if user is None: user = get_user(cf) self._user = user self._rootresult.set("tester", self._user) def finalize(self): self._currentresult = None root = self._rootresult self._rootresult = None if self._debug: sys.stderr.write("\nReport structure:\n") root.emit(sys.stdout) else: root.commit(self._dbsession) self._dbsession.commit() root.destroy() def new_result(self, otype): new = self._currentresult.get_result() new.set("environment", self._environment) new.set("testversion", self._testid) new.set("tester", self._user) new.set("objecttype", types.OBJECTTYPES[otype]) return new def add_result(self, otype): # really a pop-push operation. self.pop_result() self.push_result(otype) def push_result(self, otype): if self._debug: sys.stderr.write(" *** push_result: %s\n" % (types.OBJECTTYPES[otype],)) new = self.new_result(otype) self._currentresult.append(new) self._currentresult = new def pop_result(self): if self._debug: sys.stderr.write(" *** pop_result\n") self._currentresult = self._currentresult.parent def logfile(self, filename): pass # XXX store log file name? def add_title(self, text): # only the test runner sends this. pass def add_heading(self, text, level): # level = 1 for suites, 2 for tests, 3 for other # signals new test and test suite record. currenttype = self._currentresult.get("objecttype") if currenttype == RUNNER: self.push_result(level) # runner -> (suite | test) elif currenttype == USECASE: self.push_result(level) # module/usecase -> (suite | test) elif currenttype == SUITE: if level == 1: # suite -> suite self.add_result(level) elif level == 2: # suite -> test self.push_result(level) elif currenttype == TEST: if level == 1: # test -> suite self.pop_result() elif level == 2: # test -> test self.add_result(level) elif level == 3: # suite summary result starting self.pop_result() # Add the implementation name if a suite or a test. if level in (1, 2): self._currentresult.set("testimplementation", text) def add_message(self, msgtype, msg, level=0): if msgtype == "RUNNERARGUMENTS": self._rootresult.set("arguments", msg) elif msgtype == "RUNNERSTARTTIME": self._rootresult.set("starttime", datetime.fromtimestamp(msg)) elif msgtype == "RUNNERENDTIME": self._rootresult.set("endtime", datetime.fromtimestamp(msg)) elif msgtype == "COMMENT": self._rootresult.set("note", msg) elif msgtype == "TESTARGUMENTS": self._currentresult.set("arguments", msg) elif msgtype == "STARTTIME": self._currentresult.set("starttime", datetime.fromtimestamp(msg)) elif msgtype == "ENDTIME": self._currentresult.set("endtime", datetime.fromtimestamp(msg)) elif msgtype == "MODULEVERSION": self._testid = msg elif msgtype == "USECASESTARTTIME": currenttype = self._currentresult.get("objecttype") if currenttype == RUNNER: self.push_result(0) # runner -> module self._currentresult.set("starttime", datetime.fromtimestamp(msg)) elif currenttype == USECASE: self.add_result(0) # module/usecase -> module/usecase self._currentresult.set("starttime", datetime.fromtimestamp(msg)) elif currenttype == SUITE: self.pop_result() # suite -> module/usecase elif currenttype == TEST: self.pop_result() # test -> module/usecase elif msgtype == "MODULEENDTIME": currenttype = self._currentresult.get("objecttype") if currenttype == SUITE: self.pop_result() # suite -> runner elif currenttype == TEST: self.pop_result() # test -> runner self._currentresult.set("endtime", datetime.fromtimestamp(msg)) self._currentresult.set("result", NA) elif msgtype == "BUILD": self._currentresult.set("build", msg) def passed(self, msg, level=1): self._currentresult.set("result", PASSED) if not self._currentresult.get("diagnostic"): self._currentresult.set("diagnostic", str(msg)) def failed(self, msg, level=1): # If test did not write a diagnostic message then use fail message as # diagnostic. if not self._currentresult.get("diagnostic"): self._currentresult.set("diagnostic", str(msg)) self._currentresult.set("result", FAILED) def expectedfail(self, msg, level=1): if not self._currentresult.get("diagnostic"): self._currentresult.set("diagnostic", str(msg)) self._currentresult.set("result", EXPECTED_FAIL) def incomplete(self, msg, level=1): if not self._currentresult.get("diagnostic"): self._currentresult.set("diagnostic", str(msg)) self._currentresult.set("result", INCOMPLETE) def abort(self, msg, level=1): self._currentresult.set("result", ABORT) def diagnostic(self, msg, level=1): self._currentresult.set("diagnostic", str(msg)) def add_summary(self, entries): pass def add_text(self, text): pass def add_data(self, data, note=None): if self._debug: sys.stderr.write(" *** add data: {!r}\n".format(data)) else: self._currentresult._datapoints.append(DataHolder(data, note)) def add_url(self, text, url): self._rootresult.set("resultslocation", url)
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ List system Object Requirements. Usage: sysOR <agent> [<community>] """ import sys from pycopia.SNMP import SNMP from pycopia.SNMP import Manager from pycopia.mibs import SNMPv2_MIB def main(argv): host = argv[1] sd = SNMP.sessionData(host) if len(argv) > 2: sd.add_community(argv[2]) else: sd.add_community("public") sess = SNMP.new_session(sd) mgr = Manager.Manager(sess) mgr.add_mib(SNMPv2_MIB) ors = mgr.getall("sysOR") for ore in ors: print(ore) main(sys.argv)
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from pycopia.nmsapps import core, _ TITLE = _("Reports") def main(request): if request.method == "GET": resp = core.ResponseDocument(request, title=TITLE, javascriptlink="reports.js") resp.fill_nav(resp.config.DEFAULTNAV) resp.header.add_header(1, TITLE) p = resp.NM( "P", None, resp.NM( "A", {"href": resp.get_url(reports, report="sample")}, _("Sample Report"), ), ) resp.sidebar.append(p) return resp.finalize() else: return core.ONLY_GET def reports(request, report): if request.method == "GET": resp = core.ResponseDocument(request, title="Report for %s." % (report,)) resp.content.new_para("Stay tuned...") return resp.finalize() else: return core.ONLY_GET
#!/usr/bin/python # This file generated by a program. do not edit. import pycopia.XML.POM attribDirection_50741361576644121884686865416273322500 = pycopia.XML.POM.XMLAttribute( "direction", pycopia.XML.POM.Enumeration(("ltr", "rtl", "inherit")), 12, None ) attribOnend_2245217001552764273737467841846343401 = pycopia.XML.POM.XMLAttribute( "onend", 1, 12, None ) attribAmplitude_4136392295356350389073186455656458304 = pycopia.XML.POM.XMLAttribute( "amplitude", 1, 12, None ) attribAccumulate_5160601998326329630873998491968862409 = pycopia.XML.POM.XMLAttribute( "accumulate", pycopia.XML.POM.Enumeration(("none", "sum")), 13, "none" ) attribKeypoints_52172241001911673761565816882440466081 = pycopia.XML.POM.XMLAttribute( "keyPoints", 1, 12, None ) attribLengthadjust_14164826843329396435796434101438128164 = ( pycopia.XML.POM.XMLAttribute( "lengthAdjust", pycopia.XML.POM.Enumeration(("spacing", "spacingAndGlyphs")), 12, None, ) ) attribHanging_34931596242724169996219146589420399929 = pycopia.XML.POM.XMLAttribute( "hanging", 1, 12, None ) attribOrigin_17475329533415154540648306660025500100 = pycopia.XML.POM.XMLAttribute( "origin", 1, 12, None ) attribHeight_8656938303784040090070221295861351424 = pycopia.XML.POM.XMLAttribute( "height", 1, 11, None ) attribEnable_background_10797894589918037147751517612226253649 = ( pycopia.XML.POM.XMLAttribute("enable-background", 1, 12, None) ) attribFilter_320741374428112880781585460803247236 = pycopia.XML.POM.XMLAttribute( "filter", 1, 12, None ) attribOnrepeat_9407010955317998069225248436550607504 = pycopia.XML.POM.XMLAttribute( "onrepeat", 1, 12, None ) attribTarget_53140914068584812121339566534355065025 = pycopia.XML.POM.XMLAttribute( "target", 7, 12, None ) attribK_8269185087040940339243697043273921 = pycopia.XML.POM.XMLAttribute( "k", 1, 11, None ) attribClip_rule_1895509774231723537306902184373439076 = pycopia.XML.POM.XMLAttribute( "clip-rule", pycopia.XML.POM.Enumeration(("nonzero", "evenodd", "inherit")), 12, None, ) attribStitchtiles_8708553574096507571273713290523302129 = pycopia.XML.POM.XMLAttribute( "stitchTiles", pycopia.XML.POM.Enumeration(("stitch", "noStitch")), 13, "noStitch" ) attribMode_9874845349396367372980310088803820681 = pycopia.XML.POM.XMLAttribute( "mode", pycopia.XML.POM.Enumeration(("normal", "multiply", "screen", "darken", "lighten")), 13, "normal", ) attribHoriz_origin_y_80282076955515527638161078326023131049 = ( pycopia.XML.POM.XMLAttribute("horiz-origin-y", 1, 12, None) ) attribPatternunits_42801038907507202474474010922430291329 = ( pycopia.XML.POM.XMLAttribute( "patternUnits", pycopia.XML.POM.Enumeration(("userSpaceOnUse", "objectBoundingBox")), 12, None, ) ) attribImage_rendering_53317710716347206734451839103650926864 = ( pycopia.XML.POM.XMLAttribute( "image-rendering", pycopia.XML.POM.Enumeration( ("auto", "optimizeSpeed", "optimizeQuality", "inherit") ), 12, None, ) ) attribBegin_15132218401583472173474579121984357904 = pycopia.XML.POM.XMLAttribute( "begin", 1, 12, None ) attribTransform_5682546015111540170885688523292561121 = pycopia.XML.POM.XMLAttribute( "transform", 1, 12, None ) attribDescent_51334377584264966489343671075317636561 = pycopia.XML.POM.XMLAttribute( "descent", 1, 12, None ) attribK2_63495797100718105204329329418938658121 = pycopia.XML.POM.XMLAttribute( "k2", 1, 12, None ) attribFy_44682967778457677796198831437379031225 = pycopia.XML.POM.XMLAttribute( "fy", 1, 12, None ) attribName_84894284207451587588065513260296081316 = pycopia.XML.POM.XMLAttribute( "name", 1, 11, None ) attribV_ideographic_81922512024909328809261482418027034921 = ( pycopia.XML.POM.XMLAttribute("v-ideographic", 1, 12, None) ) attribValues_45161171665899557065152411528096242436 = pycopia.XML.POM.XMLAttribute( "values", 1, 12, None ) attribOnmouseover_47178636339604918569276565427294304049 = pycopia.XML.POM.XMLAttribute( "onmouseover", 1, 12, None ) attribLocal_7961305551933250848674023048336560804 = pycopia.XML.POM.XMLAttribute( "local", 1, 12, None ) attribK1_71737762493320640071500910929276028816 = pycopia.XML.POM.XMLAttribute( "k1", 1, 12, None ) attribRy_110097357351798911254863028367766916 = pycopia.XML.POM.XMLAttribute( "ry", 1, 11, None ) attribK4_3622623635537096506905483913400932729 = pycopia.XML.POM.XMLAttribute( "k4", 1, 12, None ) attribContentscripttype_82167739205859101376698046218554960996 = ( pycopia.XML.POM.XMLAttribute("contentScriptType", 1, 13, "text/ecmascript") ) attribWidths_5469989460745998970129580404284025 = pycopia.XML.POM.XMLAttribute( "widths", 1, 12, None ) attribCy_18700519888591364754960118759930360464 = pycopia.XML.POM.XMLAttribute( "cy", 1, 12, None ) attribXml_space_20824453535985117084656487508868316816 = pycopia.XML.POM.XMLAttribute( "xml:space", pycopia.XML.POM.Enumeration(("preserve",)), 14, "preserve" ) attribAlphabetic_59120698516511154438257096328810382969 = pycopia.XML.POM.XMLAttribute( "alphabetic", 1, 12, None ) attribOnbegin_64409703518877412211179561641113665801 = pycopia.XML.POM.XMLAttribute( "onbegin", 1, 12, None ) attribDur_247488895394240938561450566804576400 = pycopia.XML.POM.XMLAttribute( "dur", 1, 12, None ) attribSystemlanguage_50670925657355739810136037650249585761 = ( pycopia.XML.POM.XMLAttribute("systemLanguage", 1, 12, None) ) attribAzimuth_74070377867045842519926503799918587641 = pycopia.XML.POM.XMLAttribute( "azimuth", 1, 12, None ) attribUnderline_thickness_14150513165103668573928594902934898576 = ( pycopia.XML.POM.XMLAttribute("underline-thickness", 1, 12, None) ) attribClip_path_6848405700625226295163574524817559769 = pycopia.XML.POM.XMLAttribute( "clip-path", 1, 12, None ) attribOffset_71549239984150950824190812492777137081 = pycopia.XML.POM.XMLAttribute( "offset", 1, 12, None ) attribColor_rendering_84749112504343521403113788104037816484 = ( pycopia.XML.POM.XMLAttribute( "color-rendering", pycopia.XML.POM.Enumeration( ("auto", "optimizeSpeed", "optimizeQuality", "inherit") ), 12, None, ) ) attribAttributename_53519243694208722527102928715213190025 = ( pycopia.XML.POM.XMLAttribute("attributeName", 1, 11, None) ) attribKerning_50722104490749097963249774417612741921 = pycopia.XML.POM.XMLAttribute( "kerning", 1, 12, None ) attribStemv_299825612028381389960136290560469136 = pycopia.XML.POM.XMLAttribute( "stemv", 1, 12, None ) attribFormat_17062038506069968479150666733128037081 = pycopia.XML.POM.XMLAttribute( "format", 1, 12, None ) attribExternalresourcesrequired_4027549857308015558836428413314244100 = ( pycopia.XML.POM.XMLAttribute( "externalResourcesRequired", pycopia.XML.POM.Enumeration(("false", "true")), 12, None, ) ) attribPatterntransform_28756772111575467463426355018409449536 = ( pycopia.XML.POM.XMLAttribute("patternTransform", 1, 12, None) ) attribXlink_show_3609924616854662305799354277279764736 = pycopia.XML.POM.XMLAttribute( "xlink:show", pycopia.XML.POM.Enumeration(("other",)), 13, "other" ) attribOnmouseup_9659590693716211851815581080578241600 = pycopia.XML.POM.XMLAttribute( "onmouseup", 1, 12, None ) attribG2_19365468475860401780421710593103281041 = pycopia.XML.POM.XMLAttribute( "g2", 1, 12, None ) attribOpacity_26995226223223505626239894655606671556 = pycopia.XML.POM.XMLAttribute( "opacity", 1, 12, None ) attribStroke_miterlimit_44219326472013156591096670907628364804 = ( pycopia.XML.POM.XMLAttribute("stroke-miterlimit", 1, 12, None) ) attribLetter_spacing_5253185889313623965160683321735235600 = ( pycopia.XML.POM.XMLAttribute("letter-spacing", 1, 12, None) ) attribClass_53825496146914797399013018272928945089 = pycopia.XML.POM.XMLAttribute( "class", 1, 12, None ) attribPathlength_24197452731674064653754275809953485881 = pycopia.XML.POM.XMLAttribute( "pathLength", 1, 12, None ) attribFlood_opacity_68167202677622514404623885740804768529 = ( pycopia.XML.POM.XMLAttribute("flood-opacity", 1, 12, None) ) attribOrient_45640432084101417101661629749580668225 = pycopia.XML.POM.XMLAttribute( "orient", 1, 12, None ) attribTo_9054208321628946284316156841392201 = pycopia.XML.POM.XMLAttribute( "to", 1, 12, None ) attribPointsaty_4533565914723288637628523286344145296 = pycopia.XML.POM.XMLAttribute( "pointsAtY", 1, 12, None ) attribGlyph_orientation_vertical_35687216979934895567402669205779868004 = ( pycopia.XML.POM.XMLAttribute("glyph-orientation-vertical", 1, 12, None) ) attribMathematical_14275398001026280330477672901641156 = pycopia.XML.POM.XMLAttribute( "mathematical", 1, 12, None ) attribXlink_href_2755370540755234876192785331197698704 = pycopia.XML.POM.XMLAttribute( "xlink:href", 1, 11, None ) attribFill_29390659501544115112792031566291654129 = pycopia.XML.POM.XMLAttribute( "fill", pycopia.XML.POM.Enumeration(("remove", "freeze")), 13, "remove" ) attribOperator_2180036693494496471972351013929214289 = pycopia.XML.POM.XMLAttribute( "operator", pycopia.XML.POM.Enumeration(("over", "in", "out", "atop", "xor", "arithmetic")), 13, "over", ) attribLighting_color_15620794847772789058374480175215337284 = ( pycopia.XML.POM.XMLAttribute("lighting-color", 1, 12, None) ) attribViewbox_12676804841166570607454313509590524225 = pycopia.XML.POM.XMLAttribute( "viewBox", 1, 12, None ) attribPointer_events_57203517089542979061762370669183605625 = ( pycopia.XML.POM.XMLAttribute( "pointer-events", pycopia.XML.POM.Enumeration( ( "visiblePainted", "visibleFill", "visibleStroke", "visible", "painted", "fill", "stroke", "all", "none", "inherit", ) ), 12, None, ) ) attribOffset_71549422301704647300527896361591227456 = pycopia.XML.POM.XMLAttribute( "offset", 1, 11, None ) attribV_hanging_14909105560552330782176372987382076516 = pycopia.XML.POM.XMLAttribute( "v-hanging", 1, 12, None ) attribBaseline_shift_64233503779117388138851429938275877316 = ( pycopia.XML.POM.XMLAttribute("baseline-shift", 1, 12, None) ) attribFlood_color_62406031729681475456233843693231490401 = pycopia.XML.POM.XMLAttribute( "flood-color", 1, 12, None ) attribFont_variant_68974315701196087565896385915847564529 = ( pycopia.XML.POM.XMLAttribute( "font-variant", pycopia.XML.POM.Enumeration(("normal", "small-caps", "inherit")), 12, None, ) ) attribClip_83048463177368902516715179467471424 = pycopia.XML.POM.XMLAttribute( "clip", 1, 12, None ) attribLang_3957035975039297683050790048781144644 = pycopia.XML.POM.XMLAttribute( "lang", 1, 12, None ) attribFx_3820135096745003435155997809823543844 = pycopia.XML.POM.XMLAttribute( "fx", 1, 12, None ) attribUnicode_range_5812204079751571614165117284020778884 = ( pycopia.XML.POM.XMLAttribute("unicode-range", 1, 12, None) ) attribCalcmode_15704815580393352200060891219264080201 = pycopia.XML.POM.XMLAttribute( "calcMode", pycopia.XML.POM.Enumeration(("discrete", "linear", "paced", "spline")), 13, "linear", ) attribArabic_form_10335265318153016256141548181171552100 = pycopia.XML.POM.XMLAttribute( "arabic-form", 1, 12, None ) attribCursor_36438614741117041205662488082241270404 = pycopia.XML.POM.XMLAttribute( "cursor", 1, 12, None ) attribR_24449888294900485345055942086260101281 = pycopia.XML.POM.XMLAttribute( "r", 1, 12, None ) attribRestart_12728825596617743269027730283262276 = pycopia.XML.POM.XMLAttribute( "restart", pycopia.XML.POM.Enumeration(("always", "never", "whenNotActive")), 13, "always", ) attribOnzoom_806993799907768989601554955866278116 = pycopia.XML.POM.XMLAttribute( "onzoom", 1, 12, None ) attribFont_style_63083969504709003786683888010914706576 = pycopia.XML.POM.XMLAttribute( "font-style", pycopia.XML.POM.Enumeration(("normal", "italic", "oblique", "inherit")), 12, None, ) attribStemh_66055743135743852563717295712217632100 = pycopia.XML.POM.XMLAttribute( "stemh", 1, 12, None ) attribSurfacescale_10332488846683741824374909296698713089 = ( pycopia.XML.POM.XMLAttribute("surfaceScale", 1, 12, None) ) attribWidth_64248406416426090145249793245567015396 = pycopia.XML.POM.XMLAttribute( "width", 1, 11, None ) attribOrder_175707562775715593580625675764274116 = pycopia.XML.POM.XMLAttribute( "order", 1, 11, None ) attribRx_13781481893621489421002824802568598729 = pycopia.XML.POM.XMLAttribute( "rx", 1, 11, None ) attribZoomandpan_50482487998172502887521259571959660481 = pycopia.XML.POM.XMLAttribute( "zoomAndPan", pycopia.XML.POM.Enumeration(("disable", "magnify")), 13, "magnify" ) attribXmlns_37900859286933218841933098759623206976 = pycopia.XML.POM.XMLAttribute( "xmlns", 1, 14, "http://www.w3.org/2000/svg" ) attribTitle_19458376393466163336164327374592663961 = pycopia.XML.POM.XMLAttribute( "title", 1, 12, None ) attribViewtarget_4985094957501300299413740899118798400 = pycopia.XML.POM.XMLAttribute( "viewTarget", 1, 12, None ) attribVert_adv_y_75013213180719225150160140290382229225 = pycopia.XML.POM.XMLAttribute( "vert-adv-y", 1, 12, None ) attribType_9214930984770684725187239721397439721 = pycopia.XML.POM.XMLAttribute( "type", 1, 11, None ) attribOnfocusin_46333989955590878322162980913526513921 = pycopia.XML.POM.XMLAttribute( "onfocusin", 1, 12, None ) attribStroke_linecap_28080733754758510333198346824029230656 = ( pycopia.XML.POM.XMLAttribute( "stroke-linecap", pycopia.XML.POM.Enumeration(("butt", "round", "square", "inherit")), 12, None, ) ) attribFrom_7563060327602975314011001241832722500 = pycopia.XML.POM.XMLAttribute( "from", 1, 12, None ) attribVersion_84775426416493255433176811594103779584 = pycopia.XML.POM.XMLAttribute( "version", 1, 14, "1.1" ) attribG1_5727023967946962006895514648308956736 = pycopia.XML.POM.XMLAttribute( "g1", 1, 12, None ) attribTextlength_8954420504159847980175721839199069209 = pycopia.XML.POM.XMLAttribute( "textLength", 1, 12, None ) attribXlink_show_2512068296832459467974677258052208896 = pycopia.XML.POM.XMLAttribute( "xlink:show", pycopia.XML.POM.Enumeration(("embed",)), 13, "embed" ) attribRotate_35628088744920802722236833233798489025 = pycopia.XML.POM.XMLAttribute( "rotate", 1, 12, None ) attribOperator_55696622124939874802011175094556819600 = pycopia.XML.POM.XMLAttribute( "operator", pycopia.XML.POM.Enumeration(("erode", "dilate")), 13, "erode" ) attribOnresize_58900845409797129667820385050143322761 = pycopia.XML.POM.XMLAttribute( "onresize", 1, 12, None ) attribStrikethrough_position_48117206984728224112044732892606725801 = ( pycopia.XML.POM.XMLAttribute("strikethrough-position", 1, 12, None) ) attribFilterres_3366516975002870436213760777859564881 = pycopia.XML.POM.XMLAttribute( "filterRes", 1, 12, None ) attribD_22640415762244214758870656423193258321 = pycopia.XML.POM.XMLAttribute( "d", 1, 12, None ) attribRy_110094368715135980265424280434051041 = pycopia.XML.POM.XMLAttribute( "ry", 1, 12, None ) attribV_mathematical_21141643344625772653463902040762702529 = ( pycopia.XML.POM.XMLAttribute("v-mathematical", 1, 12, None) ) attribXlink_actuate_125935775984614295008393323163771716 = pycopia.XML.POM.XMLAttribute( "xlink:actuate", pycopia.XML.POM.Enumeration(("onRequest",)), 14, "onRequest" ) attribX_height_71808556417392012964367807880085521636 = pycopia.XML.POM.XMLAttribute( "x-height", 1, 12, None ) attribAlignment_baseline_25032983955350296662681296772129840036 = ( pycopia.XML.POM.XMLAttribute( "alignment-baseline", pycopia.XML.POM.Enumeration( ( "auto", "baseline", "before-edge", "text-before-edge", "middle", "central", "after-edge", "text-after-edge", "ideographic", "alphabetic", "hanging", "mathematical", "inherit", ) ), 12, None, ) ) attribBbox_32136527033715753297952185672432387889 = pycopia.XML.POM.XMLAttribute( "bbox", 1, 12, None ) attribOnfocusout_53003786302024664917374321967614548025 = pycopia.XML.POM.XMLAttribute( "onfocusout", 1, 12, None ) attribMin_22017627953804011528067270395696281 = pycopia.XML.POM.XMLAttribute( "min", 1, 12, None ) attribWidth_64248607494964939327128408766366990921 = pycopia.XML.POM.XMLAttribute( "width", 1, 12, None ) attribMaskcontentunits_55150678756063901504366699633395202916 = ( pycopia.XML.POM.XMLAttribute( "maskContentUnits", pycopia.XML.POM.Enumeration(("userSpaceOnUse", "objectBoundingBox")), 12, None, ) ) attribDisplay_7822133436715702205398530701320632976 = pycopia.XML.POM.XMLAttribute( "display", pycopia.XML.POM.Enumeration( ( "inline", "block", "list-item", "run-in", "compact", "marker", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none", "inherit", ) ), 12, None, ) attribText_rendering_21233944364208332717316005830186272016 = ( pycopia.XML.POM.XMLAttribute( "text-rendering", pycopia.XML.POM.Enumeration( ( "auto", "optimizeSpeed", "optimizeLegibility", "geometricPrecision", "inherit", ) ), 12, None, ) ) attribHoriz_adv_x_33286802062655172399937014643438251609 = pycopia.XML.POM.XMLAttribute( "horiz-adv-x", 1, 11, None ) attribU2_29368281947788589299576837024862089 = pycopia.XML.POM.XMLAttribute( "u2", 1, 12, None ) attribUnicode_51323148070930863584364882845988477504 = pycopia.XML.POM.XMLAttribute( "unicode", 1, 12, None ) attribRepeatdur_20281694933092051836466383310779369049 = pycopia.XML.POM.XMLAttribute( "repeatDur", 1, 12, None ) attribBy_24996377456482567646458162580010890689 = pycopia.XML.POM.XMLAttribute( "by", 1, 12, None ) attribXlink_type_22560428979697808364067714852156776100 = pycopia.XML.POM.XMLAttribute( "xlink:type", pycopia.XML.POM.Enumeration(("simple",)), 14, "simple" ) attribEdgemode_53553199688871342682977408017394499561 = pycopia.XML.POM.XMLAttribute( "edgeMode", pycopia.XML.POM.Enumeration(("duplicate", "wrap", "none")), 13, "duplicate", ) attribFont_size_27081965776421301083509832315670544 = pycopia.XML.POM.XMLAttribute( "font-size", 1, 12, None ) attribExponent_54536060099375948563237755309446148049 = pycopia.XML.POM.XMLAttribute( "exponent", 1, 12, None ) attribOrientation_77676506574288919343812204705181781009 = pycopia.XML.POM.XMLAttribute( "orientation", 1, 12, None ) attribPreservealpha_59074050731859891358048984916064587041 = ( pycopia.XML.POM.XMLAttribute( "preserveAlpha", pycopia.XML.POM.Enumeration(("false", "true")), 12, None ) ) attribStroke_width_62701303457294475606316334429684734609 = ( pycopia.XML.POM.XMLAttribute("stroke-width", 1, 12, None) ) attribBaseprofile_265181480307831332885717101523578249 = pycopia.XML.POM.XMLAttribute( "baseProfile", 1, 12, None ) attribId_46142269508030220906474016374523948836 = pycopia.XML.POM.XMLAttribute( "id", 2, 12, None ) attribKernelunitlength_7493727025350692090003915773550949409 = ( pycopia.XML.POM.XMLAttribute("kernelUnitLength", 1, 12, None) ) attribKernelmatrix_1217355260759542586161783175599498321 = pycopia.XML.POM.XMLAttribute( "kernelMatrix", 1, 11, None ) attribPrimitiveunits_31055690275649669285157190918103746624 = ( pycopia.XML.POM.XMLAttribute( "primitiveUnits", pycopia.XML.POM.Enumeration(("userSpaceOnUse", "objectBoundingBox")), 12, None, ) ) attribShape_rendering_52566449463098722218121115853766195225 = ( pycopia.XML.POM.XMLAttribute( "shape-rendering", pycopia.XML.POM.Enumeration( ("auto", "optimizeSpeed", "crispEdges", "geometricPrecision", "inherit") ), 12, None, ) ) attribXlink_title_3295458544877078819116034010639516721 = pycopia.XML.POM.XMLAttribute( "xlink:title", 1, 12, None ) attribType_44195322266492707505680514403350646784 = pycopia.XML.POM.XMLAttribute( "type", pycopia.XML.POM.Enumeration(("fractalNoise", "turbulence")), 13, "turbulence", ) attribMarkerwidth_55226436177358894501255339298341432729 = pycopia.XML.POM.XMLAttribute( "markerWidth", 1, 12, None ) attribRendering_intent_2763955552753726114535085653352633636 = ( pycopia.XML.POM.XMLAttribute( "rendering-intent", pycopia.XML.POM.Enumeration( ( "auto", "perceptual", "relative-colorimetric", "saturation", "absolute-colorimetric", ) ), 13, "auto", ) ) attribSlope_79672558866683031657099595406095351236 = pycopia.XML.POM.XMLAttribute( "slope", 1, 12, None ) attribFont_style_21788128477685954151004099324092450625 = pycopia.XML.POM.XMLAttribute( "font-style", 1, 12, None ) attribMask_1944143573929026593298495270719232996 = pycopia.XML.POM.XMLAttribute( "mask", 1, 12, None ) attribRepeatcount_25731109718729223477290922313197639225 = pycopia.XML.POM.XMLAttribute( "repeatCount", 1, 12, None ) attribString_73088194996370251272342098028690693009 = pycopia.XML.POM.XMLAttribute( "string", 1, 12, None ) attribStroke_dashoffset_24397425636912196504877047676272225 = ( pycopia.XML.POM.XMLAttribute("stroke-dashoffset", 1, 12, None) ) attribPatterncontentunits_2597939023017302048597325506176587129 = ( pycopia.XML.POM.XMLAttribute( "patternContentUnits", pycopia.XML.POM.Enumeration(("userSpaceOnUse", "objectBoundingBox")), 12, None, ) ) attribStroke_opacity_63194055222286834713760410205228547136 = ( pycopia.XML.POM.XMLAttribute("stroke-opacity", 1, 12, None) ) attribXml_space_17330469855831907069104425902654745316 = pycopia.XML.POM.XMLAttribute( "xml:space", pycopia.XML.POM.Enumeration(("default", "preserve")), 12, None ) attribYchannelselector_27155658630070716522611280826959602500 = ( pycopia.XML.POM.XMLAttribute( "yChannelSelector", pycopia.XML.POM.Enumeration(("R", "G", "B", "A")), 13, "A" ) ) attribXml_lang_51554108615928407674946656071664740849 = pycopia.XML.POM.XMLAttribute( "xml:lang", 7, 12, None ) attribD_22640446620367824771995978586268172196 = pycopia.XML.POM.XMLAttribute( "d", 1, 11, None ) attribPoints_303944997639633971970173669392563856 = pycopia.XML.POM.XMLAttribute( "points", 1, 11, None ) attribXlink_role_3229529106937020990771521342560963204 = pycopia.XML.POM.XMLAttribute( "xlink:role", 1, 12, None ) attribFill_rule_21111451595628935231869402851298971121 = pycopia.XML.POM.XMLAttribute( "fill-rule", pycopia.XML.POM.Enumeration(("nonzero", "evenodd", "inherit")), 12, None, ) attribOnmouseout_67798077228410893599001377677086379584 = pycopia.XML.POM.XMLAttribute( "onmouseout", 1, 12, None ) attribOnerror_72049920453974089135514406189328715044 = pycopia.XML.POM.XMLAttribute( "onerror", 1, 12, None ) attribXlink_href_2755375353447839808560974640732695729 = pycopia.XML.POM.XMLAttribute( "xlink:href", 1, 12, None ) attribStrikethrough_thickness_656310507416424673689514358791938609 = ( pycopia.XML.POM.XMLAttribute("strikethrough-thickness", 1, 12, None) ) attribText_decoration_48475404390775909559370336472243343881 = ( pycopia.XML.POM.XMLAttribute("text-decoration", 1, 12, None) ) attribWriting_mode_5362176799163998728615688641772562500 = pycopia.XML.POM.XMLAttribute( "writing-mode", pycopia.XML.POM.Enumeration( ("lr-tb", "rl-tb", "tb-rl", "lr", "rl", "tb", "inherit") ), 12, None, ) attribRequiredextensions_3166766250085009955178408409037505625 = ( pycopia.XML.POM.XMLAttribute("requiredExtensions", 1, 12, None) ) attribBias_4815562082115622993586227296249492961 = pycopia.XML.POM.XMLAttribute( "bias", 1, 12, None ) attribXlink_actuate_742947900615836195516352859503053764 = pycopia.XML.POM.XMLAttribute( "xlink:actuate", pycopia.XML.POM.Enumeration(("onLoad",)), 14, "onLoad" ) attribGradienttransform_13834810738159332941379809016760615921 = ( pycopia.XML.POM.XMLAttribute("gradientTransform", 1, 12, None) ) attribFont_weight_12881395963510290653563102351189028809 = pycopia.XML.POM.XMLAttribute( "font-weight", pycopia.XML.POM.Enumeration( ( "normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "inherit", ) ), 12, None, ) attribFont_family_31078482467800891345580624105703722769 = pycopia.XML.POM.XMLAttribute( "font-family", 1, 12, None ) attribPreserveaspectratio_4249407348708327704394963551418555456 = ( pycopia.XML.POM.XMLAttribute("preserveAspectRatio", 1, 13, "xMidYMid meet") ) attribPanose_1_74358375666914967086775957466794539536 = pycopia.XML.POM.XMLAttribute( "panose-1", 1, 12, None ) attribColor_profile_59255227693246950224147371299420388900 = ( pycopia.XML.POM.XMLAttribute("color-profile", 1, 12, None) ) attribFill_opacity_1965763316953444740110908885358604121 = pycopia.XML.POM.XMLAttribute( "fill-opacity", 1, 12, None ) attribSpreadmethod_66378802077764367434732630954166450625 = ( pycopia.XML.POM.XMLAttribute( "spreadMethod", pycopia.XML.POM.Enumeration(("pad", "reflect", "repeat")), 12, None, ) ) attribRadius_20805230232467426610757715545280068996 = pycopia.XML.POM.XMLAttribute( "radius", 1, 12, None ) attribHoriz_origin_x_29621525596146748552071521876315430724 = ( pycopia.XML.POM.XMLAttribute("horiz-origin-x", 1, 12, None) ) attribHoriz_adv_x_33286693291463430630078017492334750784 = pycopia.XML.POM.XMLAttribute( "horiz-adv-x", 1, 12, None ) attribGlyph_orientation_horizontal_34760569960300448639937531748683716100 = ( pycopia.XML.POM.XMLAttribute("glyph-orientation-horizontal", 1, 12, None) ) attribR_24449902921757264057715563149264794256 = pycopia.XML.POM.XMLAttribute( "r", 1, 11, None ) attribOnunload_15695951126166700653907868590320931600 = pycopia.XML.POM.XMLAttribute( "onunload", 1, 12, None ) attribCap_height_6358663669899010467314576250281749264 = pycopia.XML.POM.XMLAttribute( "cap-height", 1, 12, None ) attribText_anchor_27854728179248540918606107018552701796 = pycopia.XML.POM.XMLAttribute( "text-anchor", pycopia.XML.POM.Enumeration(("start", "middle", "end", "inherit")), 12, None, ) attribX_239059136031520658290104951402890521 = pycopia.XML.POM.XMLAttribute( "x", 1, 12, None ) attribAdditive_971738928719029624514719682153546929 = pycopia.XML.POM.XMLAttribute( "additive", pycopia.XML.POM.Enumeration(("replace", "sum")), 13, "replace" ) attribY_81551351910004068139383608344822372324 = pycopia.XML.POM.XMLAttribute( "y", 1, 12, None ) attribGlyphref_874521118186319263254890951614864129 = pycopia.XML.POM.XMLAttribute( "glyphRef", 1, 12, None ) attribSpacing_19873775088701691478650161607805634041 = pycopia.XML.POM.XMLAttribute( "spacing", pycopia.XML.POM.Enumeration(("auto", "exact")), 12, None ) attribDivisor_42664058692193941523155561906911956049 = pycopia.XML.POM.XMLAttribute( "divisor", 1, 12, None ) attribTablevalues_153147341538372788451777776126967121 = pycopia.XML.POM.XMLAttribute( "tableValues", 1, 12, None ) attribPath_45791627773218437939278519800882329689 = pycopia.XML.POM.XMLAttribute( "path", 1, 12, None ) attribRefy_70752068641054731036721117320670298436 = pycopia.XML.POM.XMLAttribute( "refY", 1, 12, None ) attribRequiredfeatures_35463244366656400465531942340755703184 = ( pycopia.XML.POM.XMLAttribute("requiredFeatures", 1, 12, None) ) attribStartoffset_66415193990658837878318090979479425600 = pycopia.XML.POM.XMLAttribute( "startOffset", 1, 12, None ) attribFont_stretch_33412554475021909159972644105526830625 = ( pycopia.XML.POM.XMLAttribute("font-stretch", 1, 12, None) ) attribDiffuseconstant_80286035756708247834640597677836656225 = ( pycopia.XML.POM.XMLAttribute("diffuseConstant", 1, 12, None) ) attribY2_56638911263083492732707088783461444241 = pycopia.XML.POM.XMLAttribute( "y2", 1, 12, None ) attribOnmousedown_81776721518952584233496394150508951881 = pycopia.XML.POM.XMLAttribute( "onmousedown", 1, 12, None ) attribStroke_linejoin_68770697799660128014020372100529139600 = ( pycopia.XML.POM.XMLAttribute( "stroke-linejoin", pycopia.XML.POM.Enumeration(("miter", "round", "bevel", "inherit")), 12, None, ) ) attribStop_color_11004707637165596998277037119383684 = pycopia.XML.POM.XMLAttribute( "stop-color", 1, 12, None ) attribFont_weight_26811158818233115008105450969154434001 = pycopia.XML.POM.XMLAttribute( "font-weight", 1, 12, None ) attribXlink_arcrole_27493937249878960474475479331463032529 = ( pycopia.XML.POM.XMLAttribute("xlink:arcrole", 1, 12, None) ) attribContentstyletype_36213200337230357261279998212428515216 = ( pycopia.XML.POM.XMLAttribute("contentStyleType", 1, 13, "text/css") ) attribK3_40844454807915750097889610906948122500 = pycopia.XML.POM.XMLAttribute( "k3", 1, 12, None ) attribOverline_thickness_1660273656430437017729678385119002249 = ( pycopia.XML.POM.XMLAttribute("overline-thickness", 1, 12, None) ) attribColor_interpolation_10174123834979793608581630652423230929 = ( pycopia.XML.POM.XMLAttribute( "color-interpolation", pycopia.XML.POM.Enumeration(("auto", "sRGB", "linearRGB", "inherit")), 12, None, ) ) attribFilterunits_4207477851313061525916327429714013924 = pycopia.XML.POM.XMLAttribute( "filterUnits", pycopia.XML.POM.Enumeration(("userSpaceOnUse", "objectBoundingBox")), 12, None, ) attribU1_39619575555678312634697876413548410596 = pycopia.XML.POM.XMLAttribute( "u1", 1, 12, None ) attribRefx_27693262886449334252355350728325498025 = pycopia.XML.POM.XMLAttribute( "refX", 1, 12, None ) attribEnd_52893332906885955687937188021518004804 = pycopia.XML.POM.XMLAttribute( "end", 1, 12, None ) attribX1_27754258168682229161176272781689178129 = pycopia.XML.POM.XMLAttribute( "x1", 1, 12, None ) attribType_5376736995825510911871520433293000324 = pycopia.XML.POM.XMLAttribute( "type", pycopia.XML.POM.Enumeration(("translate", "scale", "rotate", "skewX", "skewY")), 13, "translate", ) attribType_8817164733194313167051252976818774761 = pycopia.XML.POM.XMLAttribute( "type", pycopia.XML.POM.Enumeration( ("matrix", "saturate", "hueRotate", "luminanceToAlpha") ), 13, "matrix", ) attribColor_interpolation_filters_1031663597973127513991537856310800889 = ( pycopia.XML.POM.XMLAttribute( "color-interpolation-filters", pycopia.XML.POM.Enumeration(("auto", "sRGB", "linearRGB", "inherit")), 12, None, ) ) attribOverflow_52917936388072056194158982145010690161 = pycopia.XML.POM.XMLAttribute( "overflow", pycopia.XML.POM.Enumeration(("visible", "hidden", "scroll", "auto", "inherit")), 12, None, ) attribWord_spacing_43561424080374765097124986544555028484 = ( pycopia.XML.POM.XMLAttribute("word-spacing", 1, 12, None) ) attribResult_2814136684571386521370442569033123249 = pycopia.XML.POM.XMLAttribute( "result", 1, 12, None ) attribColor_6383642087606508409469185396823588644 = pycopia.XML.POM.XMLAttribute( "color", 1, 12, None ) attribKeytimes_5912796650944756099664218914670640625 = pycopia.XML.POM.XMLAttribute( "keyTimes", 1, 12, None ) attribStyle_17050104888087001662484243873103056144 = pycopia.XML.POM.XMLAttribute( "style", 1, 12, None ) attribTargety_19188801435937223000576870959953525625 = pycopia.XML.POM.XMLAttribute( "targetY", 1, 12, None ) attribVert_origin_x_7446508817965073354387852736387482176 = ( pycopia.XML.POM.XMLAttribute("vert-origin-x", 1, 12, None) ) attribLimitingconeangle_7619872417710758524908672078722976144 = ( pycopia.XML.POM.XMLAttribute("limitingConeAngle", 1, 12, None) ) attribFont_variant_3709425631941775322192161927997460601 = pycopia.XML.POM.XMLAttribute( "font-variant", 1, 12, None ) attribUnderline_position_1370413637722434992005488791434292496 = ( pycopia.XML.POM.XMLAttribute("underline-position", 1, 12, None) ) attribFont_stretch_3835542312537135012653566238291863044 = pycopia.XML.POM.XMLAttribute( "font-stretch", pycopia.XML.POM.Enumeration( ( "normal", "wider", "narrower", "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded", "inherit", ) ), 12, None, ) attribStddeviation_3689461481017116150572477368212178084 = pycopia.XML.POM.XMLAttribute( "stdDeviation", 1, 12, None ) attribStop_opacity_63515294339364756103962320346510202084 = ( pycopia.XML.POM.XMLAttribute("stop-opacity", 1, 12, None) ) attribDominant_baseline_5433263933656082590351520554946800996 = ( pycopia.XML.POM.XMLAttribute( "dominant-baseline", pycopia.XML.POM.Enumeration( ( "auto", "use-script", "no-change", "reset-size", "ideographic", "alphabetic", "hanging", "mathematical", "central", "middle", "text-after-edge", "text-before-edge", "inherit", ) ), 12, None, ) ) attribMedia_74481411028653324146354893354449742329 = pycopia.XML.POM.XMLAttribute( "media", 1, 12, None ) attribXmlns_xlink_42487491102806618023110534987235606276 = pycopia.XML.POM.XMLAttribute( "xmlns:xlink", 1, 14, "http://www.w3.org/1999/xlink" ) attribPointsatz_317880712621523478286458929706647769 = pycopia.XML.POM.XMLAttribute( "pointsAtZ", 1, 12, None ) attribMarker_mid_2019564644941526145314201027139221761 = pycopia.XML.POM.XMLAttribute( "marker-mid", 1, 12, None ) attribNumoctaves_33842002282539678531029534805014041 = pycopia.XML.POM.XMLAttribute( "numOctaves", 1, 12, None ) attribFont_size_adjust_30180133234799421307420445945060047225 = ( pycopia.XML.POM.XMLAttribute("font-size-adjust", 1, 12, None) ) attribOnactivate_1757297942287072272251096257072991296 = pycopia.XML.POM.XMLAttribute( "onactivate", 1, 12, None ) attribCx_78583256250289946816796157685953761 = pycopia.XML.POM.XMLAttribute( "cx", 1, 12, None ) attribFill_427957648951849686632852735647933609 = pycopia.XML.POM.XMLAttribute( "fill", 1, 12, None ) attribIdeographic_1213628493561735420848496249647747856 = pycopia.XML.POM.XMLAttribute( "ideographic", 1, 12, None ) attribAccent_height_84238565607316353502198048818344438521 = ( pycopia.XML.POM.XMLAttribute("accent-height", 1, 12, None) ) attribVert_origin_y_1727623373058049890309423289789152601 = ( pycopia.XML.POM.XMLAttribute("vert-origin-y", 1, 12, None) ) attribGlyph_name_70556087215685389485080236292270347684 = pycopia.XML.POM.XMLAttribute( "glyph-name", 1, 12, None ) attribX2_2118644773536105186827729832224802916 = pycopia.XML.POM.XMLAttribute( "x2", 1, 12, None ) attribOnmousemove_36239900479791126782266447864594563076 = pycopia.XML.POM.XMLAttribute( "onmousemove", 1, 12, None ) attribSeed_395390389235302342334480662585197025 = pycopia.XML.POM.XMLAttribute( "seed", 1, 12, None ) attribOnclick_9623099846574007271855531133876915264 = pycopia.XML.POM.XMLAttribute( "onclick", 1, 12, None ) attribType_21867493089199498528985878891419248400 = pycopia.XML.POM.XMLAttribute( "type", pycopia.XML.POM.Enumeration(("identity", "table", "discrete", "linear", "gamma")), 11, None, ) attribXlink_show_5485491858761316754615207879177863481 = pycopia.XML.POM.XMLAttribute( "xlink:show", pycopia.XML.POM.Enumeration(("new", "replace")), 13, "replace" ) attribDy_42676389420301856377780465010365643449 = pycopia.XML.POM.XMLAttribute( "dy", 1, 12, None ) attribStroke_dasharray_31073420573497511504459886842172708100 = ( pycopia.XML.POM.XMLAttribute("stroke-dasharray", 1, 12, None) ) attribSpecularexponent_61134666344794906612277075107825539136 = ( pycopia.XML.POM.XMLAttribute("specularExponent", 1, 12, None) ) attribGradientunits_236724712260445555102708823262856900 = pycopia.XML.POM.XMLAttribute( "gradientUnits", pycopia.XML.POM.Enumeration(("userSpaceOnUse", "objectBoundingBox")), 12, None, ) attribOnload_1736219473749214885598459380211457961 = pycopia.XML.POM.XMLAttribute( "onload", 1, 12, None ) attribBasefrequency_9657383062915270831414177769246357056 = ( pycopia.XML.POM.XMLAttribute("baseFrequency", 1, 12, None) ) attribCalcmode_24182271714570014214583360617042994176 = pycopia.XML.POM.XMLAttribute( "calcMode", pycopia.XML.POM.Enumeration(("discrete", "linear", "paced", "spline")), 13, "paced", ) attribMarker_start_988048070396048868444768303173785401 = pycopia.XML.POM.XMLAttribute( "marker-start", 1, 12, None ) attribPointsatx_6988893093781351598201266146021083281 = pycopia.XML.POM.XMLAttribute( "pointsAtX", 1, 12, None ) attribMarkerheight_54614022699804099798584675910003794281 = ( pycopia.XML.POM.XMLAttribute("markerHeight", 1, 12, None) ) attribOnabort_43204801296922053990861506249348662084 = pycopia.XML.POM.XMLAttribute( "onabort", 1, 12, None ) attribScale_77017261243588528665949000097622555969 = pycopia.XML.POM.XMLAttribute( "scale", 1, 12, None ) attribZ_10258984500863391157969307314265566801 = pycopia.XML.POM.XMLAttribute( "z", 1, 12, None ) attribY1_17262308902294398966134206242156644196 = pycopia.XML.POM.XMLAttribute( "y1", 1, 12, None ) attribSpecularconstant_84149048183607113074367187467952562561 = ( pycopia.XML.POM.XMLAttribute("specularConstant", 1, 12, None) ) attribUnicode_bidi_71388391846293636790065608605722390225 = ( pycopia.XML.POM.XMLAttribute( "unicode-bidi", pycopia.XML.POM.Enumeration(("normal", "embed", "bidi-override", "inherit")), 12, None, ) ) attribClippathunits_1164894747914145967126227858065512969 = ( pycopia.XML.POM.XMLAttribute( "clipPathUnits", pycopia.XML.POM.Enumeration(("userSpaceOnUse", "objectBoundingBox")), 12, None, ) ) attribAttributetype_2434829879633913983500496356253274801 = ( pycopia.XML.POM.XMLAttribute("attributeType", 1, 12, None) ) attribMarkerunits_32065608968221576431520591439504400 = pycopia.XML.POM.XMLAttribute( "markerUnits", pycopia.XML.POM.Enumeration(("strokeWidth", "userSpaceOnUse")), 12, None, ) attribRx_13781524972121758342148991510655896804 = pycopia.XML.POM.XMLAttribute( "rx", 1, 12, None ) attribIn2_413014134412624564668738629802533641 = pycopia.XML.POM.XMLAttribute( "in2", 1, 11, None ) attribMethod_17350439503880136422522925393733890625 = pycopia.XML.POM.XMLAttribute( "method", pycopia.XML.POM.Enumeration(("align", "stretch")), 12, None ) attribHeight_8656875007100219121096067884823371849 = pycopia.XML.POM.XMLAttribute( "height", 1, 12, None ) attribXchannelselector_74696689163593075819587388803612591129 = ( pycopia.XML.POM.XMLAttribute( "xChannelSelector", pycopia.XML.POM.Enumeration(("R", "G", "B", "A")), 13, "A" ) ) attribUnits_per_em_960525785107183947683947061996381184 = pycopia.XML.POM.XMLAttribute( "units-per-em", 1, 12, None ) attribOnscroll_39305346648710239795129739494149074436 = pycopia.XML.POM.XMLAttribute( "onscroll", 1, 12, None ) attribTargetx_113154180346919876485625744781040704 = pycopia.XML.POM.XMLAttribute( "targetX", 1, 12, None ) attribXml_base_1637447386481157916838004196247100100 = pycopia.XML.POM.XMLAttribute( "xml:base", 1, 12, None ) attribKeysplines_80991548921360828646832640481688984921 = pycopia.XML.POM.XMLAttribute( "keySplines", 1, 12, None ) attribStroke_65613381267441787847383807243146675856 = pycopia.XML.POM.XMLAttribute( "stroke", 1, 12, None ) attribIntercept_24152616922318771008627770666889364321 = pycopia.XML.POM.XMLAttribute( "intercept", 1, 12, None ) attribDx_61950923097741785528208303003713060416 = pycopia.XML.POM.XMLAttribute( "dx", 1, 12, None ) attribMaskunits_71575145070850567084493192726786182884 = pycopia.XML.POM.XMLAttribute( "maskUnits", pycopia.XML.POM.Enumeration(("userSpaceOnUse", "objectBoundingBox")), 12, None, ) attribElevation_61691238982851464582553293332205726916 = pycopia.XML.POM.XMLAttribute( "elevation", 1, 12, None ) attribName_84894340006392032743958872134548066641 = pycopia.XML.POM.XMLAttribute( "name", 1, 12, None ) attribMarker_end_13188944635936070535948120603709524804 = pycopia.XML.POM.XMLAttribute( "marker-end", 1, 12, None ) attribAscent_41623659853852417026046695401896791076 = pycopia.XML.POM.XMLAttribute( "ascent", 1, 12, None ) attribIn_4730483019206772816093541605825752121 = pycopia.XML.POM.XMLAttribute( "in", 1, 12, None ) attribMax_1724214546919082020600484239354659001 = pycopia.XML.POM.XMLAttribute( "max", 1, 12, None ) attribVisibility_64573877343784784797861622909719244721 = pycopia.XML.POM.XMLAttribute( "visibility", pycopia.XML.POM.Enumeration(("visible", "hidden", "inherit")), 12, None, ) attribOverline_position_10179563443042200486178464986247970641 = ( pycopia.XML.POM.XMLAttribute("overline-position", 1, 12, None) ) attribV_alphabetic_21224018889041547713196124290806972416 = ( pycopia.XML.POM.XMLAttribute("v-alphabetic", 1, 12, None) ) # ....................................................................... # SVG 1.1 DTD ........................................................... # file: svg11.dtd # # SVG 1.1 DTD # # This is SVG, a language for describing two-dimensional graphics in XML. # # The Scalable Vector Graphics (SVG) # Copyright 2001, 2002 World Wide Web Consortium # (Massachusetts Institute of Technology, Institut National de # Recherche en Informatique et en Automatique, Keio University). # All Rights Reserved. # # Permission to use, copy, modify and distribute the SVG DTD and its # accompanying documentation for any purpose and without fee is hereby # granted in perpetuity, provided that the above copyright notice and # this paragraph appear in all copies. The copyright holders make no # representation about the suitability of the DTD for any purpose. # # It is provided "as is" without expressed or implied warranty. # # Author: Jun Fujisawa <fujisawa.jun@canon.co.jp> # Revision: $Id$ # # # This is the driver file for version 1.1 of the SVG DTD. # # This DTD is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//DTD SVG 1.1//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" # # Use this URI to identify the default namespace: # # "http://www.w3.org/2000/svg" # # See the Qualified Names module for information # on the use of namespace prefixes in the DTD. # # reserved for future use with document profiles # ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Pre-Framework Redeclaration Placeholder ..................... # Document Model Module ....................................... # Attribute Collection Module ................................. # Modular Framework Module .................................... # ....................................................................... # SVG 1.1 Modular Framework Module ...................................... # file: svg-framework.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Modular Framework//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-framework.mod" # # ....................................................................... # Modular Framework # # This module instantiates the modules needed o support the SVG # modularization model, including: # # + Datatypes # + Qualified Name # + Document Model # + Attribute Collection # # ....................................................................... # SVG 1.1 Datatypes Module .............................................. # file: svg-datatypes.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Datatypes//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-datatypes.mod" # # ....................................................................... # Datatypes # # This module declares common data types for properties and attributes. # # feature specification # 'clip-rule' or 'fill-rule' property/attribute value # media type, as per [RFC2045] # a <coordinate> # a list of <coordinate>s # a <color> value # a <integer> # a language code, as per [RFC3066] # comma-separated list of language codes, as per [RFC3066] # a <length> # a list of <length>s # a <number> # a list of <number>s # opacity value (e.g., <number>) # a path data specification # 'preserveAspectRatio' attribute specification # script expression # An SVG color value (RGB plus optional ICC) # arbitrary text string # list of transforms # a Uniform Resource Identifier, see [URI] # 'viewBox' attribute specification # end of svg-datatypes.mod # ....................................................................... # SVG 1.1 Qualified Name Module ......................................... # file: svg-qname.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Qualified Name//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-qname.mod" # # ....................................................................... # Qualified Name # # This module is contained in two parts, labeled Section 'A' and 'B': # # Section A declares parameter entities to support namespace- # qualified names, namespace declarations, and name prefixing # for SVG and extensions. # # Section B declares parameter entities used to provide # namespace-qualified names for all SVG element types: # # Section A: SVG XML Namespace Framework :::::::::::::::::::::: # 1. Declare a %SVG.prefixed; conditional section keyword, used # to activate namespace prefixing. The default value should # inherit '%NS.prefixed;' from the DTD driver, so that unless # overridden, the default behaviour follows the overall DTD # prefixing scheme. # # 2. Declare a parameter entity (eg., %SVG.xmlns;) containing # the URI reference used to identify the SVG namespace: # # 3. Declare parameter entities (eg., %SVG.prefix;) containing # the default namespace prefix string(s) to use when prefixing # is enabled. This may be overridden in the DTD driver or the # internal subset of an document instance. If no default prefix # is desired, this may be declared as an empty string. # # 4. Declare parameter entities (eg., %SVG.pfx;) containing the # colonized prefix(es) (eg., '%SVG.prefix;:') used when # prefixing is active, an empty string when it is not. # # 5. The parameter entity %SVG.xmlns.extra.attrib; may be # redeclared to contain any non-SVG namespace declaration # attributes for namespaces embedded in SVG. The default # is an empty string. # # Declare a parameter entity XLINK.xmlns.attrib containing # the XML Namespace declarations for XLink. # # Declare a parameter entity %NS.decl.attrib; containing # all XML Namespace declarations used in the DTD, plus the # xmlns declaration for SVG, its form dependent on whether # prefixing is active. # # Declare a parameter entity %SVG.xmlns.attrib; containing # all XML namespace declaration attributes used by SVG, # including a default xmlns attribute when prefixing is # inactive. # # Section B: SVG Qualified Names :::::::::::::::::::::::::::::: # 6. This section declares parameter entities used to provide # namespace-qualified names for all SVG element types. # # module: svg-structure.mod ......................... # module: svg-conditional.mod ....................... # module: svg-image.mod ............................. # module: svg-style.mod ............................. # module: svg-shape.mod ............................. # module: svg-text.mod .............................. # module: svg-marker.mod ............................ # module: svg-profile.mod ........................... # module: svg-gradient.mod .......................... # module: svg-pattern.mod ........................... # module: svg-clip.mod .............................. # module: svg-mask.mod .............................. # module: svg-filter.mod ............................ # module: svg-cursor.mod ............................ # module: svg-hyperlink.mod ......................... # module: svg-view.mod .............................. # module: svg-script.mod ............................ # module: svg-animation.mod ......................... # module: svg-font.mod .............................. # module: svg-extensibility.mod ..................... # end of svg-qname.mod # instantiate the Document Model declared in the DTD driver # ....................................................................... # SVG 1.1 Document Model Module ......................................... # file: svg11-model.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Document Model//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-model.mod" # # ....................................................................... # SVG 1.1 Document Model # # This module describes the groupings of elements that make up # common content models for SVG elements. # # module: svg-structure.mod ......................... # module: svg-conditional.mod ....................... # module: svg-image.mod ............................. # module: svg-style.mod ............................. # module: svg-shape.mod ............................. # module: svg-text.mod .............................. # module: svg-marker.mod ............................ # module: svg-profile.mod ........................... # module: svg-gradient.mod .......................... # module: svg-pattern.mod ........................... # module: svg-clip.mod .............................. # module: svg-mask.mod .............................. # module: svg-filter.mod ............................ # module: svg-cursor.mod ............................ # module: svg-hyperlink.mod ......................... # module: svg-view.mod .............................. # module: svg-script.mod ............................ # module: svg-animation.mod ......................... # module: svg-font.mod .............................. # module: svg-extensibility.mod ..................... # end of svg11-model.mod # instantiate the Attribute Collection declared in the DTD driver # ....................................................................... # SVG 1.1 Attribute Collection Module ................................... # file: svg11-attribs.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Attribute Collection//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-attribs.mod" # # ....................................................................... # SVG 1.1 Attribute Collection # # This module defines the set of common attributes that can be present # on many SVG elements. # # module: svg-conditional.mod ....................... # module: svg-style.mod ............................. # module: svg-text.mod .............................. # module: svg-marker.mod ............................ # module: svg-profile.mod ........................... # module: svg-gradient.mod .......................... # module: svg-clip.mod .............................. # module: svg-mask.mod .............................. # module: svg-filter.mod ............................ # module: svg-cursor.mod ............................ # end of svg11-attribs.mod # end of svg-framework.mod # Post-Framework Redeclaration Placeholder .................... # ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Core Attribute Module ....................................... # ....................................................................... # SVG 1.1 Core Attribute Module ......................................... # file: svg-core-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Core Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-core-attrib.mod" # # ....................................................................... # Core Attribute # # id, xml:base, xml:lang, xml:space # # This module defines the core set of attributes that can be present on # any element. # # end of svg-core-attrib.mod # Container Attribute Module .................................. # ....................................................................... # SVG 1.1 Container Attribute Module .................................... # file: svg-container-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Container Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-container-attrib.mod" # # ....................................................................... # Container Attribute # # enable-background # # This module defines the Container attribute set. # # 'enable-background' property/attribute value (e.g., 'new', 'accumulate') # end of svg-container-attrib.mod # Viewport Attribute Module ................................... # ....................................................................... # SVG 1.1 Viewport Attribute Module ..................................... # file: svg-viewport-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Viewport Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-viewport-attrib.mod" # # ....................................................................... # Viewport Attribute # # clip, overflow # # This module defines the Viewport attribute set. # # 'clip' property/attribute value (e.g., 'auto', rect(...)) # end of svg-viewport-attrib.mod # Paint Attribute Module ...................................... # ....................................................................... # SVG 1.1 Paint Attribute Module ........................................ # file: svg-paint-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Paint Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-paint-attrib.mod" # # ....................................................................... # Paint Attribute # # fill, fill-rule, stroke, stroke-dasharray, stroke-dashoffset, # stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width, color, # color-interpolation, color-rendering # # This module defines the Paint and Color attribute sets. # # a 'fill' or 'stroke' property/attribute value: <paint> # 'stroke-dasharray' property/attribute value (e.g., 'none', list of <number>s) # 'stroke-dashoffset' property/attribute value (e.g., 'none', <legnth>) # 'stroke-miterlimit' property/attribute value (e.g., <number>) # 'stroke-width' property/attribute value (e.g., <length>) # end of svg-paint-attrib.mod # Paint Opacity Attribute Module .............................. # ....................................................................... # SVG 1.1 Paint Opacity Attribute Module ................................ # file: svg-opacity-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Paint Opacity Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-opacity-attrib.mod" # # ....................................................................... # Paint Opacity Attribute # # opacity, fill-opacity, stroke-opacity # # This module defines the Opacity attribute set. # # end of svg-opacity-attrib.mod # Graphics Attribute Module ................................... # ....................................................................... # SVG 1.1 Graphics Attribute Module ..................................... # file: svg-graphics-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Graphics Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-graphics-attrib.mod" # # ....................................................................... # Graphics Attribute # # display, image-rendering, pointer-events, shape-rendering, # text-rendering, visibility # # This module defines the Graphics attribute set. # # end of svg-graphics-attrib.mod # Document Events Attribute Module ............................ # ....................................................................... # SVG 1.1 Document Events Attribute Module .............................. # file: svg-docevents-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Document Events Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-docevents-attrib.mod" # # ....................................................................... # Document Events Attribute # # onunload, onabort, onerror, onresize, onscroll, onzoom # # This module defines the DocumentEvents attribute set. # # end of svg-docevents-attrib.mod # Graphical Element Events Attribute Module ................... # ....................................................................... # SVG 1.1 Graphical Element Events Attribute Module ..................... # file: svg-graphevents-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Graphical Element Events Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-graphevents-attrib.mod" # # ....................................................................... # Graphical Element Events Attribute # # onfocusin, onfocusout, onactivate, onclick, onmousedown, onmouseup, # onmouseover, onmousemove, onmouseout, onload # # This module defines the GraphicalEvents attribute set. # # end of svg-graphevents-attrib.mod # Animation Events Attribute Module ........................... # ....................................................................... # SVG 1.1 Animation Events Attribute Module ............................. # file: svg-animevents-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 Animation Events Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-animevents-attrib.mod" # # ....................................................................... # Animation Events Attribute # # onbegin, onend, onrepeat, onload # # This module defines the AnimationEvents attribute set. # # end of svg-animevents-attrib.mod # XLink Attribute Module ...................................... # ....................................................................... # SVG 1.1 XLink Attribute Module ........................................ # file: svg-xlink-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 XLink Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-xlink-attrib.mod" # # ....................................................................... # XLink Attribute # # type, href, role, arcrole, title, show, actuate # # This module defines the XLink, XLinkRequired, XLinkEmbed, and # XLinkReplace attribute set. # # end of svg-xlink-attrib.mod # External Resources Attribute Module ......................... # ....................................................................... # SVG 1.1 External Resources Attribute Module ........................... # file: svg-extresources-attrib.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ENTITIES SVG 1.1 External Resources Attribute//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-extresources-attrib.mod" # # ....................................................................... # External Resources Attribute # # externalResourcesRequired # # This module defines the External attribute set. # # end of svg-extresources-attrib.mod # ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Structure Module ............................................ # ....................................................................... # SVG 1.1 Structure Module .............................................. # file: svg-structure.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Structure//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-structure.mod" # # ....................................................................... # Structure # # svg, g, defs, desc, title, metadata, symbol, use # # This module declares the major structural elements and their attributes. # # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Description.class ............................. # SVG.Use.class ..................................... # SVG.Structure.class ............................... # SVG.Presentation.attrib ........................... # svg: SVG Document Element ......................... class Svg(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "onclick": attribOnclick_9623099846574007271855531133876915264, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "height": attribHeight_8656875007100219121096067884823371849, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "x": attribX_239059136031520658290104951402890521, "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "font-size": attribFont_size_27081965776421301083509832315670544, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "viewBox": attribViewbox_12676804841166570607454313509590524225, "onresize": attribOnresize_58900845409797129667820385050143322761, "version": attribVersion_84775426416493255433176811594103779584, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "font-family": attribFont_family_31078482467800891345580624105703722769, "contentScriptType": attribContentscripttype_82167739205859101376698046218554960996, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "onscroll": attribOnscroll_39305346648710239795129739494149074436, "baseProfile": attribBaseprofile_265181480307831332885717101523578249, "contentStyleType": attribContentstyletype_36213200337230357261279998212428515216, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "onabort": attribOnabort_43204801296922053990861506249348662084, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "width": attribWidth_64248607494964939327128408766366990921, "kerning": attribKerning_50722104490749097963249774417612741921, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "direction": attribDirection_50741361576644121884686865416273322500, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "overflow": attribOverflow_52917936388072056194158982145010690161, "zoomAndPan": attribZoomandpan_50482487998172502887521259571959660481, "onunload": attribOnunload_15695951126166700653907868590320931600, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "cursor": attribCursor_36438614741117041205662488082241270404, "display": attribDisplay_7822133436715702205398530701320632976, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "onerror": attribOnerror_72049920453974089135514406189328715044, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onzoom": attribOnzoom_806993799907768989601554955866278116, "font-style": attribFont_style_63083969504709003786683888010914706576, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "class": attribClass_53825496146914797399013018272928945089, "xmlns": attribXmlns_37900859286933218841933098759623206976, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "y": attribY_81551351910004068139383608344822372324, "enable-background": attribEnable_background_10797894589918037147751517612226253649, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip_path": attribClip_path_6848405700625226295163574524817559769, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "color": attribColor_6383642087606508409469185396823588644, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "onclick": attribOnclick_9623099846574007271855531133876915264, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "x": attribX_239059136031520658290104951402890521, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "viewBox": attribViewbox_12676804841166570607454313509590524225, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "onresize": attribOnresize_58900845409797129667820385050143322761, "version": attribVersion_84775426416493255433176811594103779584, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "xml_space": attribXml_space_17330469855831907069104425902654745316, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "contentScriptType": attribContentscripttype_82167739205859101376698046218554960996, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "height": attribHeight_8656875007100219121096067884823371849, "onscroll": attribOnscroll_39305346648710239795129739494149074436, "baseProfile": attribBaseprofile_265181480307831332885717101523578249, "contentStyleType": attribContentstyletype_36213200337230357261279998212428515216, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onabort": attribOnabort_43204801296922053990861506249348662084, "width": attribWidth_64248607494964939327128408766366990921, "kerning": attribKerning_50722104490749097963249774417612741921, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "direction": attribDirection_50741361576644121884686865416273322500, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "overflow": attribOverflow_52917936388072056194158982145010690161, "zoomAndPan": attribZoomandpan_50482487998172502887521259571959660481, "onunload": attribOnunload_15695951126166700653907868590320931600, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "stop_color": attribStop_color_11004707637165596998277037119383684, "cursor": attribCursor_36438614741117041205662488082241270404, "display": attribDisplay_7822133436715702205398530701320632976, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "onerror": attribOnerror_72049920453974089135514406189328715044, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "stroke": attribStroke_65613381267441787847383807243146675856, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "font_style": attribFont_style_63083969504709003786683888010914706576, "onzoom": attribOnzoom_806993799907768989601554955866278116, "font_family": attribFont_family_31078482467800891345580624105703722769, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "class_": attribClass_53825496146914797399013018272928945089, "visibility": attribVisibility_64573877343784784797861622909719244721, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "xmlns": attribXmlns_37900859286933218841933098759623206976, "font_size": attribFont_size_27081965776421301083509832315670544, "mask": attribMask_1944143573929026593298495270719232996, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "y": attribY_81551351910004068139383608344822372324, } _name = "svg" _Root = Svg # end of SVG.svg.element # end of SVG.svg.attlist # g: Group Element .................................. class G(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "transform": attribTransform_5682546015111540170885688523292561121, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onload": attribOnload_1736219473749214885598459380211457961, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "onload": attribOnload_1736219473749214885598459380211457961, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "stop_color": attribStop_color_11004707637165596998277037119383684, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "g" # end of SVG.g.element # end of SVG.g.attlist # defs: Definisions Element ......................... class Defs(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "transform": attribTransform_5682546015111540170885688523292561121, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onload": attribOnload_1736219473749214885598459380211457961, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "onload": attribOnload_1736219473749214885598459380211457961, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "stop_color": attribStop_color_11004707637165596998277037119383684, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "defs" # end of SVG.defs.element # end of SVG.defs.attlist # desc: Description Element ......................... class Desc(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "style": attribStyle_17050104888087001662484243873103056144, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "class": attribClass_53825496146914797399013018272928945089, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_base": attribXml_base_1637447386481157916838004196247100100, "style": attribStyle_17050104888087001662484243873103056144, "id": attribId_46142269508030220906474016374523948836, "class_": attribClass_53825496146914797399013018272928945089, "xml_space": attribXml_space_17330469855831907069104425902654745316, } _name = "desc" # end of SVG.desc.element # end of SVG.desc.attlist # title: Title Element .............................. class Title(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "style": attribStyle_17050104888087001662484243873103056144, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "class": attribClass_53825496146914797399013018272928945089, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_base": attribXml_base_1637447386481157916838004196247100100, "style": attribStyle_17050104888087001662484243873103056144, "id": attribId_46142269508030220906474016374523948836, "class_": attribClass_53825496146914797399013018272928945089, "xml_space": attribXml_space_17330469855831907069104425902654745316, } _name = "title" # end of SVG.title.element # end of SVG.title.attlist # metadata: Metadata Element ........................ class Metadata(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xml:base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "xml_base": attribXml_base_1637447386481157916838004196247100100, } _name = "metadata" # end of SVG.metadata.element # end of SVG.metadata.attlist # symbol: Symbol Element ............................ class Symbol(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onload": attribOnload_1736219473749214885598459380211457961, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "viewBox": attribViewbox_12676804841166570607454313509590524225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "onload": attribOnload_1736219473749214885598459380211457961, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "stop_color": attribStop_color_11004707637165596998277037119383684, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "viewBox": attribViewbox_12676804841166570607454313509590524225, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "symbol" # end of SVG.symbol.element # end of SVG.symbol.attlist # use: Use Element .................................. class Use(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "onclick": attribOnclick_9623099846574007271855531133876915264, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "height": attribHeight_8656875007100219121096067884823371849, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "x": attribX_239059136031520658290104951402890521, "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "font-size": attribFont_size_27081965776421301083509832315670544, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "font-family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "transform": attribTransform_5682546015111540170885688523292561121, "width": attribWidth_64248607494964939327128408766366990921, "kerning": attribKerning_50722104490749097963249774417612741921, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "direction": attribDirection_50741361576644121884686865416273322500, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "overflow": attribOverflow_52917936388072056194158982145010690161, "xlink:show": attribXlink_show_2512068296832459467974677258052208896, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "display": attribDisplay_7822133436715702205398530701320632976, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "font-style": attribFont_style_63083969504709003786683888010914706576, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "class": attribClass_53825496146914797399013018272928945089, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "y": attribY_81551351910004068139383608344822372324, "enable-background": attribEnable_background_10797894589918037147751517612226253649, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip_path": attribClip_path_6848405700625226295163574524817559769, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "color": attribColor_6383642087606508409469185396823588644, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "onclick": attribOnclick_9623099846574007271855531133876915264, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "x": attribX_239059136031520658290104951402890521, "xlink_show": attribXlink_show_2512068296832459467974677258052208896, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "height": attribHeight_8656875007100219121096067884823371849, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "transform": attribTransform_5682546015111540170885688523292561121, "width": attribWidth_64248607494964939327128408766366990921, "kerning": attribKerning_50722104490749097963249774417612741921, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "direction": attribDirection_50741361576644121884686865416273322500, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "overflow": attribOverflow_52917936388072056194158982145010690161, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "stop_color": attribStop_color_11004707637165596998277037119383684, "cursor": attribCursor_36438614741117041205662488082241270404, "display": attribDisplay_7822133436715702205398530701320632976, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "stroke": attribStroke_65613381267441787847383807243146675856, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "font_style": attribFont_style_63083969504709003786683888010914706576, "font_family": attribFont_family_31078482467800891345580624105703722769, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "class_": attribClass_53825496146914797399013018272928945089, "visibility": attribVisibility_64573877343784784797861622909719244721, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "font_size": attribFont_size_27081965776421301083509832315670544, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "mask": attribMask_1944143573929026593298495270719232996, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "y": attribY_81551351910004068139383608344822372324, } _name = "use" # end of SVG.use.element # end of SVG.use.attlist # end of svg-structure.mod # Conditional Processing Module ............................... # ....................................................................... # SVG 1.1 Conditional Processing Module ................................. # file: svg-conditional.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Conditional Processing//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-conditional.mod" # # ....................................................................... # Conditional Processing # # switch # # This module declares markup to provide support for conditional processing. # # extension list specification # feature list specification # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Conditional.class ............................. # SVG.Conditional.attrib ............................ # SVG.Presentation.attrib ........................... # switch: Switch Element ............................ class Switch(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "transform": attribTransform_5682546015111540170885688523292561121, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onload": attribOnload_1736219473749214885598459380211457961, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "onload": attribOnload_1736219473749214885598459380211457961, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "stop_color": attribStop_color_11004707637165596998277037119383684, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "switch" # end of SVG.switch.element # end of SVG.switch.attlist # end of svg-conditional.mod # Image Module ................................................ # ....................................................................... # SVG 1.1 Image Module .................................................. # file: svg-image.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Image//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-image.mod" # # ....................................................................... # Image # # image # # This module declares markup to provide support for image. # # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Image.class ................................... # image: Image Element .............................. class Image(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "height": attribHeight_8656938303784040090070221295861351424, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "transform": attribTransform_5682546015111540170885688523292561121, "width": attribWidth_64248406416426090145249793245567015396, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "x": attribX_239059136031520658290104951402890521, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "overflow": attribOverflow_52917936388072056194158982145010690161, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "class": attribClass_53825496146914797399013018272928945089, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "y": attribY_81551351910004068139383608344822372324, "xlink:show": attribXlink_show_2512068296832459467974677258052208896, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "height": attribHeight_8656938303784040090070221295861351424, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "width": attribWidth_64248406416426090145249793245567015396, "clip_path": attribClip_path_6848405700625226295163574524817559769, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "y": attribY_81551351910004068139383608344822372324, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "xml_base": attribXml_base_1637447386481157916838004196247100100, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "mask": attribMask_1944143573929026593298495270719232996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "xml_space": attribXml_space_17330469855831907069104425902654745316, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "xlink_show": attribXlink_show_2512068296832459467974677258052208896, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "x": attribX_239059136031520658290104951402890521, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "display": attribDisplay_7822133436715702205398530701320632976, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "image" # end of SVG.image.element # end of SVG.image.attlist # end of svg-image.mod # Style Module ................................................ # ....................................................................... # SVG 1.1 Style Module .................................................. # file: svg-style.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Style//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-style.mod" # # ....................................................................... # Style # # style # # This module declares markup to provide support for stylesheet. # # list of classes # comma-separated list of media descriptors. # style sheet data # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Style.class ................................... # SVG.Style.attrib .................................. # style: Style Element .............................. class Style(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "title": attribTitle_19458376393466163336164327374592663961, "media": attribMedia_74481411028653324146354893354449742329, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "type": attribType_9214930984770684725187239721397439721, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "title": attribTitle_19458376393466163336164327374592663961, "media": attribMedia_74481411028653324146354893354449742329, "xml_space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "type": attribType_9214930984770684725187239721397439721, "xml_base": attribXml_base_1637447386481157916838004196247100100, } _name = "style" # end of SVG.style.element # end of SVG.style.attlist # end of svg-style.mod # Shape Module ................................................ # ....................................................................... # SVG 1.1 Shape Module .................................................. # file: svg-shape.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Shape//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-shape.mod" # # ....................................................................... # Shape # # path, rect, circle, line, ellipse, polyline, polygon # # This module declares markup to provide support for graphical shapes. # # a list of points # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Shape.class ................................... # path: Path Element ................................ class Path(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "pathLength": attribPathlength_24197452731674064653754275809953485881, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "transform": attribTransform_5682546015111540170885688523292561121, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "class": attribClass_53825496146914797399013018272928945089, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "d": attribD_22640446620367824771995978586268172196, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "clip_path": attribClip_path_6848405700625226295163574524817559769, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "pathLength": attribPathlength_24197452731674064653754275809953485881, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "marker_start": attribMarker_start_988048070396048868444768303173785401, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "d": attribD_22640446620367824771995978586268172196, "mask": attribMask_1944143573929026593298495270719232996, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "xml_space": attribXml_space_17330469855831907069104425902654745316, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "path" # end of SVG.path.element # end of SVG.path.attlist # rect: Rectangle Element ........................... class Rect(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "height": attribHeight_8656938303784040090070221295861351424, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "xml:space": attribXml_space_17330469855831907069104425902654745316, "transform": attribTransform_5682546015111540170885688523292561121, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "rx": attribRx_13781524972121758342148991510655896804, "ry": attribRy_110094368715135980265424280434051041, "width": attribWidth_64248406416426090145249793245567015396, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "class": attribClass_53825496146914797399013018272928945089, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "height": attribHeight_8656938303784040090070221295861351424, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "clip_path": attribClip_path_6848405700625226295163574524817559769, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "width": attribWidth_64248406416426090145249793245567015396, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "display": attribDisplay_7822133436715702205398530701320632976, "rx": attribRx_13781524972121758342148991510655896804, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "xml_base": attribXml_base_1637447386481157916838004196247100100, "ry": attribRy_110094368715135980265424280434051041, "mask": attribMask_1944143573929026593298495270719232996, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "xml_space": attribXml_space_17330469855831907069104425902654745316, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "rect" # end of SVG.rect.element # end of SVG.rect.attlist # circle: Circle Element ............................ class Circle(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "r": attribR_24449902921757264057715563149264794256, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "xml:space": attribXml_space_17330469855831907069104425902654745316, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "cx": attribCx_78583256250289946816796157685953761, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "transform": attribTransform_5682546015111540170885688523292561121, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "class": attribClass_53825496146914797399013018272928945089, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "cy": attribCy_18700519888591364754960118759930360464, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "cy": attribCy_18700519888591364754960118759930360464, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "clip_path": attribClip_path_6848405700625226295163574524817559769, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "cx": attribCx_78583256250289946816796157685953761, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "transform": attribTransform_5682546015111540170885688523292561121, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "xml_base": attribXml_base_1637447386481157916838004196247100100, "mask": attribMask_1944143573929026593298495270719232996, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "xml_space": attribXml_space_17330469855831907069104425902654745316, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "r": attribR_24449902921757264057715563149264794256, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "circle" # end of SVG.circle.element # end of SVG.circle.attlist # line: Line Element ................................ class Line(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "y2": attribY2_56638911263083492732707088783461444241, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "y1": attribY1_17262308902294398966134206242156644196, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "x1": attribX1_27754258168682229161176272781689178129, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "transform": attribTransform_5682546015111540170885688523292561121, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "x2": attribX2_2118644773536105186827729832224802916, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "class": attribClass_53825496146914797399013018272928945089, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "clip_path": attribClip_path_6848405700625226295163574524817559769, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "y1": attribY1_17262308902294398966134206242156644196, "y2": attribY2_56638911263083492732707088783461444241, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "x1": attribX1_27754258168682229161176272781689178129, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "marker_start": attribMarker_start_988048070396048868444768303173785401, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "x2": attribX2_2118644773536105186827729832224802916, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "mask": attribMask_1944143573929026593298495270719232996, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "xml_space": attribXml_space_17330469855831907069104425902654745316, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "line" # end of SVG.line.element # end of SVG.line.attlist # ellipse: Ellipse Element .......................... class Ellipse(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "xml:space": attribXml_space_17330469855831907069104425902654745316, "transform": attribTransform_5682546015111540170885688523292561121, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "cx": attribCx_78583256250289946816796157685953761, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "rx": attribRx_13781481893621489421002824802568598729, "ry": attribRy_110097357351798911254863028367766916, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "class": attribClass_53825496146914797399013018272928945089, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "cy": attribCy_18700519888591364754960118759930360464, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "cy": attribCy_18700519888591364754960118759930360464, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "clip_path": attribClip_path_6848405700625226295163574524817559769, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "cx": attribCx_78583256250289946816796157685953761, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "display": attribDisplay_7822133436715702205398530701320632976, "rx": attribRx_13781481893621489421002824802568598729, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "xml_base": attribXml_base_1637447386481157916838004196247100100, "ry": attribRy_110097357351798911254863028367766916, "mask": attribMask_1944143573929026593298495270719232996, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "xml_space": attribXml_space_17330469855831907069104425902654745316, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "ellipse" # end of SVG.ellipse.element # end of SVG.ellipse.attlist # polyline: Polyline Element ........................ class Polyline(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "transform": attribTransform_5682546015111540170885688523292561121, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "points": attribPoints_303944997639633971970173669392563856, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "class": attribClass_53825496146914797399013018272928945089, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "clip_path": attribClip_path_6848405700625226295163574524817559769, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "transform": attribTransform_5682546015111540170885688523292561121, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "marker_start": attribMarker_start_988048070396048868444768303173785401, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "mask": attribMask_1944143573929026593298495270719232996, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "xml_space": attribXml_space_17330469855831907069104425902654745316, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "points": attribPoints_303944997639633971970173669392563856, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "polyline" # end of SVG.polyline.element # end of SVG.polyline.attlist # polygon: Polygon Element .......................... class Polygon(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "transform": attribTransform_5682546015111540170885688523292561121, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "points": attribPoints_303944997639633971970173669392563856, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "class": attribClass_53825496146914797399013018272928945089, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "clip_path": attribClip_path_6848405700625226295163574524817559769, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "transform": attribTransform_5682546015111540170885688523292561121, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "marker_start": attribMarker_start_988048070396048868444768303173785401, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "mask": attribMask_1944143573929026593298495270719232996, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "xml_space": attribXml_space_17330469855831907069104425902654745316, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "points": attribPoints_303944997639633971970173669392563856, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "polygon" # end of SVG.polygon.element # end of SVG.polygon.attlist # end of svg-shape.mod # Text Module ................................................. # ....................................................................... # SVG 1.1 Text Module ................................................... # file: svg-text.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Text//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-text.mod" # # ....................................................................... # Text # # text, tspan, tref, textPath, altGlyph, altGlyphDef, altGlyphItem, # glyphRef # # This module declares markup to provide support for alternate glyph. # # 'baseline-shift' property/attribute value (e.g., 'baseline', 'sub', etc.) # 'font-family' property/attribute value (i.e., list of fonts) # 'font-size' property/attribute value # 'font-size-adjust' property/attribute value # 'glyph-orientation-horizontal' property/attribute value (e.g., <angle>) # 'glyph-orientation-vertical' property/attribute value (e.g., 'auto', <angle>) # 'kerning' property/attribute value (e.g., 'auto', <length>) # 'letter-spacing' or 'word-spacing' property/attribute value (e.g., 'normal', <length>) # 'text-decoration' property/attribute value (e.g., 'none', 'underline') # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Text.class .................................... # SVG.TextContent.class ............................. # SVG.Text.attrib ................................... # SVG.TextContent.attrib ............................ # SVG.Font.attrib ................................... # text: Text Element ................................ class Text(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "xml:space": attribXml_space_17330469855831907069104425902654745316, "dy": attribDy_42676389420301856377780465010365643449, "font-size": attribFont_size_27081965776421301083509832315670544, "transform": attribTransform_5682546015111540170885688523292561121, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "dx": attribDx_61950923097741785528208303003713060416, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "y": attribY_81551351910004068139383608344822372324, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "rotate": attribRotate_35628088744920802722236833233798489025, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "textLength": attribTextlength_8954420504159847980175721839199069209, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "lengthAdjust": attribLengthadjust_14164826843329396435796434101438128164, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "x": attribX_239059136031520658290104951402890521, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill": attribFill_427957648951849686632852735647933609, "clip_path": attribClip_path_6848405700625226295163574524817559769, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "lengthAdjust": attribLengthadjust_14164826843329396435796434101438128164, "font_family": attribFont_family_31078482467800891345580624105703722769, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "onload": attribOnload_1736219473749214885598459380211457961, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "dx": attribDx_61950923097741785528208303003713060416, "dy": attribDy_42676389420301856377780465010365643449, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "rotate": attribRotate_35628088744920802722236833233798489025, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "textLength": attribTextlength_8954420504159847980175721839199069209, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "text" # end of SVG.text.element # end of SVG.text.attlist # tspan: Text Span Element .......................... class Tspan(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "xml:space": attribXml_space_17330469855831907069104425902654745316, "dy": attribDy_42676389420301856377780465010365643449, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "dx": attribDx_61950923097741785528208303003713060416, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "y": attribY_81551351910004068139383608344822372324, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "rotate": attribRotate_35628088744920802722236833233798489025, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "textLength": attribTextlength_8954420504159847980175721839199069209, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "lengthAdjust": attribLengthadjust_14164826843329396435796434101438128164, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "x": attribX_239059136031520658290104951402890521, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill": attribFill_427957648951849686632852735647933609, "clip_path": attribClip_path_6848405700625226295163574524817559769, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "lengthAdjust": attribLengthadjust_14164826843329396435796434101438128164, "font_family": attribFont_family_31078482467800891345580624105703722769, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "onload": attribOnload_1736219473749214885598459380211457961, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "dx": attribDx_61950923097741785528208303003713060416, "dy": attribDy_42676389420301856377780465010365643449, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "rotate": attribRotate_35628088744920802722236833233798489025, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "textLength": attribTextlength_8954420504159847980175721839199069209, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "tspan" # end of SVG.tspan.element # end of SVG.tspan.attlist # tref: Text Reference Element ...................... class Tref(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "dy": attribDy_42676389420301856377780465010365643449, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "x": attribX_239059136031520658290104951402890521, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "dx": attribDx_61950923097741785528208303003713060416, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "y": attribY_81551351910004068139383608344822372324, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "rotate": attribRotate_35628088744920802722236833233798489025, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "textLength": attribTextlength_8954420504159847980175721839199069209, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "lengthAdjust": attribLengthadjust_14164826843329396435796434101438128164, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "y": attribY_81551351910004068139383608344822372324, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill": attribFill_427957648951849686632852735647933609, "clip_path": attribClip_path_6848405700625226295163574524817559769, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "dy": attribDy_42676389420301856377780465010365643449, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "lengthAdjust": attribLengthadjust_14164826843329396435796434101438128164, "font_family": attribFont_family_31078482467800891345580624105703722769, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "onload": attribOnload_1736219473749214885598459380211457961, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "dx": attribDx_61950923097741785528208303003713060416, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "rotate": attribRotate_35628088744920802722236833233798489025, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "textLength": attribTextlength_8954420504159847980175721839199069209, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "x": attribX_239059136031520658290104951402890521, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "tref" # end of SVG.tref.element # end of SVG.tref.attlist # textPath: Text Path Element ....................... class Textpath(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "startOffset": attribStartoffset_66415193990658837878318090979479425600, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "method": attribMethod_17350439503880136422522925393733890625, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "lengthAdjust": attribLengthadjust_14164826843329396435796434101438128164, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "spacing": attribSpacing_19873775088701691478650161607805634041, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "textLength": attribTextlength_8954420504159847980175721839199069209, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "startOffset": attribStartoffset_66415193990658837878318090979479425600, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill": attribFill_427957648951849686632852735647933609, "clip_path": attribClip_path_6848405700625226295163574524817559769, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "lengthAdjust": attribLengthadjust_14164826843329396435796434101438128164, "font_family": attribFont_family_31078482467800891345580624105703722769, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "onload": attribOnload_1736219473749214885598459380211457961, "spacing": attribSpacing_19873775088701691478650161607805634041, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "method": attribMethod_17350439503880136422522925393733890625, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "textLength": attribTextlength_8954420504159847980175721839199069209, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "textPath" # end of SVG.textPath.element # end of SVG.textPath.attlist # altGlyph: Alternate Glyph Element ................. class Altglyph(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "format": attribFormat_17062038506069968479150666733128037081, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "dy": attribDy_42676389420301856377780465010365643449, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "x": attribX_239059136031520658290104951402890521, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "dx": attribDx_61950923097741785528208303003713060416, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "y": attribY_81551351910004068139383608344822372324, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "font-family": attribFont_family_31078482467800891345580624105703722769, "glyphRef": attribGlyphref_874521118186319263254890951614864129, "class": attribClass_53825496146914797399013018272928945089, "rotate": attribRotate_35628088744920802722236833233798489025, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "glyphRef": attribGlyphref_874521118186319263254890951614864129, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "y": attribY_81551351910004068139383608344822372324, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill": attribFill_427957648951849686632852735647933609, "clip_path": attribClip_path_6848405700625226295163574524817559769, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "dy": attribDy_42676389420301856377780465010365643449, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "format": attribFormat_17062038506069968479150666733128037081, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "font_family": attribFont_family_31078482467800891345580624105703722769, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "onload": attribOnload_1736219473749214885598459380211457961, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "dx": attribDx_61950923097741785528208303003713060416, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "rotate": attribRotate_35628088744920802722236833233798489025, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "x": attribX_239059136031520658290104951402890521, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "altGlyph" # end of SVG.altGlyph.element # end of SVG.altGlyph.attlist # altGlyphDef: Alternate Glyph Definition Element ... class Altglyphdef(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xml:base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "xml_base": attribXml_base_1637447386481157916838004196247100100, } _name = "altGlyphDef" # end of SVG.altGlyphDef.element # end of SVG.altGlyphDef.attlist # altGlyphItem: Alternate Glyph Item Element ........ class Altglyphitem(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xml:base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "xml_base": attribXml_base_1637447386481157916838004196247100100, } _name = "altGlyphItem" # end of SVG.altGlyphItem.element # end of SVG.altGlyphItem.attlist # glyphRef: Glyph Reference Element ................. class Glyphref(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "font-size": attribFont_size_27081965776421301083509832315670544, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "style": attribStyle_17050104888087001662484243873103056144, "font-style": attribFont_style_63083969504709003786683888010914706576, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "glyphRef": attribGlyphref_874521118186319263254890951614864129, "xml:base": attribXml_base_1637447386481157916838004196247100100, "format": attribFormat_17062038506069968479150666733128037081, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "dx": attribDx_61950923097741785528208303003713060416, "dy": attribDy_42676389420301856377780465010365643449, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, } CONTENTMODEL = pycopia.XML.POM.ContentModel(None) KWATTRIBUTES = { "dy": attribDy_42676389420301856377780465010365643449, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "font_family": attribFont_family_31078482467800891345580624105703722769, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "y": attribY_81551351910004068139383608344822372324, "format": attribFormat_17062038506069968479150666733128037081, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "dx": attribDx_61950923097741785528208303003713060416, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "xml_base": attribXml_base_1637447386481157916838004196247100100, "font_size": attribFont_size_27081965776421301083509832315670544, "class_": attribClass_53825496146914797399013018272928945089, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "glyphRef": attribGlyphref_874521118186319263254890951614864129, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "x": attribX_239059136031520658290104951402890521, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "glyphRef" # end of SVG.glyphRef.element # end of SVG.glyphRef.attlist # end of svg-text.mod # Marker Module ............................................... # ....................................................................... # SVG 1.1 Marker Module ................................................. # file: svg-marker.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Marker//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-marker.mod" # # ....................................................................... # Marker # # marker # # This module declares markup to provide support for marker. # # 'marker' property/attribute value (e.g., 'none', <uri>) # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Marker.class .................................. # SVG.Marker.attrib ................................. # SVG.Presentation.attrib ........................... # marker: Marker Element ............................ class Marker(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "markerWidth": attribMarkerwidth_55226436177358894501255339298341432729, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "markerHeight": attribMarkerheight_54614022699804099798584675910003794281, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "refY": attribRefy_70752068641054731036721117320670298436, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "clip-path": attribClip_path_6848405700625226295163574524817559769, "markerUnits": attribMarkerunits_32065608968221576431520591439504400, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "refX": attribRefx_27693262886449334252355350728325498025, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "viewBox": attribViewbox_12676804841166570607454313509590524225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "orient": attribOrient_45640432084101417101661629749580668225, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "orient": attribOrient_45640432084101417101661629749580668225, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "stop_color": attribStop_color_11004707637165596998277037119383684, "markerUnits": attribMarkerunits_32065608968221576431520591439504400, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "refY": attribRefy_70752068641054731036721117320670298436, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "viewBox": attribViewbox_12676804841166570607454313509590524225, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "markerWidth": attribMarkerwidth_55226436177358894501255339298341432729, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "refX": attribRefx_27693262886449334252355350728325498025, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "markerHeight": attribMarkerheight_54614022699804099798584675910003794281, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "marker" # end of SVG.marker.element # end of SVG.marker.attlist # end of svg-marker.mod # Color Profile Module ........................................ # ....................................................................... # SVG 1.1 Color Profile Module .......................................... # file: svg-profile.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Color Profile//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-profile.mod" # # ....................................................................... # Color Profile # # color-profile # # This module declares markup to provide support for color profile. # # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.ColorProfile.class ............................ # SVG.ColorProfile.attrib ........................... # color-profile: Color Profile Element .............. class Color_profile(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "xml:base": attribXml_base_1637447386481157916838004196247100100, "name": attribName_84894284207451587588065513260296081316, "rendering-intent": attribRendering_intent_2763955552753726114535085653352633636, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "local": attribLocal_7961305551933250848674023048336560804, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "name": attribName_84894284207451587588065513260296081316, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "rendering_intent": attribRendering_intent_2763955552753726114535085653352633636, "local": attribLocal_7961305551933250848674023048336560804, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "color-profile" # end of SVG.color-profile.element # end of SVG.color-profile.attlist # end of svg-profile.mod # Gradient Module ............................................. # ....................................................................... # SVG 1.1 Gradient Module ............................................... # file: svg-gradient.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Gradient//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-gradient.mod" # # ....................................................................... # Gradient # # linearGradient, radialGradient, stop # # This module declares markup to provide support for gradient fill. # # a <number> or a <percentage> # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Gradient.class ................................ # SVG.Gradient.attrib ............................... # linearGradient: Linear Gradient Element ........... class Lineargradient(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "color": attribColor_6383642087606508409469185396823588644, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "x2": attribX2_2118644773536105186827729832224802916, "y1": attribY1_17262308902294398966134206242156644196, "y2": attribY2_56638911263083492732707088783461444241, "id": attribId_46142269508030220906474016374523948836, "stop-color": attribStop_color_11004707637165596998277037119383684, "style": attribStyle_17050104888087001662484243873103056144, "spreadMethod": attribSpreadmethod_66378802077764367434732630954166450625, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "gradientTransform": attribGradienttransform_13834810738159332941379809016760615921, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "x1": attribX1_27754258168682229161176272781689178129, "class": attribClass_53825496146914797399013018272928945089, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "gradientUnits": attribGradientunits_236724712260445555102708823262856900, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "color": attribColor_6383642087606508409469185396823588644, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "stop_color": attribStop_color_11004707637165596998277037119383684, "y1": attribY1_17262308902294398966134206242156644196, "y2": attribY2_56638911263083492732707088783461444241, "id": attribId_46142269508030220906474016374523948836, "style": attribStyle_17050104888087001662484243873103056144, "spreadMethod": attribSpreadmethod_66378802077764367434732630954166450625, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "class_": attribClass_53825496146914797399013018272928945089, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "x2": attribX2_2118644773536105186827729832224802916, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "x1": attribX1_27754258168682229161176272781689178129, "xml_base": attribXml_base_1637447386481157916838004196247100100, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "gradientUnits": attribGradientunits_236724712260445555102708823262856900, "gradientTransform": attribGradienttransform_13834810738159332941379809016760615921, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "linearGradient" # end of SVG.linearGradient.element # end of SVG.linearGradient.attlist # radialGradient: Radial Gradient Element ........... class Radialgradient(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "color": attribColor_6383642087606508409469185396823588644, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "cy": attribCy_18700519888591364754960118759930360464, "cx": attribCx_78583256250289946816796157685953761, "id": attribId_46142269508030220906474016374523948836, "stop-color": attribStop_color_11004707637165596998277037119383684, "style": attribStyle_17050104888087001662484243873103056144, "spreadMethod": attribSpreadmethod_66378802077764367434732630954166450625, "r": attribR_24449888294900485345055942086260101281, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "gradientTransform": attribGradienttransform_13834810738159332941379809016760615921, "xml:base": attribXml_base_1637447386481157916838004196247100100, "fx": attribFx_3820135096745003435155997809823543844, "fy": attribFy_44682967778457677796198831437379031225, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "class": attribClass_53825496146914797399013018272928945089, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "gradientUnits": attribGradientunits_236724712260445555102708823262856900, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "color": attribColor_6383642087606508409469185396823588644, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "stop_color": attribStop_color_11004707637165596998277037119383684, "cx": attribCx_78583256250289946816796157685953761, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "style": attribStyle_17050104888087001662484243873103056144, "spreadMethod": attribSpreadmethod_66378802077764367434732630954166450625, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "fx": attribFx_3820135096745003435155997809823543844, "fy": attribFy_44682967778457677796198831437379031225, "class_": attribClass_53825496146914797399013018272928945089, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "cy": attribCy_18700519888591364754960118759930360464, "gradientUnits": attribGradientunits_236724712260445555102708823262856900, "r": attribR_24449888294900485345055942086260101281, "gradientTransform": attribGradienttransform_13834810738159332941379809016760615921, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "radialGradient" # end of SVG.radialGradient.element # end of SVG.radialGradient.attlist # stop: Stop Element ................................ class Stop(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "style": attribStyle_17050104888087001662484243873103056144, "xml:base": attribXml_base_1637447386481157916838004196247100100, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "color": attribColor_6383642087606508409469185396823588644, "xml:space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "stop-color": attribStop_color_11004707637165596998277037119383684, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "offset": attribOffset_71549422301704647300527896361591227456, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "class": attribClass_53825496146914797399013018272928945089, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "color": attribColor_6383642087606508409469185396823588644, "xml_base": attribXml_base_1637447386481157916838004196247100100, "style": attribStyle_17050104888087001662484243873103056144, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "id": attribId_46142269508030220906474016374523948836, "class_": attribClass_53825496146914797399013018272928945089, "stop_color": attribStop_color_11004707637165596998277037119383684, "offset": attribOffset_71549422301704647300527896361591227456, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "xml_space": attribXml_space_17330469855831907069104425902654745316, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "stop" # end of SVG.stop.element # end of SVG.stop.attlist # end of svg-gradient.mod # Pattern Module .............................................. # ....................................................................... # SVG 1.1 Pattern Module ................................................ # file: svg-pattern.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Pattern//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-pattern.mod" # # ....................................................................... # Pattern # # pattern # # This module declares markup to provide support for pattern fill. # # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Pattern.class ................................. # SVG.Presentation.attrib ........................... # pattern: Pattern Element .......................... class Pattern(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "style": attribStyle_17050104888087001662484243873103056144, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "patternTransform": attribPatterntransform_28756772111575467463426355018409449536, "x": attribX_239059136031520658290104951402890521, "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "font-size": attribFont_size_27081965776421301083509832315670544, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "viewBox": attribViewbox_12676804841166570607454313509590524225, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "font-family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "height": attribHeight_8656875007100219121096067884823371849, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "width": attribWidth_64248607494964939327128408766366990921, "kerning": attribKerning_50722104490749097963249774417612741921, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "direction": attribDirection_50741361576644121884686865416273322500, "clip-path": attribClip_path_6848405700625226295163574524817559769, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "overflow": attribOverflow_52917936388072056194158982145010690161, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "cursor": attribCursor_36438614741117041205662488082241270404, "display": attribDisplay_7822133436715702205398530701320632976, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "font-style": attribFont_style_63083969504709003786683888010914706576, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "patternUnits": attribPatternunits_42801038907507202474474010922430291329, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "class": attribClass_53825496146914797399013018272928945089, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "y": attribY_81551351910004068139383608344822372324, "patternContentUnits": attribPatterncontentunits_2597939023017302048597325506176587129, "enable-background": attribEnable_background_10797894589918037147751517612226253649, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip_path": attribClip_path_6848405700625226295163574524817559769, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "style": attribStyle_17050104888087001662484243873103056144, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "color": attribColor_6383642087606508409469185396823588644, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "font_family": attribFont_family_31078482467800891345580624105703722769, "patternTransform": attribPatterntransform_28756772111575467463426355018409449536, "x": attribX_239059136031520658290104951402890521, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "viewBox": attribViewbox_12676804841166570607454313509590524225, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "height": attribHeight_8656875007100219121096067884823371849, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "width": attribWidth_64248607494964939327128408766366990921, "kerning": attribKerning_50722104490749097963249774417612741921, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "direction": attribDirection_50741361576644121884686865416273322500, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "overflow": attribOverflow_52917936388072056194158982145010690161, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "stop_color": attribStop_color_11004707637165596998277037119383684, "cursor": attribCursor_36438614741117041205662488082241270404, "display": attribDisplay_7822133436715702205398530701320632976, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke": attribStroke_65613381267441787847383807243146675856, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "font_style": attribFont_style_63083969504709003786683888010914706576, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "class_": attribClass_53825496146914797399013018272928945089, "patternUnits": attribPatternunits_42801038907507202474474010922430291329, "visibility": attribVisibility_64573877343784784797861622909719244721, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "font_size": attribFont_size_27081965776421301083509832315670544, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "mask": attribMask_1944143573929026593298495270719232996, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "y": attribY_81551351910004068139383608344822372324, "patternContentUnits": attribPatterncontentunits_2597939023017302048597325506176587129, } _name = "pattern" # end of SVG.pattern.element # end of SVG.pattern.attlist # end of svg-pattern.mod # Clip Module ................................................. # ....................................................................... # SVG 1.1 Clip Module ................................................... # file: svg-clip.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Clip//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-clip.mod" # # ....................................................................... # Clip # # clipPath # # This module declares markup to provide support for clipping. # # 'clip-path' property/attribute value (e.g., 'none', <uri>) # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Clip.class .................................... # SVG.Clip.attrib ................................... # clipPath: Clip Path Element ....................... class Clippath(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "transform": attribTransform_5682546015111540170885688523292561121, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "cursor": attribCursor_36438614741117041205662488082241270404, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "clipPathUnits": attribClippathunits_1164894747914145967126227858065512969, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "clip_path": attribClip_path_6848405700625226295163574524817559769, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "font_family": attribFont_family_31078482467800891345580624105703722769, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "clipPathUnits": attribClippathunits_1164894747914145967126227858065512969, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "transform": attribTransform_5682546015111540170885688523292561121, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "clipPath" # end of SVG.clipPath.element # end of SVG.clipPath.attlist # end of svg-clip.mod # Mask Module ................................................. # ....................................................................... # SVG 1.1 Mask Module ................................................... # file: svg-mask.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Mask//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-mask.mod" # # ....................................................................... # Mask # # mask # # This module declares markup to provide support for masking. # # 'mask' property/attribute value (e.g., 'none', <uri>) # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Mask.class .................................... # SVG.Mask.attrib ................................... # SVG.Presentation.attrib ........................... # mask: Mask Element ................................ class Mask(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "height": attribHeight_8656875007100219121096067884823371849, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "maskUnits": attribMaskunits_71575145070850567084493192726786182884, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "maskContentUnits": attribMaskcontentunits_55150678756063901504366699633395202916, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "width": attribWidth_64248607494964939327128408766366990921, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "height": attribHeight_8656875007100219121096067884823371849, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "width": attribWidth_64248607494964939327128408766366990921, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "stop_color": attribStop_color_11004707637165596998277037119383684, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "maskContentUnits": attribMaskcontentunits_55150678756063901504366699633395202916, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "maskUnits": attribMaskunits_71575145070850567084493192726786182884, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "mask" # end of SVG.mask.element # end of SVG.mask.attlist # end of svg-mask.mod # Filter Module ............................................... # ....................................................................... # SVG 1.1 Filter Module ................................................. # file: svg-filter.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Filter//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-filter.mod" # # ....................................................................... # Filter # # filter, feBlend, feColorMatrix, feComponentTransfer, feComposite, # feConvolveMatrix, feDiffuseLighting, feDisplacementMap, feFlood, # feGaussianBlur, feImage, feMerge, feMergeNode, feMorphology, feOffset, # feSpecularLighting, feTile, feTurbulence, feDistantLight, fePointLight, # feSpotLight, feFuncR, feFuncG, feFuncB, feFuncA # # This module declares markup to provide support for filter effect. # # 'filter' property/attribute value (e.g., 'none', <uri>) # list of <number>s, but at least one and at most two # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Filter.class .................................. # SVG.FilterPrimitive.class ......................... # SVG.Filter.attrib ................................. # SVG.FilterColor.attrib ............................ # SVG.FilterPrimitive.attrib ........................ # SVG.FilterPrimitiveWithIn.attrib .................. # SVG.Presentation.attrib ........................... # filter: Filter Element ............................ class Filter(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "height": attribHeight_8656875007100219121096067884823371849, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "filterUnits": attribFilterunits_4207477851313061525916327429714013924, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "primitiveUnits": attribPrimitiveunits_31055690275649669285157190918103746624, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "width": attribWidth_64248607494964939327128408766366990921, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xml:base": attribXml_base_1637447386481157916838004196247100100, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "filterRes": attribFilterres_3366516975002870436213760777859564881, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "width": attribWidth_64248607494964939327128408766366990921, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "stop_color": attribStop_color_11004707637165596998277037119383684, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "primitiveUnits": attribPrimitiveunits_31055690275649669285157190918103746624, "display": attribDisplay_7822133436715702205398530701320632976, "height": attribHeight_8656875007100219121096067884823371849, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "filterUnits": attribFilterunits_4207477851313061525916327429714013924, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "y": attribY_81551351910004068139383608344822372324, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "font_size": attribFont_size_27081965776421301083509832315670544, "filterRes": attribFilterres_3366516975002870436213760777859564881, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "x": attribX_239059136031520658290104951402890521, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "filter" # end of SVG.filter.element # end of SVG.filter.attlist # feBlend: Filter Effect Blend Element .............. class Feblend(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "in2": attribIn2_413014134412624564668738629802533641, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "id": attribId_46142269508030220906474016374523948836, "mode": attribMode_9874845349396367372980310088803820681, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "in2": attribIn2_413014134412624564668738629802533641, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "mode": attribMode_9874845349396367372980310088803820681, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feBlend" # end of SVG.feBlend.element # end of SVG.feBlend.attlist # feColorMatrix: Filter Effect Color Matrix Element . class Fecolormatrix(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "values": attribValues_45161171665899557065152411528096242436, "result": attribResult_2814136684571386521370442569033123249, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "type": attribType_8817164733194313167051252976818774761, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "values": attribValues_45161171665899557065152411528096242436, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "type": attribType_8817164733194313167051252976818774761, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feColorMatrix" # end of SVG.feColorMatrix.element # end of SVG.feColorMatrix.attlist # feComponentTransfer: Filter Effect Component Transfer Element class Fecomponenttransfer(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feComponentTransfer" # end of SVG.feComponentTransfer.element # end of SVG.feComponentTransfer.attlist # feComposite: Filter Effect Composite Element ...... class Fecomposite(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "k2": attribK2_63495797100718105204329329418938658121, "xml:space": attribXml_space_17330469855831907069104425902654745316, "k4": attribK4_3622623635537096506905483913400932729, "k1": attribK1_71737762493320640071500910929276028816, "in2": attribIn2_413014134412624564668738629802533641, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "k3": attribK3_40844454807915750097889610906948122500, "width": attribWidth_64248607494964939327128408766366990921, "operator": attribOperator_2180036693494496471972351013929214289, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "k2": attribK2_63495797100718105204329329418938658121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "k1": attribK1_71737762493320640071500910929276028816, "in2": attribIn2_413014134412624564668738629802533641, "id": attribId_46142269508030220906474016374523948836, "k3": attribK3_40844454807915750097889610906948122500, "width": attribWidth_64248607494964939327128408766366990921, "operator": attribOperator_2180036693494496471972351013929214289, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "k4": attribK4_3622623635537096506905483913400932729, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feComposite" # end of SVG.feComposite.element # end of SVG.feComposite.attlist # feConvolveMatrix: Filter Effect Convolve Matrix Element class Feconvolvematrix(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "preserveAlpha": attribPreservealpha_59074050731859891358048984916064587041, "xml:base": attribXml_base_1637447386481157916838004196247100100, "divisor": attribDivisor_42664058692193941523155561906911956049, "kernelMatrix": attribKernelmatrix_1217355260759542586161783175599498321, "xml:space": attribXml_space_17330469855831907069104425902654745316, "targetY": attribTargety_19188801435937223000576870959953525625, "bias": attribBias_4815562082115622993586227296249492961, "kernelUnitLength": attribKernelunitlength_7493727025350692090003915773550949409, "edgeMode": attribEdgemode_53553199688871342682977408017394499561, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "order": attribOrder_175707562775715593580625675764274116, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "targetX": attribTargetx_113154180346919876485625744781040704, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "preserveAlpha": attribPreservealpha_59074050731859891358048984916064587041, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "divisor": attribDivisor_42664058692193941523155561906911956049, "kernelMatrix": attribKernelmatrix_1217355260759542586161783175599498321, "xml_base": attribXml_base_1637447386481157916838004196247100100, "kernelUnitLength": attribKernelunitlength_7493727025350692090003915773550949409, "edgeMode": attribEdgemode_53553199688871342682977408017394499561, "id": attribId_46142269508030220906474016374523948836, "order": attribOrder_175707562775715593580625675764274116, "width": attribWidth_64248607494964939327128408766366990921, "bias": attribBias_4815562082115622993586227296249492961, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "targetX": attribTargetx_113154180346919876485625744781040704, "targetY": attribTargety_19188801435937223000576870959953525625, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feConvolveMatrix" # end of SVG.feConvolveMatrix.element # end of SVG.feConvolveMatrix.attlist # feDiffuseLighting: Filter Effect Diffuse Lighting Element class Fediffuselighting(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "style": attribStyle_17050104888087001662484243873103056144, "xml:base": attribXml_base_1637447386481157916838004196247100100, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "kernelUnitLength": attribKernelunitlength_7493727025350692090003915773550949409, "color": attribColor_6383642087606508409469185396823588644, "xml:space": attribXml_space_17330469855831907069104425902654745316, "diffuseConstant": attribDiffuseconstant_80286035756708247834640597677836656225, "id": attribId_46142269508030220906474016374523948836, "surfaceScale": attribSurfacescale_10332488846683741824374909296698713089, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "result": attribResult_2814136684571386521370442569033123249, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "class": attribClass_53825496146914797399013018272928945089, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "result": attribResult_2814136684571386521370442569033123249, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "kernelUnitLength": attribKernelunitlength_7493727025350692090003915773550949409, "width": attribWidth_64248607494964939327128408766366990921, "color": attribColor_6383642087606508409469185396823588644, "xml_base": attribXml_base_1637447386481157916838004196247100100, "diffuseConstant": attribDiffuseconstant_80286035756708247834640597677836656225, "style": attribStyle_17050104888087001662484243873103056144, "id": attribId_46142269508030220906474016374523948836, "surfaceScale": attribSurfacescale_10332488846683741824374909296698713089, "class_": attribClass_53825496146914797399013018272928945089, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "x": attribX_239059136031520658290104951402890521, "y": attribY_81551351910004068139383608344822372324, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "feDiffuseLighting" # end of SVG.feDiffuseLighting.element # end of SVG.feDiffuseLighting.attlist # feDisplacementMap: Filter Effect Displacement Map Element class Fedisplacementmap(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "scale": attribScale_77017261243588528665949000097622555969, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "yChannelSelector": attribYchannelselector_27155658630070716522611280826959602500, "in2": attribIn2_413014134412624564668738629802533641, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "xChannelSelector": attribXchannelselector_74696689163593075819587388803612591129, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "yChannelSelector": attribYchannelselector_27155658630070716522611280826959602500, "in2": attribIn2_413014134412624564668738629802533641, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "scale": attribScale_77017261243588528665949000097622555969, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "xChannelSelector": attribXchannelselector_74696689163593075819587388803612591129, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feDisplacementMap" # end of SVG.feDisplacementMap.element # end of SVG.feDisplacementMap.attlist # feFlood: Filter Effect Flood Element .............. class Feflood(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "style": attribStyle_17050104888087001662484243873103056144, "xml:base": attribXml_base_1637447386481157916838004196247100100, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "color": attribColor_6383642087606508409469185396823588644, "xml:space": attribXml_space_17330469855831907069104425902654745316, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "result": attribResult_2814136684571386521370442569033123249, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "class": attribClass_53825496146914797399013018272928945089, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "result": attribResult_2814136684571386521370442569033123249, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "width": attribWidth_64248607494964939327128408766366990921, "color": attribColor_6383642087606508409469185396823588644, "xml_base": attribXml_base_1637447386481157916838004196247100100, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "style": attribStyle_17050104888087001662484243873103056144, "id": attribId_46142269508030220906474016374523948836, "class_": attribClass_53825496146914797399013018272928945089, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "x": attribX_239059136031520658290104951402890521, "y": attribY_81551351910004068139383608344822372324, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "feFlood" # end of SVG.feFlood.element # end of SVG.feFlood.attlist # feGaussianBlur: Filter Effect Gaussian Blur Element class Fegaussianblur(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "stdDeviation": attribStddeviation_3689461481017116150572477368212178084, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "stdDeviation": attribStddeviation_3689461481017116150572477368212178084, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feGaussianBlur" # end of SVG.feGaussianBlur.element # end of SVG.feGaussianBlur.attlist # feImage: Filter Effect Image Element .............. class Feimage(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "height": attribHeight_8656875007100219121096067884823371849, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "result": attribResult_2814136684571386521370442569033123249, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "width": attribWidth_64248607494964939327128408766366990921, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xml:base": attribXml_base_1637447386481157916838004196247100100, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "xlink:show": attribXlink_show_2512068296832459467974677258052208896, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "height": attribHeight_8656875007100219121096067884823371849, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "width": attribWidth_64248607494964939327128408766366990921, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "stop_color": attribStop_color_11004707637165596998277037119383684, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "result": attribResult_2814136684571386521370442569033123249, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "xlink_show": attribXlink_show_2512068296832459467974677258052208896, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "feImage" # end of SVG.feImage.element # end of SVG.feImage.attlist # feMerge: Filter Effect Merge Element .............. class Femerge(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feMerge" # end of SVG.feMerge.element # end of SVG.feMerge.attlist # feMergeNode: Filter Effect Merge Node Element ..... class Femergenode(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xml:base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "in": attribIn_4730483019206772816093541605825752121, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "xml_space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "xml_base": attribXml_base_1637447386481157916838004196247100100, } _name = "feMergeNode" # end of SVG.feMergeNode.element # end of SVG.feMergeNode.attlist # feMorphology: Filter Effect Morphology Element .... class Femorphology(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "operator": attribOperator_55696622124939874802011175094556819600, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "radius": attribRadius_20805230232467426610757715545280068996, "result": attribResult_2814136684571386521370442569033123249, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "operator": attribOperator_55696622124939874802011175094556819600, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "radius": attribRadius_20805230232467426610757715545280068996, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feMorphology" # end of SVG.feMorphology.element # end of SVG.feMorphology.attlist # feOffset: Filter Effect Offset Element ............ class Feoffset(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "dy": attribDy_42676389420301856377780465010365643449, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "dx": attribDx_61950923097741785528208303003713060416, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "dx": attribDx_61950923097741785528208303003713060416, "dy": attribDy_42676389420301856377780465010365643449, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feOffset" # end of SVG.feOffset.element # end of SVG.feOffset.attlist # feSpecularLighting: Filter Effect Specular Lighting Element class Fespecularlighting(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "style": attribStyle_17050104888087001662484243873103056144, "specularConstant": attribSpecularconstant_84149048183607113074367187467952562561, "xml:base": attribXml_base_1637447386481157916838004196247100100, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "color": attribColor_6383642087606508409469185396823588644, "xml:space": attribXml_space_17330469855831907069104425902654745316, "kernelUnitLength": attribKernelunitlength_7493727025350692090003915773550949409, "id": attribId_46142269508030220906474016374523948836, "surfaceScale": attribSurfacescale_10332488846683741824374909296698713089, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "result": attribResult_2814136684571386521370442569033123249, "specularExponent": attribSpecularexponent_61134666344794906612277075107825539136, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "class": attribClass_53825496146914797399013018272928945089, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "result": attribResult_2814136684571386521370442569033123249, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "specularExponent": attribSpecularexponent_61134666344794906612277075107825539136, "kernelUnitLength": attribKernelunitlength_7493727025350692090003915773550949409, "width": attribWidth_64248607494964939327128408766366990921, "color": attribColor_6383642087606508409469185396823588644, "xml_base": attribXml_base_1637447386481157916838004196247100100, "style": attribStyle_17050104888087001662484243873103056144, "id": attribId_46142269508030220906474016374523948836, "surfaceScale": attribSurfacescale_10332488846683741824374909296698713089, "class_": attribClass_53825496146914797399013018272928945089, "specularConstant": attribSpecularconstant_84149048183607113074367187467952562561, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "x": attribX_239059136031520658290104951402890521, "y": attribY_81551351910004068139383608344822372324, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "feSpecularLighting" # end of SVG.feSpecularLighting.element # end of SVG.feSpecularLighting.attlist # feTile: Filter Effect Tile Element ................ class Fetile(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "in": attribIn_4730483019206772816093541605825752121, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "in_": attribIn_4730483019206772816093541605825752121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feTile" # end of SVG.feTile.element # end of SVG.feTile.attlist # feTurbulence: Filter Effect Turbulence Element .... class Feturbulence(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "baseFrequency": attribBasefrequency_9657383062915270831414177769246357056, "type": attribType_44195322266492707505680514403350646784, "xml:space": attribXml_space_17330469855831907069104425902654745316, "stitchTiles": attribStitchtiles_8708553574096507571273713290523302129, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "width": attribWidth_64248607494964939327128408766366990921, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "result": attribResult_2814136684571386521370442569033123249, "numOctaves": attribNumoctaves_33842002282539678531029534805014041, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "seed": attribSeed_395390389235302342334480662585197025, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "baseFrequency": attribBasefrequency_9657383062915270831414177769246357056, "xml_base": attribXml_base_1637447386481157916838004196247100100, "stitchTiles": attribStitchtiles_8708553574096507571273713290523302129, "id": attribId_46142269508030220906474016374523948836, "width": attribWidth_64248607494964939327128408766366990921, "seed": attribSeed_395390389235302342334480662585197025, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "numOctaves": attribNumoctaves_33842002282539678531029534805014041, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "height": attribHeight_8656875007100219121096067884823371849, "type": attribType_44195322266492707505680514403350646784, "xml_space": attribXml_space_17330469855831907069104425902654745316, "result": attribResult_2814136684571386521370442569033123249, } _name = "feTurbulence" # end of SVG.feTurbulence.element # end of SVG.feTurbulence.attlist # feDistantLight: Filter Effect Distant Light Element class Fedistantlight(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "elevation": attribElevation_61691238982851464582553293332205726916, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "azimuth": attribAzimuth_74070377867045842519926503799918587641, "xml:base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "elevation": attribElevation_61691238982851464582553293332205726916, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "azimuth": attribAzimuth_74070377867045842519926503799918587641, "xml_space": attribXml_space_17330469855831907069104425902654745316, } _name = "feDistantLight" # end of SVG.feDistantLight.element # end of SVG.feDistantLight.attlist # fePointLight: Filter Effect Point Light Element ... class Fepointlight(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "z": attribZ_10258984500863391157969307314265566801, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "z": attribZ_10258984500863391157969307314265566801, "xml_space": attribXml_space_17330469855831907069104425902654745316, } _name = "fePointLight" # end of SVG.fePointLight.element # end of SVG.fePointLight.attlist # feSpotLight: Filter Effect Spot Light Element ..... class Fespotlight(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "pointsAtX": attribPointsatx_6988893093781351598201266146021083281, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "limitingConeAngle": attribLimitingconeangle_7619872417710758524908672078722976144, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "specularExponent": attribSpecularexponent_61134666344794906612277075107825539136, "pointsAtZ": attribPointsatz_317880712621523478286458929706647769, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "pointsAtY": attribPointsaty_4533565914723288637628523286344145296, "z": attribZ_10258984500863391157969307314265566801, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "pointsAtX": attribPointsatx_6988893093781351598201266146021083281, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "limitingConeAngle": attribLimitingconeangle_7619872417710758524908672078722976144, "specularExponent": attribSpecularexponent_61134666344794906612277075107825539136, "pointsAtZ": attribPointsatz_317880712621523478286458929706647769, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "pointsAtY": attribPointsaty_4533565914723288637628523286344145296, "z": attribZ_10258984500863391157969307314265566801, "xml_space": attribXml_space_17330469855831907069104425902654745316, } _name = "feSpotLight" # end of SVG.feSpotLight.element # end of SVG.feSpotLight.attlist # feFuncR: Filter Effect Function Red Element ....... class Fefuncr(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "xml:base": attribXml_base_1637447386481157916838004196247100100, "tableValues": attribTablevalues_153147341538372788451777776126967121, "intercept": attribIntercept_24152616922318771008627770666889364321, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "amplitude": attribAmplitude_4136392295356350389073186455656458304, "offset": attribOffset_71549239984150950824190812492777137081, "type": attribType_21867493089199498528985878891419248400, "id": attribId_46142269508030220906474016374523948836, "exponent": attribExponent_54536060099375948563237755309446148049, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "tableValues": attribTablevalues_153147341538372788451777776126967121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "intercept": attribIntercept_24152616922318771008627770666889364321, "amplitude": attribAmplitude_4136392295356350389073186455656458304, "offset": attribOffset_71549239984150950824190812492777137081, "type": attribType_21867493089199498528985878891419248400, "xml_space": attribXml_space_17330469855831907069104425902654745316, "exponent": attribExponent_54536060099375948563237755309446148049, } _name = "feFuncR" # end of SVG.feFuncR.element # end of SVG.feFuncR.attlist # feFuncG: Filter Effect Function Green Element ..... class Fefuncg(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "xml:base": attribXml_base_1637447386481157916838004196247100100, "tableValues": attribTablevalues_153147341538372788451777776126967121, "intercept": attribIntercept_24152616922318771008627770666889364321, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "amplitude": attribAmplitude_4136392295356350389073186455656458304, "offset": attribOffset_71549239984150950824190812492777137081, "type": attribType_21867493089199498528985878891419248400, "id": attribId_46142269508030220906474016374523948836, "exponent": attribExponent_54536060099375948563237755309446148049, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "tableValues": attribTablevalues_153147341538372788451777776126967121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "intercept": attribIntercept_24152616922318771008627770666889364321, "amplitude": attribAmplitude_4136392295356350389073186455656458304, "offset": attribOffset_71549239984150950824190812492777137081, "type": attribType_21867493089199498528985878891419248400, "xml_space": attribXml_space_17330469855831907069104425902654745316, "exponent": attribExponent_54536060099375948563237755309446148049, } _name = "feFuncG" # end of SVG.feFuncG.element # end of SVG.feFuncG.attlist # feFuncB: Filter Effect Function Blue Element ...... class Fefuncb(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "xml:base": attribXml_base_1637447386481157916838004196247100100, "tableValues": attribTablevalues_153147341538372788451777776126967121, "intercept": attribIntercept_24152616922318771008627770666889364321, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "amplitude": attribAmplitude_4136392295356350389073186455656458304, "offset": attribOffset_71549239984150950824190812492777137081, "type": attribType_21867493089199498528985878891419248400, "id": attribId_46142269508030220906474016374523948836, "exponent": attribExponent_54536060099375948563237755309446148049, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "tableValues": attribTablevalues_153147341538372788451777776126967121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "intercept": attribIntercept_24152616922318771008627770666889364321, "amplitude": attribAmplitude_4136392295356350389073186455656458304, "offset": attribOffset_71549239984150950824190812492777137081, "type": attribType_21867493089199498528985878891419248400, "xml_space": attribXml_space_17330469855831907069104425902654745316, "exponent": attribExponent_54536060099375948563237755309446148049, } _name = "feFuncB" # end of SVG.feFuncB.element # end of SVG.feFuncB.attlist # feFuncA: Filter Effect Function Alpha Element ..... class Fefunca(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "xml:base": attribXml_base_1637447386481157916838004196247100100, "tableValues": attribTablevalues_153147341538372788451777776126967121, "intercept": attribIntercept_24152616922318771008627770666889364321, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "amplitude": attribAmplitude_4136392295356350389073186455656458304, "offset": attribOffset_71549239984150950824190812492777137081, "type": attribType_21867493089199498528985878891419248400, "id": attribId_46142269508030220906474016374523948836, "exponent": attribExponent_54536060099375948563237755309446148049, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "tableValues": attribTablevalues_153147341538372788451777776126967121, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "intercept": attribIntercept_24152616922318771008627770666889364321, "amplitude": attribAmplitude_4136392295356350389073186455656458304, "offset": attribOffset_71549239984150950824190812492777137081, "type": attribType_21867493089199498528985878891419248400, "xml_space": attribXml_space_17330469855831907069104425902654745316, "exponent": attribExponent_54536060099375948563237755309446148049, } _name = "feFuncA" # end of SVG.feFuncA.element # end of SVG.feFuncA.attlist # end of svg-filter.mod # Cursor Module ............................................... # ....................................................................... # SVG 1.1 Cursor Module ................................................. # file: svg-cursor.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Cursor//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-cursor.mod" # # ....................................................................... # Cursor # # cursor # # This module declares markup to provide support for cursor. # # 'cursor' property/attribute value (e.g., 'crosshair', <uri>) # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Cursor.class .................................. # SVG.Cursor.attrib ................................. # cursor: Cursor Element ............................ class Cursor(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "xml:base": attribXml_base_1637447386481157916838004196247100100, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "y": attribY_81551351910004068139383608344822372324, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "x": attribX_239059136031520658290104951402890521, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "id": attribId_46142269508030220906474016374523948836, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "y": attribY_81551351910004068139383608344822372324, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "xml_base": attribXml_base_1637447386481157916838004196247100100, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "id": attribId_46142269508030220906474016374523948836, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "x": attribX_239059136031520658290104951402890521, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "cursor" # end of SVG.cursor.element # end of SVG.cursor.attlist # end of svg-cursor.mod # Hyperlinking Module ......................................... # ....................................................................... # SVG 1.1 Hyperlinking Module ........................................... # file: svg-hyperlink.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Hyperlinking//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-hyperlink.mod" # # ....................................................................... # Hyperlinking # # a # # This module declares markup to provide support for hyper linking. # # link to this target # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Hyperlink.class ............................... # SVG.Presentation.attrib ........................... # a: Anchor Element ................................. class A(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "onclick": attribOnclick_9623099846574007271855531133876915264, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "xlink:actuate": attribXlink_actuate_125935775984614295008393323163771716, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "font-size": attribFont_size_27081965776421301083509832315670544, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "font-family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "transform": attribTransform_5682546015111540170885688523292561121, "kerning": attribKerning_50722104490749097963249774417612741921, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "direction": attribDirection_50741361576644121884686865416273322500, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip-path": attribClip_path_6848405700625226295163574524817559769, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "visibility": attribVisibility_64573877343784784797861622909719244721, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "overflow": attribOverflow_52917936388072056194158982145010690161, "xlink:show": attribXlink_show_5485491858761316754615207879177863481, "target": attribTarget_53140914068584812121339566534355065025, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "display": attribDisplay_7822133436715702205398530701320632976, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "font-style": attribFont_style_63083969504709003786683888010914706576, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "opacity": attribOpacity_26995226223223505626239894655606671556, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "class": attribClass_53825496146914797399013018272928945089, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "enable-background": attribEnable_background_10797894589918037147751517612226253649, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip_path": attribClip_path_6848405700625226295163574524817559769, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "onload": attribOnload_1736219473749214885598459380211457961, "style": attribStyle_17050104888087001662484243873103056144, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "color": attribColor_6383642087606508409469185396823588644, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "onclick": attribOnclick_9623099846574007271855531133876915264, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "xlink_show": attribXlink_show_5485491858761316754615207879177863481, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "transform": attribTransform_5682546015111540170885688523292561121, "kerning": attribKerning_50722104490749097963249774417612741921, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "direction": attribDirection_50741361576644121884686865416273322500, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "overflow": attribOverflow_52917936388072056194158982145010690161, "target": attribTarget_53140914068584812121339566534355065025, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "stop_color": attribStop_color_11004707637165596998277037119383684, "cursor": attribCursor_36438614741117041205662488082241270404, "display": attribDisplay_7822133436715702205398530701320632976, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "stroke": attribStroke_65613381267441787847383807243146675856, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "font_style": attribFont_style_63083969504709003786683888010914706576, "font_family": attribFont_family_31078482467800891345580624105703722769, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "class_": attribClass_53825496146914797399013018272928945089, "visibility": attribVisibility_64573877343784784797861622909719244721, "xlink_actuate": attribXlink_actuate_125935775984614295008393323163771716, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "font_size": attribFont_size_27081965776421301083509832315670544, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "mask": attribMask_1944143573929026593298495270719232996, "flood_color": attribFlood_color_62406031729681475456233843693231490401, } _name = "a" # end of SVG.a.element # end of SVG.a.attlist # end of svg-hyperlink.mod # View Module ................................................. # ....................................................................... # SVG 1.1 View Module ................................................... # file: svg-view.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 View//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-view.mod" # # ....................................................................... # View # # view # # This module declares markup to provide support for view. # # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.View.class .................................... # view: View Element ................................ class View(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "viewTarget": attribViewtarget_4985094957501300299413740899118798400, "xml:space": attribXml_space_17330469855831907069104425902654745316, "viewBox": attribViewbox_12676804841166570607454313509590524225, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "zoomAndPan": attribZoomandpan_50482487998172502887521259571959660481, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "viewTarget": attribViewtarget_4985094957501300299413740899118798400, "xml_base": attribXml_base_1637447386481157916838004196247100100, "xml_space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "preserveAspectRatio": attribPreserveaspectratio_4249407348708327704394963551418555456, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "zoomAndPan": attribZoomandpan_50482487998172502887521259571959660481, "viewBox": attribViewbox_12676804841166570607454313509590524225, } _name = "view" # end of SVG.view.element # end of SVG.view.attlist # end of svg-view.mod # Scripting Module ............................................ # ....................................................................... # SVG 1.1 Scripting Module .............................................. # file: svg-script.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Scripting//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-script.mod" # # ....................................................................... # Scripting # # script # # This module declares markup to provide support for scripting. # # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Script.class .................................. # script: Script Element ............................ class Script(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "xml:base": attribXml_base_1637447386481157916838004196247100100, "type": attribType_9214930984770684725187239721397439721, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "type": attribType_9214930984770684725187239721397439721, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "script" # end of SVG.script.element # end of SVG.script.attlist # end of svg-script.mod # Animation Module ............................................ # ....................................................................... # SVG 1.1 Animation Module .............................................. # file: svg-animation.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Animation//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-animation.mod" # # ....................................................................... # Animation # # animate, set, animateMotion, animateColor, animateTransform, mpath # # This module declares markup to provide support for animation. # # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Animation.class ............................... # SVG.Animation.attrib .............................. # SVG.AnimationAttribute.attrib ..................... # SVG.AnimationTiming.attrib ........................ # SVG.AnimationValue.attrib ......................... # SVG.AnimationAddtion.attrib ....................... # animate: Animate Element .......................... class Animate(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "keySplines": attribKeysplines_80991548921360828646832640481688984921, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "accumulate": attribAccumulate_5160601998326329630873998491968862409, "attributeType": attribAttributetype_2434829879633913983500496356253274801, "additive": attribAdditive_971738928719029624514719682153546929, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "calcMode": attribCalcmode_15704815580393352200060891219264080201, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "to": attribTo_9054208321628946284316156841392201, "dur": attribDur_247488895394240938561450566804576400, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "onend": attribOnend_2245217001552764273737467841846343401, "begin": attribBegin_15132218401583472173474579121984357904, "xml:base": attribXml_base_1637447386481157916838004196247100100, "max": attribMax_1724214546919082020600484239354659001, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "attributeName": attribAttributename_53519243694208722527102928715213190025, "keyTimes": attribKeytimes_5912796650944756099664218914670640625, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "from": attribFrom_7563060327602975314011001241832722500, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "by": attribBy_24996377456482567646458162580010890689, "restart": attribRestart_12728825596617743269027730283262276, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "values": attribValues_45161171665899557065152411528096242436, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "keySplines": attribKeysplines_80991548921360828646832640481688984921, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "begin": attribBegin_15132218401583472173474579121984357904, "attributeType": attribAttributetype_2434829879633913983500496356253274801, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "calcMode": attribCalcmode_15704815580393352200060891219264080201, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "by": attribBy_24996377456482567646458162580010890689, "to": attribTo_9054208321628946284316156841392201, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "dur": attribDur_247488895394240938561450566804576400, "onend": attribOnend_2245217001552764273737467841846343401, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "max": attribMax_1724214546919082020600484239354659001, "attributeName": attribAttributename_53519243694208722527102928715213190025, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "accumulate": attribAccumulate_5160601998326329630873998491968862409, "additive": attribAdditive_971738928719029624514719682153546929, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "restart": attribRestart_12728825596617743269027730283262276, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "from_": attribFrom_7563060327602975314011001241832722500, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "values": attribValues_45161171665899557065152411528096242436, "keyTimes": attribKeytimes_5912796650944756099664218914670640625, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "animate" # end of SVG.animate.element # end of SVG.animate.attlist # set: Set Element .................................. class Set(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "attributeType": attribAttributetype_2434829879633913983500496356253274801, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "to": attribTo_9054208321628946284316156841392201, "dur": attribDur_247488895394240938561450566804576400, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "onend": attribOnend_2245217001552764273737467841846343401, "begin": attribBegin_15132218401583472173474579121984357904, "xml:base": attribXml_base_1637447386481157916838004196247100100, "max": attribMax_1724214546919082020600484239354659001, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "attributeName": attribAttributename_53519243694208722527102928715213190025, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "restart": attribRestart_12728825596617743269027730283262276, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "begin": attribBegin_15132218401583472173474579121984357904, "attributeType": attribAttributetype_2434829879633913983500496356253274801, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "to": attribTo_9054208321628946284316156841392201, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "dur": attribDur_247488895394240938561450566804576400, "onend": attribOnend_2245217001552764273737467841846343401, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "max": attribMax_1724214546919082020600484239354659001, "attributeName": attribAttributename_53519243694208722527102928715213190025, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "restart": attribRestart_12728825596617743269027730283262276, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "set" # end of SVG.set.element # end of SVG.set.attlist # animateMotion: Animate Motion Element ............. class Animatemotion(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "origin": attribOrigin_17475329533415154540648306660025500100, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "keySplines": attribKeysplines_80991548921360828646832640481688984921, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "accumulate": attribAccumulate_5160601998326329630873998491968862409, "path": attribPath_45791627773218437939278519800882329689, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "calcMode": attribCalcmode_24182271714570014214583360617042994176, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "to": attribTo_9054208321628946284316156841392201, "dur": attribDur_247488895394240938561450566804576400, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "onend": attribOnend_2245217001552764273737467841846343401, "begin": attribBegin_15132218401583472173474579121984357904, "from": attribFrom_7563060327602975314011001241832722500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "max": attribMax_1724214546919082020600484239354659001, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "keyPoints": attribKeypoints_52172241001911673761565816882440466081, "keyTimes": attribKeytimes_5912796650944756099664218914670640625, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "additive": attribAdditive_971738928719029624514719682153546929, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "by": attribBy_24996377456482567646458162580010890689, "restart": attribRestart_12728825596617743269027730283262276, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "values": attribValues_45161171665899557065152411528096242436, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, "rotate": attribRotate_35628088744920802722236833233798489025, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "origin": attribOrigin_17475329533415154540648306660025500100, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "keySplines": attribKeysplines_80991548921360828646832640481688984921, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "begin": attribBegin_15132218401583472173474579121984357904, "path": attribPath_45791627773218437939278519800882329689, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "calcMode": attribCalcmode_24182271714570014214583360617042994176, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "by": attribBy_24996377456482567646458162580010890689, "to": attribTo_9054208321628946284316156841392201, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "dur": attribDur_247488895394240938561450566804576400, "onend": attribOnend_2245217001552764273737467841846343401, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "max": attribMax_1724214546919082020600484239354659001, "keyPoints": attribKeypoints_52172241001911673761565816882440466081, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "accumulate": attribAccumulate_5160601998326329630873998491968862409, "additive": attribAdditive_971738928719029624514719682153546929, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "restart": attribRestart_12728825596617743269027730283262276, "rotate": attribRotate_35628088744920802722236833233798489025, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "from_": attribFrom_7563060327602975314011001241832722500, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "values": attribValues_45161171665899557065152411528096242436, "keyTimes": attribKeytimes_5912796650944756099664218914670640625, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "animateMotion" # end of SVG.animateMotion.element # end of SVG.animateMotion.attlist # animateColor: Animate Color Element ............... class Animatecolor(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "keySplines": attribKeysplines_80991548921360828646832640481688984921, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "accumulate": attribAccumulate_5160601998326329630873998491968862409, "attributeType": attribAttributetype_2434829879633913983500496356253274801, "additive": attribAdditive_971738928719029624514719682153546929, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "calcMode": attribCalcmode_15704815580393352200060891219264080201, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "to": attribTo_9054208321628946284316156841392201, "dur": attribDur_247488895394240938561450566804576400, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "onend": attribOnend_2245217001552764273737467841846343401, "begin": attribBegin_15132218401583472173474579121984357904, "xml:base": attribXml_base_1637447386481157916838004196247100100, "max": attribMax_1724214546919082020600484239354659001, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "attributeName": attribAttributename_53519243694208722527102928715213190025, "keyTimes": attribKeytimes_5912796650944756099664218914670640625, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "from": attribFrom_7563060327602975314011001241832722500, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "by": attribBy_24996377456482567646458162580010890689, "restart": attribRestart_12728825596617743269027730283262276, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "values": attribValues_45161171665899557065152411528096242436, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "keySplines": attribKeysplines_80991548921360828646832640481688984921, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "begin": attribBegin_15132218401583472173474579121984357904, "attributeType": attribAttributetype_2434829879633913983500496356253274801, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "calcMode": attribCalcmode_15704815580393352200060891219264080201, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "by": attribBy_24996377456482567646458162580010890689, "to": attribTo_9054208321628946284316156841392201, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "dur": attribDur_247488895394240938561450566804576400, "onend": attribOnend_2245217001552764273737467841846343401, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "max": attribMax_1724214546919082020600484239354659001, "attributeName": attribAttributename_53519243694208722527102928715213190025, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "accumulate": attribAccumulate_5160601998326329630873998491968862409, "additive": attribAdditive_971738928719029624514719682153546929, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "restart": attribRestart_12728825596617743269027730283262276, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "from_": attribFrom_7563060327602975314011001241832722500, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "values": attribValues_45161171665899557065152411528096242436, "keyTimes": attribKeytimes_5912796650944756099664218914670640625, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "animateColor" # end of SVG.animateColor.element # end of SVG.animateColor.attlist # animateTransform: Animate Transform Element ....... class Animatetransform(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "keySplines": attribKeysplines_80991548921360828646832640481688984921, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755375353447839808560974640732695729, "accumulate": attribAccumulate_5160601998326329630873998491968862409, "attributeType": attribAttributetype_2434829879633913983500496356253274801, "additive": attribAdditive_971738928719029624514719682153546929, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "calcMode": attribCalcmode_15704815580393352200060891219264080201, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "to": attribTo_9054208321628946284316156841392201, "dur": attribDur_247488895394240938561450566804576400, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "type": attribType_5376736995825510911871520433293000324, "onend": attribOnend_2245217001552764273737467841846343401, "begin": attribBegin_15132218401583472173474579121984357904, "xml:base": attribXml_base_1637447386481157916838004196247100100, "max": attribMax_1724214546919082020600484239354659001, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "attributeName": attribAttributename_53519243694208722527102928715213190025, "keyTimes": attribKeytimes_5912796650944756099664218914670640625, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "from": attribFrom_7563060327602975314011001241832722500, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "by": attribBy_24996377456482567646458162580010890689, "restart": attribRestart_12728825596617743269027730283262276, "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "values": attribValues_45161171665899557065152411528096242436, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "keySplines": attribKeysplines_80991548921360828646832640481688984921, "repeatCount": attribRepeatcount_25731109718729223477290922313197639225, "begin": attribBegin_15132218401583472173474579121984357904, "attributeType": attribAttributetype_2434829879633913983500496356253274801, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_29390659501544115112792031566291654129, "onload": attribOnload_1736219473749214885598459380211457961, "end": attribEnd_52893332906885955687937188021518004804, "calcMode": attribCalcmode_15704815580393352200060891219264080201, "min": attribMin_22017627953804011528067270395696281, "repeatDur": attribRepeatdur_20281694933092051836466383310779369049, "by": attribBy_24996377456482567646458162580010890689, "to": attribTo_9054208321628946284316156841392201, "xlink_href": attribXlink_href_2755375353447839808560974640732695729, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "dur": attribDur_247488895394240938561450566804576400, "type": attribType_5376736995825510911871520433293000324, "onend": attribOnend_2245217001552764273737467841846343401, "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "max": attribMax_1724214546919082020600484239354659001, "attributeName": attribAttributename_53519243694208722527102928715213190025, "onbegin": attribOnbegin_64409703518877412211179561641113665801, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "accumulate": attribAccumulate_5160601998326329630873998491968862409, "additive": attribAdditive_971738928719029624514719682153546929, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_base": attribXml_base_1637447386481157916838004196247100100, "restart": attribRestart_12728825596617743269027730283262276, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "from_": attribFrom_7563060327602975314011001241832722500, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "values": attribValues_45161171665899557065152411528096242436, "keyTimes": attribKeytimes_5912796650944756099664218914670640625, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "onrepeat": attribOnrepeat_9407010955317998069225248436550607504, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "animateTransform" # end of SVG.animateTransform.element # end of SVG.animateTransform.attlist # mpath: Motion Path Element ........................ class Mpath(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "mpath" # end of SVG.mpath.element # end of SVG.mpath.attlist # end of svg-animation.mod # Font Module ................................................. # ....................................................................... # SVG 1.1 Font Module ................................................... # file: svg-font.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Font//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-font.mod" # # ....................................................................... # Font # # font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src, # font-face-uri, font-face-format, font-face-name, definition-src # # This module declares markup to provide support for template. # # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Font.class .................................... # SVG.Presentation.attrib ........................... # font: Font Element ................................ class Font(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "vert-adv-y": attribVert_adv_y_75013213180719225150160140290382229225, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "vert-origin-x": attribVert_origin_x_7446508817965073354387852736387482176, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "vert-origin-y": attribVert_origin_y_1727623373058049890309423289789152601, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "horiz-origin-x": attribHoriz_origin_x_29621525596146748552071521876315430724, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "clip-path": attribClip_path_6848405700625226295163574524817559769, "horiz-origin-y": attribHoriz_origin_y_80282076955515527638161078326023131049, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "horiz-adv-x": attribHoriz_adv_x_33286802062655172399937014643438251609, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "horiz_adv_x": attribHoriz_adv_x_33286802062655172399937014643438251609, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "stop_color": attribStop_color_11004707637165596998277037119383684, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "vert_origin_x": attribVert_origin_x_7446508817965073354387852736387482176, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "vert_origin_y": attribVert_origin_y_1727623373058049890309423289789152601, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "horiz_origin_y": attribHoriz_origin_y_80282076955515527638161078326023131049, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "vert_adv_y": attribVert_adv_y_75013213180719225150160140290382229225, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "horiz_origin_x": attribHoriz_origin_x_29621525596146748552071521876315430724, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "font" # end of SVG.font.element # end of SVG.font.attlist # font-face: Font Face Element ...................... class Font_face(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "mathematical": attribMathematical_14275398001026280330477672901641156, "font-size": attribFont_size_27081965776421301083509832315670544, "xml:space": attribXml_space_17330469855831907069104425902654745316, "v-hanging": attribV_hanging_14909105560552330782176372987382076516, "hanging": attribHanging_34931596242724169996219146589420399929, "overline-thickness": attribOverline_thickness_1660273656430437017729678385119002249, "ascent": attribAscent_41623659853852417026046695401896791076, "font-style": attribFont_style_21788128477685954151004099324092450625, "strikethrough-position": attribStrikethrough_position_48117206984728224112044732892606725801, "underline-position": attribUnderline_position_1370413637722434992005488791434292496, "descent": attribDescent_51334377584264966489343671075317636561, "cap-height": attribCap_height_6358663669899010467314576250281749264, "units-per-em": attribUnits_per_em_960525785107183947683947061996381184, "id": attribId_46142269508030220906474016374523948836, "unicode-range": attribUnicode_range_5812204079751571614165117284020778884, "font-stretch": attribFont_stretch_33412554475021909159972644105526830625, "font-variant": attribFont_variant_3709425631941775322192161927997460601, "x-height": attribX_height_71808556417392012964367807880085521636, "font-weight": attribFont_weight_26811158818233115008105450969154434001, "strikethrough-thickness": attribStrikethrough_thickness_656310507416424673689514358791938609, "xml:base": attribXml_base_1637447386481157916838004196247100100, "panose-1": attribPanose_1_74358375666914967086775957466794539536, "alphabetic": attribAlphabetic_59120698516511154438257096328810382969, "stemh": attribStemh_66055743135743852563717295712217632100, "v-alphabetic": attribV_alphabetic_21224018889041547713196124290806972416, "stemv": attribStemv_299825612028381389960136290560469136, "bbox": attribBbox_32136527033715753297952185672432387889, "underline-thickness": attribUnderline_thickness_14150513165103668573928594902934898576, "font-family": attribFont_family_31078482467800891345580624105703722769, "v-mathematical": attribV_mathematical_21141643344625772653463902040762702529, "v-ideographic": attribV_ideographic_81922512024909328809261482418027034921, "ideographic": attribIdeographic_1213628493561735420848496249647747856, "overline-position": attribOverline_position_10179563443042200486178464986247970641, "widths": attribWidths_5469989460745998970129580404284025, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "accent-height": attribAccent_height_84238565607316353502198048818344438521, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "slope": attribSlope_79672558866683031657099595406095351236, "mathematical": attribMathematical_14275398001026280330477672901641156, "cap_height": attribCap_height_6358663669899010467314576250281749264, "hanging": attribHanging_34931596242724169996219146589420399929, "ascent": attribAscent_41623659853852417026046695401896791076, "id": attribId_46142269508030220906474016374523948836, "units_per_em": attribUnits_per_em_960525785107183947683947061996381184, "font_style": attribFont_style_21788128477685954151004099324092450625, "descent": attribDescent_51334377584264966489343671075317636561, "v_hanging": attribV_hanging_14909105560552330782176372987382076516, "v_mathematical": attribV_mathematical_21141643344625772653463902040762702529, "underline_thickness": attribUnderline_thickness_14150513165103668573928594902934898576, "unicode_range": attribUnicode_range_5812204079751571614165117284020778884, "alphabetic": attribAlphabetic_59120698516511154438257096328810382969, "font_family": attribFont_family_31078482467800891345580624105703722769, "font_variant": attribFont_variant_3709425631941775322192161927997460601, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "v_ideographic": attribV_ideographic_81922512024909328809261482418027034921, "stemh": attribStemh_66055743135743852563717295712217632100, "font_stretch": attribFont_stretch_33412554475021909159972644105526830625, "overline_position": attribOverline_position_10179563443042200486178464986247970641, "panose_1": attribPanose_1_74358375666914967086775957466794539536, "font_weight": attribFont_weight_26811158818233115008105450969154434001, "stemv": attribStemv_299825612028381389960136290560469136, "bbox": attribBbox_32136527033715753297952185672432387889, "xml_base": attribXml_base_1637447386481157916838004196247100100, "ideographic": attribIdeographic_1213628493561735420848496249647747856, "font_size": attribFont_size_27081965776421301083509832315670544, "overline_thickness": attribOverline_thickness_1660273656430437017729678385119002249, "underline_position": attribUnderline_position_1370413637722434992005488791434292496, "widths": attribWidths_5469989460745998970129580404284025, "strikethrough_position": attribStrikethrough_position_48117206984728224112044732892606725801, "strikethrough_thickness": attribStrikethrough_thickness_656310507416424673689514358791938609, "accent_height": attribAccent_height_84238565607316353502198048818344438521, "v_alphabetic": attribV_alphabetic_21224018889041547713196124290806972416, "xml_space": attribXml_space_17330469855831907069104425902654745316, "x_height": attribX_height_71808556417392012964367807880085521636, } _name = "font-face" # end of SVG.font-face.element # end of SVG.font-face.attlist # glyph: Glyph Element .............................. class Glyph(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "horiz-adv-x": attribHoriz_adv_x_33286693291463430630078017492334750784, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "unicode": attribUnicode_51323148070930863584364882845988477504, "arabic-form": attribArabic_form_10335265318153016256141548181171552100, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "vert-origin-x": attribVert_origin_x_7446508817965073354387852736387482176, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "vert-origin-y": attribVert_origin_y_1727623373058049890309423289789152601, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "orientation": attribOrientation_77676506574288919343812204705181781009, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "lang": attribLang_3957035975039297683050790048781144644, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "d": attribD_22640415762244214758870656423193258321, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "vert-adv-y": attribVert_adv_y_75013213180719225150160140290382229225, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "glyph-name": attribGlyph_name_70556087215685389485080236292270347684, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "horiz_adv_x": attribHoriz_adv_x_33286693291463430630078017492334750784, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "unicode": attribUnicode_51323148070930863584364882845988477504, "stop_color": attribStop_color_11004707637165596998277037119383684, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "vert_origin_x": attribVert_origin_x_7446508817965073354387852736387482176, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "vert_origin_y": attribVert_origin_y_1727623373058049890309423289789152601, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "vert_adv_y": attribVert_adv_y_75013213180719225150160140290382229225, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "lang": attribLang_3957035975039297683050790048781144644, "font_size": attribFont_size_27081965776421301083509832315670544, "d": attribD_22640415762244214758870656423193258321, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "arabic_form": attribArabic_form_10335265318153016256141548181171552100, "orientation": attribOrientation_77676506574288919343812204705181781009, "glyph_name": attribGlyph_name_70556087215685389485080236292270347684, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "glyph" # end of SVG.glyph.element # end of SVG.glyph.attlist # missing-glyph: Missing Glyph Element .............. class Missing_glyph(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "horiz-adv-x": attribHoriz_adv_x_33286693291463430630078017492334750784, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "vert-origin-x": attribVert_origin_x_7446508817965073354387852736387482176, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "vert-origin-y": attribVert_origin_y_1727623373058049890309423289789152601, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "d": attribD_22640415762244214758870656423193258321, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "vert-adv-y": attribVert_adv_y_75013213180719225150160140290382229225, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "horiz_adv_x": attribHoriz_adv_x_33286693291463430630078017492334750784, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "stop_color": attribStop_color_11004707637165596998277037119383684, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "vert_origin_x": attribVert_origin_x_7446508817965073354387852736387482176, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "vert_origin_y": attribVert_origin_y_1727623373058049890309423289789152601, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "vert_adv_y": attribVert_adv_y_75013213180719225150160140290382229225, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "font_size": attribFont_size_27081965776421301083509832315670544, "d": attribD_22640415762244214758870656423193258321, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "missing-glyph" # end of SVG.missing-glyph.element # end of SVG.missing-glyph.attlist # hkern: Horizontal Kerning Element ................. class Hkern(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "g2": attribG2_19365468475860401780421710593103281041, "g1": attribG1_5727023967946962006895514648308956736, "xml:space": attribXml_space_17330469855831907069104425902654745316, "u1": attribU1_39619575555678312634697876413548410596, "u2": attribU2_29368281947788589299576837024862089, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "k": attribK_8269185087040940339243697043273921, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel(None) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "g2": attribG2_19365468475860401780421710593103281041, "g1": attribG1_5727023967946962006895514648308956736, "xml_base": attribXml_base_1637447386481157916838004196247100100, "u1": attribU1_39619575555678312634697876413548410596, "id": attribId_46142269508030220906474016374523948836, "k": attribK_8269185087040940339243697043273921, "u2": attribU2_29368281947788589299576837024862089, "xml_space": attribXml_space_17330469855831907069104425902654745316, } _name = "hkern" # end of SVG.hkern.element # end of SVG.hkern.attlist # vkern: Vertical Kerning Element ................... class Vkern(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:base": attribXml_base_1637447386481157916838004196247100100, "g2": attribG2_19365468475860401780421710593103281041, "g1": attribG1_5727023967946962006895514648308956736, "xml:space": attribXml_space_17330469855831907069104425902654745316, "u1": attribU1_39619575555678312634697876413548410596, "u2": attribU2_29368281947788589299576837024862089, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "k": attribK_8269185087040940339243697043273921, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel(None) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "g2": attribG2_19365468475860401780421710593103281041, "g1": attribG1_5727023967946962006895514648308956736, "xml_base": attribXml_base_1637447386481157916838004196247100100, "u1": attribU1_39619575555678312634697876413548410596, "id": attribId_46142269508030220906474016374523948836, "k": attribK_8269185087040940339243697043273921, "u2": attribU2_29368281947788589299576837024862089, "xml_space": attribXml_space_17330469855831907069104425902654745316, } _name = "vkern" # end of SVG.vkern.element # end of SVG.vkern.attlist # font-face-src: Font Face Source Element ........... class Font_face_src(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xml:base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "xml_base": attribXml_base_1637447386481157916838004196247100100, } _name = "font-face-src" # end of SVG.font-face-src.element # end of SVG.font-face-src.attlist # font-face-uri: Font Face URI Element .............. class Font_face_uri(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "font-face-uri" # end of SVG.font-face-uri.element # end of SVG.font-face-uri.attlist # font-face-format: Font Face Format Element ........ class Font_face_format(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xml:base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "string": attribString_73088194996370251272342098028690693009, } CONTENTMODEL = pycopia.XML.POM.ContentModel(None) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "string": attribString_73088194996370251272342098028690693009, "xml_base": attribXml_base_1637447386481157916838004196247100100, } _name = "font-face-format" # end of SVG.font-face-format.element # end of SVG.font-face-format.attlist # font-face-name: Font Face Name Element ............ class Font_face_name(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xml:space": attribXml_space_17330469855831907069104425902654745316, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xml:base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "name": attribName_84894340006392032743958872134548066641, } CONTENTMODEL = pycopia.XML.POM.ContentModel(None) KWATTRIBUTES = { "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xml_space": attribXml_space_17330469855831907069104425902654745316, "id": attribId_46142269508030220906474016374523948836, "name": attribName_84894340006392032743958872134548066641, "xml_base": attribXml_base_1637447386481157916838004196247100100, } _name = "font-face-name" # end of SVG.font-face-name.element # end of SVG.font-face-name.attlist # definition-src: Definition Source Element ......... class Definition_src(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "xlink:actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink:arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "xml:base": attribXml_base_1637447386481157916838004196247100100, "xml:space": attribXml_space_17330469855831907069104425902654745316, "xlink:href": attribXlink_href_2755370540755234876192785331197698704, "xlink:role": attribXlink_role_3229529106937020990771521342560963204, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "xlink:type": attribXlink_type_22560428979697808364067714852156776100, "xlink:show": attribXlink_show_3609924616854662305799354277279764736, "xlink:title": attribXlink_title_3295458544877078819116034010639516721, "xmlns:xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "id": attribId_46142269508030220906474016374523948836, } CONTENTMODEL = pycopia.XML.POM.ContentModel(None) KWATTRIBUTES = { "xmlns_xlink": attribXmlns_xlink_42487491102806618023110534987235606276, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "xlink_role": attribXlink_role_3229529106937020990771521342560963204, "xml_base": attribXml_base_1637447386481157916838004196247100100, "id": attribId_46142269508030220906474016374523948836, "xlink_title": attribXlink_title_3295458544877078819116034010639516721, "xlink_href": attribXlink_href_2755370540755234876192785331197698704, "xlink_type": attribXlink_type_22560428979697808364067714852156776100, "xlink_actuate": attribXlink_actuate_742947900615836195516352859503053764, "xlink_arcrole": attribXlink_arcrole_27493937249878960474475479331463032529, "xml_space": attribXml_space_17330469855831907069104425902654745316, "xlink_show": attribXlink_show_3609924616854662305799354277279764736, } _name = "definition-src" # end of SVG.definition-src.element # end of SVG.definition-src.attlist # end of svg-font.mod # Extensibility Module ........................................ # ....................................................................... # SVG 1.1 Extensibility Module .......................................... # file: svg-extensibility.mod # # This is SVG, a language for describing two-dimensional graphics in XML. # Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. # Revision: $Id$ # # This DTD module is identified by the PUBLIC and SYSTEM identifiers: # # PUBLIC "-//W3C//ELEMENTS SVG 1.1 Extensibility//EN" # SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-extensibility.mod" # # ....................................................................... # Extensibility # # foreignObject # # This module declares markup to provide support for extensibility. # # Qualified Names (Default) ......................... # Attribute Collections (Default) ................... # SVG.Extensibility.class ........................... # SVG.Presentation.attrib ........................... # foreignObject: Foreign Object Element ............. class Foreignobject(pycopia.XML.POM.ElementNode): ATTRIBUTES = { "stroke-linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "height": attribHeight_8656938303784040090070221295861351424, "letter-spacing": attribLetter_spacing_5253185889313623965160683321735235600, "baseline-shift": attribBaseline_shift_64233503779117388138851429938275877316, "color-rendering": attribColor_rendering_84749112504343521403113788104037816484, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "color": attribColor_6383642087606508409469185396823588644, "marker-start": attribMarker_start_988048070396048868444768303173785401, "xml:space": attribXml_space_17330469855831907069104425902654745316, "font-size": attribFont_size_27081965776421301083509832315670544, "transform": attribTransform_5682546015111540170885688523292561121, "shape-rendering": attribShape_rendering_52566449463098722218121115853766195225, "word-spacing": attribWord_spacing_43561424080374765097124986544555028484, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "stroke-linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onload": attribOnload_1736219473749214885598459380211457961, "text-rendering": attribText_rendering_21233944364208332717316005830186272016, "stroke-width": attribStroke_width_62701303457294475606316334429684734609, "color-profile": attribColor_profile_59255227693246950224147371299420388900, "id": attribId_46142269508030220906474016374523948836, "fill": attribFill_427957648951849686632852735647933609, "lighting-color": attribLighting_color_15620794847772789058374480175215337284, "filter": attribFilter_320741374428112880781585460803247236, "style": attribStyle_17050104888087001662484243873103056144, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "fill-rule": attribFill_rule_21111451595628935231869402851298971121, "color-interpolation-filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "fill-opacity": attribFill_opacity_1965763316953444740110908885358604121, "flood-opacity": attribFlood_opacity_68167202677622514404623885740804768529, "font-stretch": attribFont_stretch_3835542312537135012653566238291863044, "font-style": attribFont_style_63083969504709003786683888010914706576, "width": attribWidth_64248406416426090145249793245567015396, "kerning": attribKerning_50722104490749097963249774417612741921, "glyph-orientation-horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "alignment-baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "stop-opacity": attribStop_opacity_63515294339364756103962320346510202084, "stroke-miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "font-weight": attribFont_weight_12881395963510290653563102351189028809, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "marker-mid": attribMarker_mid_2019564644941526145314201027139221761, "opacity": attribOpacity_26995226223223505626239894655606671556, "direction": attribDirection_50741361576644121884686865416273322500, "xml:base": attribXml_base_1637447386481157916838004196247100100, "onclick": attribOnclick_9623099846574007271855531133876915264, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "clip-path": attribClip_path_6848405700625226295163574524817559769, "font-variant": attribFont_variant_68974315701196087565896385915847564529, "glyph-orientation-vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "visibility": attribVisibility_64573877343784784797861622909719244721, "unicode-bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "y": attribY_81551351910004068139383608344822372324, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "clip-rule": attribClip_rule_1895509774231723537306902184373439076, "dominant-baseline": attribDominant_baseline_5433263933656082590351520554946800996, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "image-rendering": attribImage_rendering_53317710716347206734451839103650926864, "marker-end": attribMarker_end_13188944635936070535948120603709524804, "overflow": attribOverflow_52917936388072056194158982145010690161, "font-family": attribFont_family_31078482467800891345580624105703722769, "class": attribClass_53825496146914797399013018272928945089, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "flood-color": attribFlood_color_62406031729681475456233843693231490401, "writing-mode": attribWriting_mode_5362176799163998728615688641772562500, "stroke-opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font-size-adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "mask": attribMask_1944143573929026593298495270719232996, "stroke-dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "text-anchor": attribText_anchor_27854728179248540918606107018552701796, "text-decoration": attribText_decoration_48475404390775909559370336472243343881, "stop-color": attribStop_color_11004707637165596998277037119383684, "pointer-events": attribPointer_events_57203517089542979061762370669183605625, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "xml:lang": attribXml_lang_51554108615928407674946656071664740849, "stroke-dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "x": attribX_239059136031520658290104951402890521, "enable-background": attribEnable_background_10797894589918037147751517612226253649, "display": attribDisplay_7822133436715702205398530701320632976, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "color-interpolation": attribColor_interpolation_10174123834979793608581630652423230929, } CONTENTMODEL = pycopia.XML.POM.ContentModel((True,)) KWATTRIBUTES = { "height": attribHeight_8656938303784040090070221295861351424, "lighting_color": attribLighting_color_15620794847772789058374480175215337284, "marker_mid": attribMarker_mid_2019564644941526145314201027139221761, "unicode_bidi": attribUnicode_bidi_71388391846293636790065608605722390225, "fill_opacity": attribFill_opacity_1965763316953444740110908885358604121, "clip": attribClip_83048463177368902516715179467471424, "requiredExtensions": attribRequiredextensions_3166766250085009955178408409037505625, "text_anchor": attribText_anchor_27854728179248540918606107018552701796, "mask": attribMask_1944143573929026593298495270719232996, "stroke_dashoffset": attribStroke_dashoffset_24397425636912196504877047676272225, "letter_spacing": attribLetter_spacing_5253185889313623965160683321735235600, "direction": attribDirection_50741361576644121884686865416273322500, "stroke_dasharray": attribStroke_dasharray_31073420573497511504459886842172708100, "stroke_width": attribStroke_width_62701303457294475606316334429684734609, "externalResourcesRequired": attribExternalresourcesrequired_4027549857308015558836428413314244100, "cursor": attribCursor_36438614741117041205662488082241270404, "stroke": attribStroke_65613381267441787847383807243146675856, "onload": attribOnload_1736219473749214885598459380211457961, "color_interpolation_filters": attribColor_interpolation_filters_1031663597973127513991537856310800889, "stop_color": attribStop_color_11004707637165596998277037119383684, "writing_mode": attribWriting_mode_5362176799163998728615688641772562500, "dominant_baseline": attribDominant_baseline_5433263933656082590351520554946800996, "id": attribId_46142269508030220906474016374523948836, "onmousedown": attribOnmousedown_81776721518952584233496394150508951881, "fill": attribFill_427957648951849686632852735647933609, "stop_opacity": attribStop_opacity_63515294339364756103962320346510202084, "style": attribStyle_17050104888087001662484243873103056144, "font_style": attribFont_style_63083969504709003786683888010914706576, "onmouseout": attribOnmouseout_67798077228410893599001377677086379584, "display": attribDisplay_7822133436715702205398530701320632976, "stroke_opacity": attribStroke_opacity_63194055222286834713760410205228547136, "font_size_adjust": attribFont_size_adjust_30180133234799421307420445945060047225, "text_decoration": attribText_decoration_48475404390775909559370336472243343881, "transform": attribTransform_5682546015111540170885688523292561121, "color": attribColor_6383642087606508409469185396823588644, "stroke_miterlimit": attribStroke_miterlimit_44219326472013156591096670907628364804, "kerning": attribKerning_50722104490749097963249774417612741921, "onmousemove": attribOnmousemove_36239900479791126782266447864594563076, "shape_rendering": attribShape_rendering_52566449463098722218121115853766195225, "onactivate": attribOnactivate_1757297942287072272251096257072991296, "onfocusout": attribOnfocusout_53003786302024664917374321967614548025, "color_interpolation": attribColor_interpolation_10174123834979793608581630652423230929, "baseline_shift": attribBaseline_shift_64233503779117388138851429938275877316, "enable_background": attribEnable_background_10797894589918037147751517612226253649, "word_spacing": attribWord_spacing_43561424080374765097124986544555028484, "opacity": attribOpacity_26995226223223505626239894655606671556, "alignment_baseline": attribAlignment_baseline_25032983955350296662681296772129840036, "xml_lang": attribXml_lang_51554108615928407674946656071664740849, "clip_path": attribClip_path_6848405700625226295163574524817559769, "clip_rule": attribClip_rule_1895509774231723537306902184373439076, "onclick": attribOnclick_9623099846574007271855531133876915264, "font_variant": attribFont_variant_68974315701196087565896385915847564529, "fill_rule": attribFill_rule_21111451595628935231869402851298971121, "marker_start": attribMarker_start_988048070396048868444768303173785401, "font_stretch": attribFont_stretch_3835542312537135012653566238291863044, "visibility": attribVisibility_64573877343784784797861622909719244721, "class_": attribClass_53825496146914797399013018272928945089, "color_profile": attribColor_profile_59255227693246950224147371299420388900, "systemLanguage": attribSystemlanguage_50670925657355739810136037650249585761, "glyph_orientation_horizontal": attribGlyph_orientation_horizontal_34760569960300448639937531748683716100, "stroke_linejoin": attribStroke_linejoin_68770697799660128014020372100529139600, "flood_color": attribFlood_color_62406031729681475456233843693231490401, "overflow": attribOverflow_52917936388072056194158982145010690161, "pointer_events": attribPointer_events_57203517089542979061762370669183605625, "image_rendering": attribImage_rendering_53317710716347206734451839103650926864, "xml_base": attribXml_base_1637447386481157916838004196247100100, "marker_end": attribMarker_end_13188944635936070535948120603709524804, "onfocusin": attribOnfocusin_46333989955590878322162980913526513921, "font_size": attribFont_size_27081965776421301083509832315670544, "font_weight": attribFont_weight_12881395963510290653563102351189028809, "flood_opacity": attribFlood_opacity_68167202677622514404623885740804768529, "glyph_orientation_vertical": attribGlyph_orientation_vertical_35687216979934895567402669205779868004, "stroke_linecap": attribStroke_linecap_28080733754758510333198346824029230656, "onmouseover": attribOnmouseover_47178636339604918569276565427294304049, "font_family": attribFont_family_31078482467800891345580624105703722769, "filter": attribFilter_320741374428112880781585460803247236, "requiredFeatures": attribRequiredfeatures_35463244366656400465531942340755703184, "width": attribWidth_64248406416426090145249793245567015396, "onmouseup": attribOnmouseup_9659590693716211851815581080578241600, "y": attribY_81551351910004068139383608344822372324, "x": attribX_239059136031520658290104951402890521, "xml_space": attribXml_space_17330469855831907069104425902654745316, "text_rendering": attribText_rendering_21233944364208332717316005830186272016, "color_rendering": attribColor_rendering_84749112504343521403113788104037816484, } _name = "foreignObject" # end of SVG.foreignObject.element # end of SVG.foreignObject.attlist # end of svg-extensibility.mod # end of SVG 1.1 DTD .................................................... # ....................................................................... GENERAL_ENTITIES = {} # Cache for dynamic classes for this dtd. _CLASSCACHE = {}
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Read /proc/net/dev data. """ FILE = "/proc/net/dev" class ReceiveData(object): def __init__(self, bytes, packets, errs, drop, fifo, frame, compressed, multicast): self.bytes = bytes self.packets = packets self.errs = errs self.drop = drop self.fifo = fifo self.frame = frame self.compressed = compressed self.multicast = multicast def __str__(self): return "%10d %10d %6d %6d %6d %6d %10d %10d" % ( self.bytes, self.packets, self.errs, self.drop, self.fifo, self.frame, self.compressed, self.multicast, ) class TransmitData(object): def __init__(self, bytes, packets, errs, drop, fifo, colls, carrier, compressed): self.bytes = bytes self.packets = packets self.errs = errs self.drop = drop self.fifo = fifo self.colls = colls self.carrier = carrier self.compressed = compressed def __str__(self): return "%10d %10d %6d %6d %6d %6d %8d %10d" % ( self.bytes, self.packets, self.errs, self.drop, self.fifo, self.colls, self.carrier, self.compressed, ) class Interface(object): def __init__(self, name): self.name = name self.rx = None self.tx = None def __str__(self): return "%5s: %s %s" % (self.name, self.rx, self.tx) class DevTable(object): def __init__(self): self._devs = {} def __str__(self): s = [ """ Inter-| Receive | Transmit face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed """ ] for dev in list(self._devs.values()): s.append(str(dev)) return "\n".join(s) def _get_names(self): names = list(self._devs.keys()) names.sort() return names names = property(_get_names) def __getitem__(self, name): return self._devs[name] def update(self): lineno = 0 raw = open(FILE).read() for line in raw.splitlines(): if lineno > 1: colon = line.find(":") name = line[:colon].strip() parts = list(map(int, line[colon + 1 :].split())) iface = Interface(name) iface.rx = ReceiveData(*tuple(parts[0:8])) iface.tx = TransmitData(*tuple(parts[8:16])) self._devs[name] = iface lineno += 1 if __name__ == "__main__": dt = DevTable() dt.update() print(dt) print(dt["eth0"].rx.bytes) print(dt["eth0"].tx.bytes)
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ GRUB library. Used to read and write GRUB config files. """ from pycopia import dictlib import re BUILTIN_CMDLINE = 0x1 # Run in the command-line. BUILTIN_MENU = 0x2 # Run in the menu. BUILTIN_TITLE = 0x4 # Only for the command title. BUILTIN_SCRIPT = 0x8 # Run in the script. BUILTIN_NO_ECHO = 0x10 # Don't print command on booting. BUILTIN_HELP_LIST = 0x20 # Show help in listing. class GrubCommand(object): def __init__(self, name, flags): self.name = name self.flags = flags COMMANDS = dictlib.AttrDict() COMMANDS.blocklist = GrubCommand("blocklist", BUILTIN_CMDLINE | BUILTIN_HELP_LIST) COMMANDS.boot = GrubCommand( "boot", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.bootp = GrubCommand( "bootp", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.cat = GrubCommand( "cat", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.chainloader = GrubCommand( "chainloader", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.cmp = GrubCommand( "cmp", BUILTIN_CMDLINE, ) COMMANDS.color = GrubCommand( "color", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.configfile = GrubCommand( "configfile", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.debug = GrubCommand( "debug", BUILTIN_CMDLINE, ) COMMANDS.default = GrubCommand( "default", BUILTIN_MENU, ) COMMANDS.device = GrubCommand( "device", BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.dhcp = GrubCommand( "dhcp", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.displayapm = GrubCommand( "displayapm", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.displaymem = GrubCommand( "displaymem", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.dump = GrubCommand( "dump", BUILTIN_CMDLINE, ) COMMANDS.embed = GrubCommand( "embed", BUILTIN_CMDLINE, ) COMMANDS.fallback = GrubCommand( "fallback", BUILTIN_MENU, ) COMMANDS.find = GrubCommand( "find", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.fstest = GrubCommand( "fstest", BUILTIN_CMDLINE, ) COMMANDS.geometry = GrubCommand( "geometry", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.halt = GrubCommand( "halt", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.help = GrubCommand( "help", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.hiddenmenu = GrubCommand( "hiddenmenu", BUILTIN_MENU, ) COMMANDS.hide = GrubCommand( "hide", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.ifconfig = GrubCommand( "ifconfig", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.impsprobe = GrubCommand( "impsprobe", BUILTIN_CMDLINE, ) COMMANDS.initrd = GrubCommand( "initrd", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.install = GrubCommand( "install", BUILTIN_CMDLINE, ) COMMANDS.ioprobe = GrubCommand( "ioprobe", BUILTIN_CMDLINE, ) COMMANDS.kernel = GrubCommand( "kernel", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.lock = GrubCommand( "lock", BUILTIN_CMDLINE, ) COMMANDS.makeactive = GrubCommand( "makeactive", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.map = GrubCommand( "map", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.md5crypt = GrubCommand( "md5crypt", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.module = GrubCommand( "module", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.modulenounzip = GrubCommand( "modulenounzip", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.pager = GrubCommand( "pager", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.partnew = GrubCommand( "partnew", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.parttype = GrubCommand( "parttype", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.password = GrubCommand( "password", BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_NO_ECHO, ) COMMANDS.pause = GrubCommand( "pause", BUILTIN_CMDLINE | BUILTIN_NO_ECHO, ) COMMANDS.quit = GrubCommand( "quit", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.rarp = GrubCommand( "rarp", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.read = GrubCommand( "read", BUILTIN_CMDLINE, ) COMMANDS.reboot = GrubCommand( "reboot", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.root = GrubCommand( "root", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.rootnoverify = GrubCommand( "rootnoverify", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.savedefault = GrubCommand( "savedefault", BUILTIN_CMDLINE, ) COMMANDS.serial = GrubCommand( "serial", BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.setkey = GrubCommand( "setkey", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.setup = GrubCommand( "setup", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.terminal = GrubCommand( "terminal", BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.terminfo = GrubCommand( "terminfo", BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.testload = GrubCommand( "testload", BUILTIN_CMDLINE, ) COMMANDS.testvbe = GrubCommand( "testvbe", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.tftpserver = GrubCommand( "tftpserver", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.timeout = GrubCommand( "timeout", BUILTIN_MENU, ) COMMANDS.title = GrubCommand( "title", BUILTIN_TITLE, ) COMMANDS.unhide = GrubCommand( "unhide", BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ) COMMANDS.uppermem = GrubCommand( "uppermem", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) COMMANDS.vbeprobe = GrubCommand( "vbeprobe", BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ) class GrubComment(object): def __init__(self, text): self.text = str(text) def __str__(self): return "#" + self.text class GrubEntry(object): def __init__(self, cmd, params): self.cmd = cmd self.params = params def __str__(self): return "%s %s" % (self.cmd.name, self.params) class GrubTitleEntry(object): def __init__(self, title): self.title = title self.lines = [] def __str__(self): s = ["title %s" % (self.title,)] s.extend([" %s" % (l,) for l in self.lines]) return "\n".join(s) class GrubConfig(object): def __init__(self, text=None): self.lines = [] if text: self.parse(text) def __str__(self): return "\n".join(map(str, self.lines)) def parse(self, text): linesplitter = re.compile(r"[ \t=]") self.lines = [] state = 0 currenttitle = None for line in text.splitlines(): line = line.strip() if line.startswith("#"): self.lines.append(GrubComment(line[1:])) continue if not line: continue if state == 0: cmd, rest = linesplitter.split(line, 1) CMD = COMMANDS[cmd] if CMD.flags & BUILTIN_TITLE: state = 1 currenttitle = GrubTitleEntry(rest) self.lines.append(currenttitle) continue elif CMD.flags & BUILTIN_MENU: self.lines.append(GrubEntry(CMD, rest)) if state == 1: cmd, rest = linesplitter.split(line, 1) CMD = COMMANDS[cmd] if CMD.flags & BUILTIN_TITLE: currenttitle = GrubTitleEntry(rest) self.lines.append(currenttitle) elif CMD.flags & (BUILTIN_CMDLINE | BUILTIN_MENU): currenttitle.lines.append(GrubEntry(CMD, rest)) def add_comment(self, text): self.lines.append(GrubComment(text)) def _test(argv): text = open("/home/kdart/tmp/grub.conf").read() r = GrubConfig(text) print(r) return r if __name__ == "__main__": import sys r = _test(sys.argv)
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Implements a netstring object, as described in: http://cr.yp.to/proto/netstrings.txt """ def encode(s): return "%d:%s," % (len(s), s) def decode(s): c = s.find(":") l = int(s[:c]) ns = s[c + 1 : c + l + 1] if len(ns) != l: raise ValueError("invalid netstring, bad length") if s[c + l + 1] != ",": raise ValueError("invalid encoding, bad terminator") return ns if __name__ == "__main__": s = "hello, this is a test!\nagain!" es = encode(s) print(es) ds = decode(es) print(ds) if ds == s: print("passed") else: print("failed")
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ Purposly buggy module to test the new debugger. Run in debug mode. """ import unittest from pycopia import debugger from pycopia import autodebug def indexerror(idx=0): L = [] s = "string" i = 1 l = 2 f = 3.14159265 return L[idx] # will raise index error # functions to get a reasonably sized stack def f1(*args): x = 1 return indexerror(*args) def f2(*args): x = 2 return f1(*args) def f3(*args): x = 4 return f2(*args) def f4(*args): x = 4 return f3(*args) def f5(*args): x = 5 return f4(*args) class Buggy(object): def __init__(self): self.D = {} def keyerror(self, key): l = 1 return self.D[key] class DebuggerTests(unittest.TestCase): def setUp(self): pass def test_debugger(self): """Test documentation.""" pass # f5() # will enter debugger since auto debug enabled. def test_debuginclass(self): # b = Buggy() # b.keyerror("bogus") pass f5() # will enter debugger since auto debug enabled. if __name__ == "__main__": unittest.main()
# python # This file is generated by a program (mib2py). Any edits will be lost. from pycopia.aid import Enum import pycopia.SMI.Basetypes Range = pycopia.SMI.Basetypes.Range Ranges = pycopia.SMI.Basetypes.Ranges from pycopia.SMI.Objects import ( ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, NodeObject, ModuleObject, GroupObject, ) # imports from SNMPv2_SMI import MODULE_IDENTITY, OBJECT_IDENTITY, snmpModules from SNMP_FRAMEWORK_MIB import snmpPrivProtocols class SNMP_USM_AES_MIB(ModuleObject): path = "/usr/share/mibs/ietf/SNMP-USM-AES-MIB" name = "SNMP-USM-AES-MIB" language = 2 description = "Definitions of Object Identities needed for\nthe use of AES by SNMP's User-based Security\nModel.\n\nCopyright (C) The Internet Society (2004).\n\nThis version of this MIB module is part of RFC 3826;\nsee the RFC itself for full legal notices.\nSupplementary information may be available on\nhttp://www.ietf.org/copyrights/ianamib.html." # nodes class usmAesCfb128Protocol(NodeObject): status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 10, 1, 2, 4]) name = "usmAesCfb128Protocol" class snmpUsmAesMIB(NodeObject): status = 1 OID = pycopia.SMI.Basetypes.ObjectIdentifier([1, 3, 6, 1, 6, 3, 20]) name = "snmpUsmAesMIB" # macros # types # scalars # columns # rows # notifications (traps) # groups # capabilities # special additions # Add to master OIDMAP. from pycopia import SMI SMI.update_oidmap(__name__)
#!/usr/bin/python # -*- coding: ascii -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # License: LGPL # Keith Dart <keith@dartworks.biz> """ Clients used to test various SMTP related exploits. """ from pycopia import protocols from pycopia import clientserver class SMTPExploitTest(protocols.Protocol): EOL = "\r\n" def initialize(self, fsm): fsm.set_default_transition(self._bye, fsm.RESET) fsm.add_regex("220 (.*)", fsm.RESET, self._greet, 1) fsm.add_regex("250 (.*)", 1, self._mail, 2) fsm.add_regex("503 (.*)", 2, self._quit, 6) fsm.add_regex("553 (.*)", 2, self._quit, 6) fsm.add_regex("250 (.*)", 2, self._rcpt, 3) fsm.add_regex("250 (.*)", 3, self._data, 4) fsm.add_regex("503 (.*)", 3, self._quit, 6) fsm.add_regex("354 (.*)", 4, self._send, 5) fsm.add_regex("250 (.*)", 5, self._quit, 6) fsm.add_regex("221 (.*)", 6, self._goodbye, fsm.RESET) def writeeol(self, data): self.iostream.write(data + "\r\n") def _bye(self, mo): self.iostream.close() raise protocols.ProtocolExit(1) def _goodbye(self, mo): self.iostream.close() raise protocols.ProtocolExit(0) def _greet(self, mo): self.writeeol("HELO somewhere.com") def _mail(self, mo): self.writeeol("MAIL FROM: <yourstruly@somewhere.com>") def _rcpt(self, mo): self.writeeol("RCPT TO: <postmaster>") def _quit(self, mo): self.writeeol("QUIT") def _data(self, mo): self.writeeol("DATA") def _send(self, mo): self.writeeol( """From: "Yours Truly" <yourstruly@somewhere.com> To: <postmaster@somewhere.com> Message body. """.replace( "\n", "\r\n" ) ) self.writeeol(".") class SMTPClient(clientserver.TCPClient): port = 25 altport = 9025 # (msg:"SMTP RCPT TO decode attempt"; flow:to_server,established; content:"rcpt # to|3A|"; nocase; content:"decode"; distance:0; nocase; pcre:"/^rcpt # to\:\s*decode/smi"; reference:arachnids,121; reference:bugtraq,2308; # reference:cve,1999-0203; classtype:attempted-admin; sid:664; rev:15;) class Snort664(SMTPExploitTest): def _rcpt(self, mo): self.writeeol("RCPT TO: decode") # (msg:"SMTP sendmail 5.6.5 exploit"; flow:to_server,established; content:"MAIL # FROM|3A| |7C|/usr/ucb/tail"; nocase; reference:arachnids,122; # reference:bugtraq,2308; reference:cve,1999-0203; classtype:attempted-user; # sid:665; rev:8;) class Snort665(SMTPExploitTest): def _mail(self, mo): self.writeeol("MAIL FROM: |/bin/sh") if __name__ == "__main__": from pycopia import autodebug proto = Snort664() client = clientserver.get_client( SMTPClient, "localhost", proto, port=SMTPClient.altport ) client.run() client.close()
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """ CLI wrapper for SSL and CA activities. TODO """ from pycopia.ssl import certs from pycopia.ssl import operations from pycopia import CLI class SSLCommands(CLI.BaseCommands): def key(self, argv): """key {generate | load | save} Create or load and save a private key. """ subcmd = argv[1] if subcmd.startswith("gen"): pass class ClientCommands(SSLCommands): pass class CACommands(SSLCommands): pass def sslcli(argv): b"""sslcli [-?D] Provides an interactive CLI for managing SSL certificates and CA operations. Options: -? = This help text. -D = Debug on. """ import os import getopt try: optlist, args = getopt.getopt(argv[1:], b"?hD") except getopt.GetoptError: print (sslcli.__doc__) return for opt, val in optlist: if opt in (b"-?", b"-h"): print (sslcli.__doc__) return elif opt == b"-D": from pycopia import autodebug io = CLI.ConsoleIO() ui = CLI.UserInterface(io) ui._env[b"PS1"] = b"SSL> " cmd = SSLCommands(ui) parser = CLI.CommandParser(cmd, historyfile=os.path.expandvars(b"$HOME/.hist_sslcli")) parser.interact() if __name__ == "__main__": import sys sslcli(sys.argv)
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. __doc__ = """ Storage editor. Edit data in the Pycopia database. Start with a list of editable tables. Select and move to locations to create, update, and delete entries. Keys: Generally, use arrow keys to navigate and press Enter to select items. ESC : Quit the program Tab : Move focus to different button or area. Arrow keys also work. F1 : This Help F2 : Reset the application to initial condition. Shortcuts for creating test cases: F5 : Create a new test case in the database. F6 : Create a new test suite in the database. Shortcuts for creating equipment and environments. F9 : Create a new equipment entry. F10 : Create a new environment entry. """ import sys import urwid from pycopia import getopt from pycopia.db import models from pycopia.db.tui import widgets from pycopia.db.tui import eventloop class DBEditor(object): def __init__(self, session, debug=False): self.loop = None self.session = session self.footer = urwid.AttrMap( urwid.Text( [ ("key", "ESC"), " Quit ", ("key", "Tab"), " Move Selection ", ("key", "F1"), " Help ", ("key", "F2"), " Reset ", ("key", "F5"), " Add Test Case ", ("key", "F6"), " Add Test Suite ", ("key", "F9"), " Add Equipment ", ("key", "F10"), " Add Environment ", ] ), "foot", ) self.reset() self.top = urwid.Frame(urwid.AttrMap(self.form, "body"), footer=self.footer) if debug: from pycopia import logwindow widgets.DEBUG = logwindow.DebugLogWindow() def run(self): self.loop = urwid.MainLoop( self.top, widgets.PALETTE, unhandled_input=self.unhandled_input, pop_ups=True, event_loop=eventloop.PycopiaEventLoop(), ) self.loop.run() self.loop = None def unhandled_input(self, k): if k == "esc": self._popform(None, None) elif k == "f1": self.show_help() elif k == "f2": self.reset() self.top.body = self.form elif k == "f5": self.get_create_form(models.TestCase) elif k == "f16": self.get_create_form(models.TestSuite) elif k == "f9": self.get_create_form(models.Equipment) elif k == "f10": self.get_create_form(models.Environment) else: widgets.DEBUG("unhandled key:", k) def reset(self): self._formtrail = [] self.form = widgets.TopForm(self.session) urwid.connect_signal(self.form, "pushform", self._pushform) def _restore_footer(self, loop, user_data): self.top.set_footer(self.footer) def _pushform(self, form, newform): self._formtrail.append(form) urwid.connect_signal(newform, "pushform", self._pushform) urwid.connect_signal(newform, "popform", self._popform) urwid.connect_signal(newform, "message", self._message) self.form = newform self.top.body = self.form def _popform(self, form, pkval): if form is not None: urwid.disconnect_signal(form, "pushform", self._pushform) urwid.disconnect_signal(form, "popform", self._popform) urwid.disconnect_signal(form, "message", self._message) if self._formtrail: self.form = self._formtrail.pop() self.form.invalidate() self.top.body = self.form else: raise urwid.ExitMainLoop() def _message(self, form, msg): self.message(msg) def message(self, msg): self.top.set_footer(urwid.AttrWrap(urwid.Text(msg), "important")) self.loop.set_alarm_in(15.0, self._restore_footer) def get_list_form(self, modelclass): form = widgets.get_list_form(self.session, modelclass) urwid.emit_signal(self.form, "pushform", self.form, form) def get_create_form(self, modelclass): form = widgets.get_create_form(self.session, modelclass) urwid.emit_signal(self.form, "pushform", self.form, form) def get_edit_form(self, row): form = widgets.get_edit_form(self.session, row) urwid.emit_signal(self.form, "pushform", self.form, form) def show_help(self): hd = HelpDialog() urwid.connect_signal(hd, "close", lambda hd: self._restoreform()) self.top.body = hd def _restoreform(self): self.top.body = self.form class HelpDialog(urwid.WidgetWrap): signals = ["close"] def __init__(self): close_button = urwid.Button(("buttn", "OK")) urwid.connect_signal(close_button, "click", lambda button: self._emit("close")) lb = urwid.LineBox( urwid.Filler(urwid.Pile([urwid.Text(__doc__), close_button]), valign="top") ) self.__super.__init__(lb) def main(argv): """dbedit [-d]""" debug = 0 try: optlist, longopts, args = getopt.getopt(argv[1:], "?hdD") except getopt.GetoptError: print(main.__doc__) return for opt, val in optlist: if opt in ("-?", "-h"): print(main.__doc__) return elif opt == "-d": debug += 1 elif opt == "-D": from pycopia import autodebug sess = models.get_session() try: app = DBEditor(sess, debug) try: app.run() except: if debug: ex, val, tb = sys.exc_info() from pycopia import debugger if debug > 1: from pycopia import IOurxvt io = IOurxvt.UrxvtIO() else: io = None debugger.post_mortem(tb, ex, val, io) if debug > 1: io.close() else: raise finally: sess.close() if __name__ == "__main__": import sys from pycopia import debugger try: main(sys.argv) except: ex, val, tb = sys.exc_info() # from pycopia import IOurxvt # io = IOurxvt.UrxvtIO() debugger.post_mortem(tb, ex, val) # io.close()
from sumpy.annotators._preprocessor import ( SentenceTokenizerMixin, WordTokenizerMixin, RawBOWMixin, BinaryBOWMixin, TfIdfMixin, TfIdfCosineSimilarityMixin, ) from sumpy.annotators._feature_extractors import ( LedeMixin, TextRankMixin, LexRankMixin, CentroidMixin, MMRMixin, ) from sumpy.annotators._submodular import MonotoneSubmodularMixin, SubmodularMMRMixin __all__ = [ "SentenceTokenizerMixin", "WordTokenizerMixin", "RawBOWMixin", "BinaryBOWMixin", "TfIdfMixin", "TfIdfCosineSimilarityMixin", "LedeMixin", "TextRankMixin", "LexRankMixin", "CentroidMixin", "MMRMixin", "MonotoneSubmodularMixin", ]
import base64 import copy import json import sys from keen import persistence_strategies, exceptions, saved_queries from keen.api import KeenApi from keen.persistence_strategies import BasePersistenceStrategy __author__ = "dkador" class Event(object): """ An event in Keen. """ def __init__(self, project_id, event_collection, event_body, timestamp=None): """Initializes a new Event. :param project_id: the Keen project ID to insert the event to :param event_collection: the Keen collection name to insert the event to :param event_body: a dict that contains the body of the event to insert :param timestamp: optional, specify a datetime to override the timestamp associated with the event in Keen """ super(Event, self).__init__() self.project_id = project_id self.event_collection = event_collection self.event_body = event_body self.timestamp = timestamp def to_json(self): """Serializes the event to JSON. :returns: a string """ event_as_dict = copy.deepcopy(self.event_body) if self.timestamp: if "keen" in event_as_dict: event_as_dict["keen"]["timestamp"] = self.timestamp.isoformat() else: event_as_dict["keen"] = {"timestamp": self.timestamp.isoformat()} return json.dumps(event_as_dict) class KeenClient(object): """The Keen Client is the main object to use to interface with Keen. It requires a project ID and one or both of write_key and read_key. Optionally, you can also specify a persistence strategy to elect how events are handled when they're added. The default strategy is to send the event directly to Keen, in-line. This may not always be the best idea, though, so we support other strategies (such as persisting to a local Redis queue for later processing). GET requests will timeout after 305 seconds by default. POST requests will timeout after 305 seconds by default. """ def __init__( self, project_id, write_key=None, read_key=None, persistence_strategy=None, api_class=KeenApi, get_timeout=305, post_timeout=305, master_key=None, base_url=None, ): """Initializes a KeenClient object. :param project_id: the Keen IO project ID :param write_key: a Keen IO Scoped Key for Writes :param read_key: a Keen IO Scoped Key for Reads :param persistence_strategy: optional, the strategy to use to persist the event :param get_timeout: optional, the timeout on GET requests :param post_timeout: optional, the timeout on POST requests :param master_key: a Keen IO Master API Key """ super(KeenClient, self).__init__() # do some validation self.check_project_id(project_id) # Set up an api client to be used for querying and optionally passed # into a default persistence strategy. self.api = api_class( project_id, write_key=write_key, read_key=read_key, get_timeout=get_timeout, post_timeout=post_timeout, master_key=master_key, base_url=base_url, ) if persistence_strategy: # validate the given persistence strategy if not isinstance(persistence_strategy, BasePersistenceStrategy): raise exceptions.InvalidPersistenceStrategyError() if not persistence_strategy: # setup a default persistence strategy persistence_strategy = persistence_strategies.DirectPersistenceStrategy( self.api ) self.project_id = project_id self.persistence_strategy = persistence_strategy self.get_timeout = get_timeout self.post_timeout = post_timeout self.saved_queries = saved_queries.SavedQueriesInterface( project_id, master_key, read_key ) if sys.version_info[0] < 3: @staticmethod def check_project_id(project_id): """Python 2.x-compatible string typecheck.""" if not project_id or not isinstance(project_id, str): raise exceptions.InvalidProjectIdError(project_id) else: @staticmethod def check_project_id(project_id): """Python 3.x-compatible string typecheck.""" if not project_id or not isinstance(project_id, str): raise exceptions.InvalidProjectIdError(project_id) def add_event(self, event_collection, event_body, timestamp=None): """Adds an event. Depending on the persistence strategy of the client, this will either result in the event being uploaded to Keen immediately or will result in saving the event to some local cache. :param event_collection: the name of the collection to insert the event to :param event_body: dict, the body of the event to insert the event to :param timestamp: datetime, optional, the timestamp of the event """ event = Event( self.project_id, event_collection, event_body, timestamp=timestamp ) self.persistence_strategy.persist(event) def add_events(self, events): """Adds a batch of events. Depending on the persistence strategy of the client, this will either result in the event being uploaded to Keen immediately or will result in saving the event to some local cache. :param events: dictionary of events """ self.persistence_strategy.batch_persist(events) def generate_image_beacon(self, event_collection, event_body, timestamp=None): """Generates an image beacon URL. :param event_collection: the name of the collection to insert the event to :param event_body: dict, the body of the event to insert the event to :param timestamp: datetime, optional, the timestamp of the event """ event = Event( self.project_id, event_collection, event_body, timestamp=timestamp ) event_json = event.to_json() return "{0}/{1}/projects/{2}/events/{3}?api_key={4}&data={5}".format( self.api.base_url, self.api.api_version, self.project_id, self._url_escape(event_collection), self.api.write_key.decode(sys.getdefaultencoding()), self._base64_encode(event_json), ) def delete_events( self, event_collection, timeframe=None, timezone=None, filters=None ): """Deletes events. :param event_collection: string, the event collection from which event are being deleted :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] """ params = self.get_params( timeframe=timeframe, timezone=timezone, filters=filters ) return self.api.delete_events(event_collection, params) def get_collection(self, event_collection): """Returns event collection schema :param event_collection: string, the event collection from which schema is to be returned, if left blank will return schema for all collections """ return self.api.get_collection(event_collection) def get_all_collections(self): """Returns event collection schema for all events""" return self.api.get_all_collections() def _base64_encode(self, string_to_encode): """Base64 encodes a string, with either Python 2 or 3. :param string_to_encode: the string to encode """ try: # python 2 return base64.b64encode(string_to_encode) except TypeError: # python 3 encoding = sys.getdefaultencoding() base64_bytes = base64.b64encode(bytes(string_to_encode, encoding)) return base64_bytes.decode(encoding) def _url_escape(self, url): try: import urllib.request, urllib.parse, urllib.error return urllib.parse.quote(url) except AttributeError: import urllib.parse return urllib.parse.quote(url) def count( self, event_collection, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, max_age=None, ): """Performs a count query Counts the number of events that meet the given criteria. :param event_collection: string, the name of the collection to query :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, timezone=timezone, interval=interval, filters=filters, group_by=group_by, max_age=max_age, ) return self.api.query("count", params) def sum( self, event_collection, target_property, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, max_age=None, ): """Performs a sum query Adds the values of a target property for events that meet the given criteria. :param event_collection: string, the name of the collection to query :param target_property: string, the name of the event property you would like use :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, timezone=timezone, interval=interval, filters=filters, group_by=group_by, target_property=target_property, max_age=max_age, ) return self.api.query("sum", params) def minimum( self, event_collection, target_property, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, max_age=None, ): """Performs a minimum query Finds the minimum value of a target property for events that meet the given criteria. :param event_collection: string, the name of the collection to query :param target_property: string, the name of the event property you would like use :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, timezone=timezone, interval=interval, filters=filters, group_by=group_by, target_property=target_property, max_age=max_age, ) return self.api.query("minimum", params) def maximum( self, event_collection, target_property, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, max_age=None, ): """Performs a maximum query Finds the maximum value of a target property for events that meet the given criteria. :param event_collection: string, the name of the collection to query :param target_property: string, the name of the event property you would like use :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, timezone=timezone, interval=interval, filters=filters, group_by=group_by, target_property=target_property, max_age=max_age, ) return self.api.query("maximum", params) def average( self, event_collection, target_property, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, max_age=None, ): """Performs a average query Finds the average of a target property for events that meet the given criteria. :param event_collection: string, the name of the collection to query :param target_property: string, the name of the event property you would like use :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, timezone=timezone, interval=interval, filters=filters, group_by=group_by, target_property=target_property, max_age=max_age, ) return self.api.query("average", params) def median( self, event_collection, target_property, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, max_age=None, ): """Performs a median query Finds the median of a target property for events that meet the given criteria. :param event_collection: string, the name of the collection to query :param target_property: string, the name of the event property you would like use :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, timezone=timezone, interval=interval, filters=filters, group_by=group_by, target_property=target_property, max_age=max_age, ) return self.api.query("median", params) def percentile( self, event_collection, target_property, percentile, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, max_age=None, ): """Performs a percentile query Finds the percentile of a target property for events that meet the given criteria. :param event_collection: string, the name of the collection to query :param target_property: string, the name of the event property you would like use :param percentile: float, the specific percentile you wish to calculate, supporting 0-100 with two decimal places of precision for example, 99.99 :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, percentile=percentile, timezone=timezone, interval=interval, filters=filters, group_by=group_by, target_property=target_property, max_age=max_age, ) return self.api.query("percentile", params) def count_unique( self, event_collection, target_property, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, max_age=None, ): """Performs a count unique query Counts the unique values of a target property for events that meet the given criteria. :param event_collection: string, the name of the collection to query :param target_property: string, the name of the event property you would like use :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, timezone=timezone, interval=interval, filters=filters, group_by=group_by, target_property=target_property, max_age=max_age, ) return self.api.query("count_unique", params) def select_unique( self, event_collection, target_property, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, max_age=None, ): """Performs a select unique query Returns an array of the unique values of a target property for events that meet the given criteria. :param event_collection: string, the name of the collection to query :param target_property: string, the name of the event property you would like use :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param interval: string, the time interval used for measuring data over time example: "daily" :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, timezone=timezone, interval=interval, filters=filters, group_by=group_by, target_property=target_property, max_age=max_age, ) return self.api.query("select_unique", params) def extraction( self, event_collection, timeframe=None, timezone=None, filters=None, latest=None, email=None, property_names=None, ): """Performs a data extraction Returns either a JSON object of events or a response indicating an email will be sent to you with data. :param event_collection: string, the name of the collection to query :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param latest: int, the number of most recent records you'd like to return :param email: string, optional string containing an email address to email results to :param property_names: string or list of strings, used to limit the properties returned """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, timezone=timezone, filters=filters, latest=latest, email=email, property_names=property_names, ) return self.api.query("extraction", params) def funnel( self, steps, timeframe=None, timezone=None, max_age=None, all_keys=False ): """Performs a Funnel query Returns an object containing the results for each step of the funnel. :param steps: array of dictionaries, one for each step. example: [{"event_collection":"signup","actor_property":"user.id"}, {"event_collection":"purchase","actor_property:"user.id"}] :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds :all_keys: set to true to return all keys on response (i.e. "result", "actors", "steps") """ params = self.get_params( steps=steps, timeframe=timeframe, timezone=timezone, max_age=max_age, ) return self.api.query("funnel", params, all_keys=all_keys) def multi_analysis( self, event_collection, analyses, timeframe=None, interval=None, timezone=None, filters=None, group_by=None, max_age=None, ): """Performs a multi-analysis query Returns a dictionary of analysis results. :param event_collection: string, the name of the collection to query :param analyses: dict, the types of analyses you'd like to run. example: {"total money made":{"analysis_type":"sum","target_property":"purchase.price", "average price":{"analysis_type":"average","target_property":"purchase.price"} :param timeframe: string or dict, the timeframe in which the events happened example: "previous_7_days" :param interval: string, the time interval used for measuring data over time example: "daily" :param timezone: int, the timezone you'd like to use for the timeframe and interval in seconds :param filters: array of dict, contains the filters you'd like to apply to the data example: [{"property_name":"device", "operator":"eq", "property_value":"iPhone"}] :param group_by: string or array of strings, the name(s) of the properties you would like to group you results by. example: "customer.id" or ["browser","operating_system"] :param max_age: an integer, greater than 30 seconds, the maximum 'staleness' you're willing to trade for increased query performance, in seconds """ params = self.get_params( event_collection=event_collection, timeframe=timeframe, interval=interval, timezone=timezone, filters=filters, group_by=group_by, analyses=analyses, max_age=max_age, ) return self.api.query("multi_analysis", params) def get_params( self, event_collection=None, timeframe=None, timezone=None, interval=None, filters=None, group_by=None, target_property=None, latest=None, email=None, analyses=None, steps=None, property_names=None, percentile=None, max_age=None, ): params = {} if event_collection: params["event_collection"] = event_collection if timeframe: if type(timeframe) is dict: params["timeframe"] = json.dumps(timeframe) else: params["timeframe"] = timeframe if timezone: params["timezone"] = timezone if interval: params["interval"] = interval if filters: params["filters"] = json.dumps(filters) if group_by: if type(group_by) is list: params["group_by"] = json.dumps(group_by) else: params["group_by"] = group_by if target_property: params["target_property"] = target_property if latest: params["latest"] = latest if email: params["email"] = email if analyses: params["analyses"] = json.dumps(analyses) if steps: params["steps"] = json.dumps(steps) if property_names: params["property_names"] = json.dumps(property_names) if percentile: params["percentile"] = percentile if max_age: params["max_age"] = max_age return params
import os import sys project_dir = (os.environ['PROJECT_DIR']) (project_dir) os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from django.conf import settings from django.contrib.sites.models import Site domains = (os.environ['WEBSITE_DOMAINS']) () for domain in domains: ()
from setuptools import setup, find_packages setup( name="Hodor", version="0.3", packages=find_packages(), include_package_data=True, install_requires=[ "Click==2.4", "pyopenssl", "pycrypto", "google-api-python-client", "python-gflags", "httplib2", "pprintpp", "multiprocessing", "shapely", "tablib", ], entry_points=""" [console_scripts] hodor=hodor.cli:cli """, )
import functools import re import sublime import sublime_plugin from . import GitTextCommand, GitWindowCommand, plugin_file class GitBlameCommand(GitTextCommand): def run(self, edit): # somewhat custom blame command: # -w: ignore whitespace changes # -M: retain blame when moving lines # -C: retain blame when copying lines between files command = ["git", "blame", "-w", "-M", "-C"] lines = self.get_lines() if lines: command.extend(("-L", str(lines[0]) + "," + str(lines[1]))) callback = self.blame_done else: callback = functools.partial( self.blame_done, focused_line=self.get_current_line() ) command.append(self.get_file_name()) self.run_command(command, callback) def get_current_line(self): (current_line, column) = self.view.rowcol(self.view.sel()[0].a) # line is 1 based return current_line + 1 def get_lines(self): selection = self.view.sel()[0] # todo: multi-select support? if selection.empty(): return False # just the lines we have a selection on begin_line, begin_column = self.view.rowcol(selection.begin()) end_line, end_column = self.view.rowcol(selection.end()) # blame will fail if last line is empty and is included in the selection if end_line > begin_line and end_column == 0: end_line -= 1 # add one to each, to line up sublime's index with git's return begin_line + 1, end_line + 1 def blame_done(self, result, focused_line=1): view = self.scratch( result, title="Git Blame", focused_line=focused_line, syntax=plugin_file("syntax/Git Blame.tmLanguage"), ) class GitLog(object): def run(self, edit=None): fn = self.get_file_name() return self.run_log(fn != "", "--", fn) def run_log(self, follow, *args): # the ASCII bell (\a) is just a convenient character I'm pretty sure # won't ever come up in the subject of the commit (and if it does then # you positively deserve broken output...) # 9000 is a pretty arbitrarily chosen limit; picked entirely because # it's about the size of the largest repo I've tested this on... and # there's a definite hiccup when it's loading that command = [ "git", "log", "--no-color", "--pretty=%s (%h)\a%an <%aE>\a%ad (%ar)", "--date=local", "--max-count=9000", "--follow" if follow else None, ] command.extend(args) self.run_command(command, self.log_done) def log_done(self, result): self.results = [r.split("\a", 2) for r in result.strip().split("\n")] self.quick_panel(self.results, self.log_panel_done) def log_panel_done(self, picked): if 0 > picked < len(self.results): return item = self.results[picked] # the commit hash is the last thing on the first line, in brackets ref = item[0].split(" ")[-1].strip("()") self.log_result(ref) def log_result(self, ref): # I'm not certain I should have the file name here; it restricts the # details to just the current file. Depends on what the user expects... # which I'm not sure of. self.run_command( ["git", "log", "--no-color", "-p", "-1", ref, "--", self.get_file_name()], self.details_done, ) def details_done(self, result): self.scratch( result, title="Git Commit Details", syntax=plugin_file("syntax/Git Commit View.tmLanguage"), ) class GitLogCommand(GitLog, GitTextCommand): pass class GitLogAllCommand(GitLog, GitWindowCommand): pass class GitShow(object): def run(self, edit=None): # GitLog Copy-Past self.run_command( [ "git", "log", "--no-color", "--pretty=%s (%h)\a%an <%aE>\a%ad (%ar)", "--date=local", "--max-count=9000", "--", self.get_file_name(), ], self.show_done, ) def show_done(self, result): # GitLog Copy-Past self.results = [r.split("\a", 2) for r in result.strip().split("\n")] self.quick_panel(self.results, self.panel_done) def panel_done(self, picked): if 0 > picked < len(self.results): return item = self.results[picked] # the commit hash is the last thing on the first line, in brackets ref = item[0].split(" ")[-1].strip("()") self.run_command( ["git", "show", "%s:%s" % (ref, self.get_relative_file_name())], self.details_done, ref=ref, ) def details_done(self, result, ref): syntax = self.view.settings().get("syntax") self.scratch(result, title="%s:%s" % (ref, self.get_file_name()), syntax=syntax) class GitShowCommand(GitShow, GitTextCommand): pass class GitShowAllCommand(GitShow, GitWindowCommand): pass class GitGraph(object): def run(self, edit=None): filename = self.get_file_name() self.run_command( [ "git", "log", "--graph", "--pretty=%h -%d (%cr) (%ci) <%an> %s", "--abbrev-commit", "--no-color", "--decorate", "--date=relative", "--follow" if filename else None, "--", filename, ], self.log_done, ) def log_done(self, result): self.scratch( result, title="Git Log Graph", syntax=plugin_file("syntax/Git Graph.tmLanguage"), ) class GitGraphCommand(GitGraph, GitTextCommand): pass class GitGraphAllCommand(GitGraph, GitWindowCommand): pass class GitOpenFileCommand(GitLog, GitWindowCommand): def run(self): self.run_command(["git", "branch", "-a", "--no-color"], self.branch_done) def branch_done(self, result): self.results = result.rstrip().split("\n") self.quick_panel(self.results, self.branch_panel_done, sublime.MONOSPACE_FONT) def branch_panel_done(self, picked): if 0 > picked < len(self.results): return self.branch = self.results[picked].split(" ")[-1] self.run_log(False, self.branch) def log_result(self, result_hash): self.ref = result_hash self.run_command( ["git", "ls-tree", "-r", "--full-tree", self.ref], self.ls_done ) def ls_done(self, result): # Last two items are the ref and the file name # p.s. has to be a list of lists; tuples cause errors later self.results = [ [match.group(2), match.group(1)] for match in re.finditer(r"\S+\s(\S+)\t(.+)", result) ] self.quick_panel(self.results, self.ls_panel_done) def ls_panel_done(self, picked): if 0 > picked < len(self.results): return item = self.results[picked] self.filename = item[0] self.fileRef = item[1] self.run_command(["git", "show", self.fileRef], self.show_done) def show_done(self, result): self.scratch(result, title="%s:%s" % (self.fileRef, self.filename)) class GitDocumentCommand(GitBlameCommand): def get_lines(self): selection = self.view.sel()[0] # todo: multi-select support? # just the lines we have a selection on begin_line, begin_column = self.view.rowcol(selection.begin()) end_line, end_column = self.view.rowcol(selection.end()) # blame will fail if last line is empty and is included in the selection if end_line > begin_line and end_column == 0: end_line -= 1 # add one to each, to line up sublime's index with git's return begin_line + 1, end_line + 1 def blame_done(self, result, focused_line=1): shas = set( ( sha for sha in re.findall(r"^[0-9a-f]+", result, re.MULTILINE) if not re.match(r"^0+$", sha) ) ) command = ["git", "show", "-s", "-z", "--no-color", "--date=iso"] command.extend(shas) self.run_command(command, self.show_done) def show_done(self, result): commits = [] for commit in result.split("\0"): match = re.search(r"^Date:\s+(.+)$", commit, re.MULTILINE) if match: commits.append((match.group(1), commit)) commits.sort(reverse=True) commits = [commit for d, commit in commits] self.scratch( "\n\n".join(commits), title="Git Commit Documentation", syntax=plugin_file("syntax/Git Commit View.tmLanguage"), ) class GitGotoCommit(GitTextCommand): def run(self, edit): view = self.view line = view.substr(view.line(view.sel()[0].a)) commit = line.split(" ")[0] if not commit or commit == "00000000": return working_dir = view.settings().get("git_root_dir") self.run_command( ["git", "show", commit], self.show_done, working_dir=working_dir ) def show_done(self, result): self.scratch( result, title="Git Commit View", syntax=plugin_file("syntax/Git Commit View.tmLanguage"), ) def is_enabled(self): return True
# -*- coding: utf-8 -*- # # django-intercom documentation build configuration file, created by # sphinx-quickstart on Mon Jan 23 13:50:08 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath("..")) # import settings # from django.core.management import setup_environ # setup_environ(settings) # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [] # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] # The suffix of source filenames. source_suffix = ".rst" # The encoding of source files. # source_encoding = 'utf-8-sig' # The master toctree document. master_doc = "index" # General information about the project. project = "django-intercom" copyright = "2016, Ken Cochrane" # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # sys.path.insert(0, os.pardir) m = __import__("intercom") version = "0.0.13" release = version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: # today = '' # Else, today_fmt is used as the format for a strftime call. # today_fmt = '%B %d, %Y' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ["_build"] # The reST default role (used for this markup: `text`) to use for all documents. # default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. # add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). # add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. # show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" # A list of ignored prefixes for module index sorting. # modindex_common_prefix = [] # -- Options for HTML output --------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = "default" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None # The name of an image file (within the static path) to use as favicon of the # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 # pixels large. # html_favicon = None # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ["_static"] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True # Custom sidebar templates, maps document names to template names. # html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. # html_additional_pages = {} # If false, no module index is generated. # html_domain_indices = True # If false, no index is generated. # html_use_index = True # If true, the index is split into individual pages for each letter. # html_split_index = False # If true, links to the reST sources are added to the pages. # html_show_sourcelink = True # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. # html_show_sphinx = True # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. # html_show_copyright = True # If true, an OpenSearch description file will be output, and all pages will # contain a <link> tag referring to it. The value of this option must be the # base URL from which the finished HTML is served. # html_use_opensearch = '' # This is the file name suffix for HTML files (e.g. ".xhtml"). # html_file_suffix = None # Output file base name for HTML help builder. htmlhelp_basename = "django-intercomdoc" # -- Options for LaTeX output -------------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). #'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. #'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ( "index", "django-intercom.tex", "django-intercom Documentation", "Ken Cochrane", "manual", ), ] # The name of an image file (relative to this directory) to place at the top of # the title page. # latex_logo = None # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. # latex_use_parts = False # If true, show page references after internal links. # latex_show_pagerefs = False # If true, show URL addresses after external links. # latex_show_urls = False # Documents to append as an appendix to all manuals. # latex_appendices = [] # If false, no module index is generated. # latex_domain_indices = True # -- Options for manual page output -------------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ ("index", "django-intercom", "django-intercom Documentation", ["Ken Cochrane"], 1) ] # If true, show URL addresses after external links. # man_show_urls = False # -- Options for Texinfo output ------------------------------------------------ # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ ( "index", "django-intercom", "django-intercom Documentation", "Ken Cochrane", "django-intercom", "One line description of project.", "Miscellaneous", ), ] # Documents to append as an appendix to all manuals. # texinfo_appendices = [] # If false, no module index is generated. # texinfo_domain_indices = True # How to display URL addresses: 'footnote', 'no', or 'inline'. # texinfo_show_urls = 'footnote' # -- Options for Epub output --------------------------------------------------- # Bibliographic Dublin Core info. epub_title = "django-intercom" epub_author = "Ken Cochrane" epub_publisher = "Ken Cochrane" epub_copyright = "2012, Ken Cochrane" # The language of the text. It defaults to the language option # or en if the language is not set. # epub_language = '' # The scheme of the identifier. Typical schemes are ISBN or URL. # epub_scheme = '' # The unique identifier of the text. This can be a ISBN number # or the project homepage. # epub_identifier = '' # A unique identification for the text. # epub_uid = '' # A tuple containing the cover image and cover page html template filenames. # epub_cover = () # HTML files that should be inserted before the pages created by sphinx. # The format is a list of tuples containing the path and title. # epub_pre_files = [] # HTML files shat should be inserted after the pages created by sphinx. # The format is a list of tuples containing the path and title. # epub_post_files = [] # A list of files that should not be packed into the epub file. # epub_exclude_files = [] # The depth of the table of contents in toc.ncx. # epub_tocdepth = 3 # Allow duplicate toc entries. # epub_tocdup = True
'\nModule: callback_handler\nAuthor: Ken Chatfield <ken@robots.ox.ac.uk>\nCreated on: 20 Oct 2012\n' import logging from gevent_zeromq import zmq import random class ProcType(): multiprocessing = 1 gipc = 2 greenlet = 3 PROC_TYPE = ProcType.greenlet DEBUG_CB = True if (PROC_TYPE == ProcType.gipc): import gipc elif (PROC_TYPE == ProcType.multiprocessing): from multiprocessing import Process elif (PROC_TYPE == ProcType.greenlet): import gevent log = (__name__) if DEBUG_CB: (logging.DEBUG) () pipe_name_hash = ((((() * 1000000.0)))) ZMQ_TASK_LAUNCH_CH = ('ipc:///tmp/zmq_imsearchtools_task_ch_' + pipe_name_hash) ZMQ_TASK_COUNT_DEC_CH = ('ipc:///tmp/zmq_imsearchtools_tcdec_ch_' + pipe_name_hash) ZMQ_TASK_RESULT_CH = ('ipc:///tmp/zmq_imsearchtools_result_ch_' + pipe_name_hash) ZMQ_WORKER_CONTROL_CH = ('ipc:///tmp/zmq_imsearchtools_control_ch_' + pipe_name_hash) ZMQ_WORKER_SYNC_CH = ('ipc:///tmp/zmq_imsearchtools_sync_ch_' + pipe_name_hash) ZMQ_RESULT_SKIPPING = 'SKIPPING' ZMQ_RESULT_DONE = 'DONE' ZMQ_CONTROL_DONE = 'FINISHED' ZMQ_CONTROL_SYNC = 'INITIALIZED' class CallbackHandler(object): 'Class for wrapping callbacks using ZMQ\n\n Initializer Args:\n worker_func: the callback to run when calling `run_callback()`\n task_count: the number of times `run_callback()` will be called\n [worker_count]: the number of workers to use (default: # CPUs)\n\n\n On launch a pool of `worker_count` workers is started, which will then\n process any tasks added to the task queue by calling `run_callback()`\n (the parameters of the callback function can be passed directly as\n parameters to `run_callback()`).\n\n Once `task_count` tasks have been run and completed, the workers will\n shut down. Wait for this condition by calling `join()`.\n ' def __init__(self, worker_func, task_count, worker_count=(- 1)): if (worker_count == (- 1)): worker_count = 8 self.workers = (worker_func, worker_count) if (PROC_TYPE == ProcType.gipc): self.result_manager = () elif (PROC_TYPE == ProcType.multiprocessing): self.result_manager = () () elif (PROC_TYPE == ProcType.greenlet): self.result_manager = (result_manager, task_count) self.runner = () ('Waiting for %d workers to initialize...', worker_count) context = () syncservice = (zmq.REP) (ZMQ_WORKER_SYNC_CH) subscribers = 0 while (subscribers < worker_count): msg = () (msg) subscribers = (subscribers + 1) ('%d workers initialized', worker_count) def run_callback(self, *args, **kwargs): (*args) def skip(self): () def join(self): ('Waiting for result manager to return...') () ('Result manager returned!') ('Waiting for workers to return...') () ('Workers returned!') def terminate(self): ('Forcefully terminating result manager') () ('Forcefully terminating workers') if (PROC_TYPE == ProcType.greenlet): () else: () ('Done terminating!') class CallbackTaskRunner(object): 'Class used internally by CallbackHandler to launch tasks' def __init__(self): context = () self.task_sender = (zmq.PUSH) (ZMQ_TASK_LAUNCH_CH) self.tcdec_sender = (zmq.PUB) (ZMQ_TASK_COUNT_DEC_CH) if DEBUG_CB: self.launched_tasks = 0 def run(self, *args, **kwargs): params = () if DEBUG_CB: self.launched_tasks += 1 ('Starting task %d', self.launched_tasks) params['kwargs']['launched_tasks'] = self.launched_tasks else: ('Starting task') (params) def skip(self): if DEBUG_CB: self.launched_tasks += 1 ('Skipping task %d', self.launched_tasks) else: ('Skipping task') (ZMQ_RESULT_SKIPPING) class CallbackTaskWorkers(object): 'Class used internally by CallbackHandler to launch a pool of workers' def __init__(self, worker_func, worker_count): self.workers = ([None] * worker_count) for wrk_num in (worker_count): if (PROC_TYPE == ProcType.gipc): self.workers[wrk_num] = () elif (PROC_TYPE == ProcType.multiprocessing): self.workers[wrk_num] = () () elif (PROC_TYPE == ProcType.greenlet): self.workers[wrk_num] = (self._callback_worker, wrk_num, worker_func) def join(self): if (PROC_TYPE == ProcType.greenlet): (self.workers) else: for worker in self.workers: () def terminate(self): if (PROC_TYPE == ProcType.greenlet): (self.workers) else: for worker in self.workers: () def _callback_worker(self, wrk_num, worker_func): ('Initializing worker number %d', wrk_num) context = () task_receiver = (zmq.PULL) (ZMQ_TASK_LAUNCH_CH) result_sender = (zmq.PUSH) (ZMQ_TASK_RESULT_CH) control_receiver = (zmq.SUB) (ZMQ_WORKER_CONTROL_CH) (zmq.SUBSCRIBE, '') poller = () (task_receiver, zmq.POLLIN) (control_receiver, zmq.POLLIN) syncservice = (zmq.REQ) (ZMQ_WORKER_SYNC_CH) (ZMQ_CONTROL_SYNC) () while True: socks = (()) if ((task_receiver) == zmq.POLLIN): worker_params = () if DEBUG_CB: launched_tasks = worker_params['kwargs']['launched_tasks'] ('Launching task %d', launched_tasks) del worker_params['kwargs']['launched_tasks'] else: ('Launching task') (*worker_params['args']) if DEBUG_CB: ('Completed task %d', launched_tasks) else: ('Completed task') (ZMQ_RESULT_DONE) if ((control_receiver) == zmq.POLLIN): control_message = () if (control_message == ZMQ_CONTROL_DONE): ('Terminating worker number %d', wrk_num) break def result_manager(num_tasks): 'Function used internally by CallbackHandler to collect results of tasks' context = () result_receiver = (zmq.PULL) (ZMQ_TASK_RESULT_CH) control_sender = (zmq.PUB) (ZMQ_WORKER_CONTROL_CH) tcdec_receiver = (zmq.SUB) (ZMQ_TASK_COUNT_DEC_CH) (zmq.SUBSCRIBE, '') poller = () (result_receiver, zmq.POLLIN) (tcdec_receiver, zmq.POLLIN) while True: socks = (()) if ((result_receiver) == zmq.POLLIN): result_message = () if (result_message == ZMQ_RESULT_DONE): num_tasks -= 1 ('Completed post-computation, remaining tasks: %d', num_tasks) if ((tcdec_receiver) == zmq.POLLIN): result_message = () if (result_message == ZMQ_RESULT_SKIPPING): num_tasks -= 1 ('Skipped post-computation, remaining tasks: %d', num_tasks) if (num_tasks == 0): ('All tasks done - terminating workers') break (ZMQ_CONTROL_DONE)
' Tests gristle_determinator.py\n\n Contains a primary class: FileStructureFixtureManager\n Which is extended by six classes that override various methods or variables.\n This is a failed experiment - since the output isn\'t as informative as it\n should be. This should be redesigned.\n\n See the file "LICENSE" for the full license governing this code.\n Copyright 2011,2012,2013 Ken Farmer\n' import sys import os import tempfile import envoy import csv import pytest import errno from pprint import pprint as pp (0, ((((__file__))))) data_dir = (((((__file__)))), 'data') import gristle.file_type as file_type script_path = (((__file__))) def generate_test_file(delim, rec_list, quoted=False): (fd, fqfn) = () fp = (fd, 'w') for rec in rec_list: if quoted: for i in ((rec)): rec[i] = ('"%s"' % rec[i]) outrec = ((rec) + '\n') (outrec) () return fqfn def get_value(parsable_out, division, section, subsection, key): 'Gets the value (right-most field) out of gristle_determinator\n parsable output given the key values for the rest of the fields.\n ' mydialect = csv.Dialect mydialect.delimiter = '|' mydialect.quoting = ('QUOTE_ALL') mydialect.quotechar = '"' mydialect.lineterminator = '\n' csvobj = (('\n')) for record in csvobj: if (not record): continue if (not ((record) == 5)): raise () rec_division = record[0] rec_section = record[1] rec_subsection = record[2] rec_key = record[3] rec_value = record[4] if ((rec_division == division) and (rec_section == section) and (rec_subsection == subsection) and (rec_key == key)): return rec_value return None class Test_empty_file(object): def setup_method(self, method): pass def test_empty_file(self): fqfn = (data_dir, 'empty.csv') cmd = ('%s %s --outputformat=parsable' % ((script_path, 'gristle_determinator'), fqfn)) r = (cmd) (r.std_out) (r.std_err) if (not (r.status_code == errno.ENODATA)): raise () if (not ((r.std_out, 'file_analysis_results', 'main', 'main', 'record_count') is None)): raise () if (not ((r.std_out, 'file_analysis_results', 'main', 'main', 'hasheader') is None)): raise () def test_empty_file_with_header(self): fqfn = (data_dir, 'empty_header.csv') cmd = ('%s %s --outputformat=parsable' % ((script_path, 'gristle_determinator'), fqfn)) r = (cmd) (r.std_out) (r.std_err) if (not (r.status_code == 0)): raise () if (not ((r.std_out, 'file_analysis_results', 'main', 'main', 'record_count') == '1')): raise () if (not ((r.std_out, 'file_analysis_results', 'main', 'main', 'hasheader') == 'True')): raise () def test_empty_file_with_header_and_hasheader_arg(self): fqfn = (data_dir, 'empty_header.csv') cmd = ('%s %s --outputformat=parsable --hasheader' % ((script_path, 'gristle_determinator'), fqfn)) r = (cmd) (r.std_out) (r.std_err) if (not (r.status_code == 0)): raise () if (not ((r.std_out, 'file_analysis_results', 'main', 'main', 'record_count') == '1')): raise () if (not ((r.std_out, 'file_analysis_results', 'main', 'main', 'hasheader') == 'True')): raise () class Test_output_formatting_and_contents(object): def setup_method(self, method): recs = [['Alabama', '8', '18'], ['Alaska', '6', '16'], ['Arizona', '6', '14'], ['Arkansas', '2', '12'], ['California', '19', '44']] self.file_struct = {} self.field_struct = {} fqfn = () cmd = ('%s %s --outputformat=parsable' % ((script_path, 'gristle_determinator'), fqfn)) r = (cmd) if (not (r.status_code == 0)): raise () mydialect = csv.Dialect mydialect.delimiter = '|' mydialect.quoting = ('QUOTE_ALL') mydialect.quotechar = '"' mydialect.lineterminator = '\n' csvobj = (('\n')) for record in csvobj: if (not record): continue if (not ((record) == 5)): raise () division = record[0] section = record[1] subsection = record[2] key = record[3] value = record[4] if (not (division in ['file_analysis_results', 'field_analysis_results'])): raise () if (division == 'file_analysis_results'): if (not (section == 'main')): raise () if (not (subsection == 'main')): raise () self.file_struct[key] = value elif (division == 'field_analysis_results'): if (not ('field_' in section)): raise () if (not (subsection in ['main', 'top_values'])): raise () if (section not in self.field_struct): self.field_struct[section] = {} if (subsection not in self.field_struct[section]): self.field_struct[section][subsection] = {} self.field_struct[section][subsection][key] = value def test_file_info(self): if (not (self.file_struct['record_count'] == '5')): raise () if (not (self.file_struct['skipinitialspace'] == 'False')): raise () if (not (self.file_struct['quoting'] == 'QUOTE_NONE')): raise () if (not (self.file_struct['field_count'] == '3')): raise () if (not (self.file_struct['delimiter'] == "'|'")): raise () if (not (self.file_struct['hasheader'] == 'False')): raise () if (not (self.file_struct['escapechar'] == 'None')): raise () if (not (self.file_struct['csv_quoting'] == 'False')): raise () if (not (self.file_struct['doublequote'] == 'False')): raise () if (not (self.file_struct['format_type'] == 'csv')): raise () def test_field_info(self): if (not (self.field_struct['field_0']['main']['field_number'] == '0')): raise () if (not (self.field_struct['field_0']['main']['name'] == 'field_0')): raise () if (not (self.field_struct['field_0']['main']['type'] == 'string')): raise () if (not (self.field_struct['field_0']['main']['known_values'] == '5')): raise () if (not (self.field_struct['field_0']['main']['min'] == 'Alabama')): raise () if (not (self.field_struct['field_0']['main']['max'] == 'California')): raise () if (not (self.field_struct['field_0']['main']['unique_values'] == '5')): raise () if (not (self.field_struct['field_0']['main']['wrong_field_cnt'] == '0')): raise () if (not (self.field_struct['field_0']['main']['case'] == 'mixed')): raise () if (not (self.field_struct['field_0']['main']['max_length'] == '10')): raise () if (not (self.field_struct['field_0']['main']['mean_length'] == '7.6')): raise () if (not (self.field_struct['field_0']['main']['min_length'] == '6')): raise () if (not (self.field_struct['field_1']['main']['field_number'] == '1')): raise () if (not (self.field_struct['field_1']['main']['name'] == 'field_1')): raise () if (not (self.field_struct['field_1']['main']['type'] == 'integer')): raise () if (not (self.field_struct['field_1']['main']['known_values'] == '4')): raise () if (not (self.field_struct['field_1']['main']['min'] == '2')): raise () if (not (self.field_struct['field_1']['main']['max'] == '19')): raise () if (not (self.field_struct['field_1']['main']['unique_values'] == '4')): raise () if (not (self.field_struct['field_1']['main']['wrong_field_cnt'] == '0')): raise () if (not (self.field_struct['field_1']['main']['mean'] == '8.2')): raise () if (not (self.field_struct['field_1']['main']['median'] == '6.0')): raise () if (not (self.field_struct['field_1']['main']['std_dev'] == '5.74108003776')): raise () if (not (self.field_struct['field_1']['main']['variance'] == '32.96')): raise () def test_top_value_info(self): if (not (self.field_struct['field_0']['top_values']['top_values'] == 'not shown - all are unique')): raise () if (not (self.field_struct['field_1']['top_values']['2'] == '1')): raise () if (not (self.field_struct['field_1']['top_values']['6'] == '2')): raise () if (not (self.field_struct['field_1']['top_values']['8'] == '1')): raise () if (not (self.field_struct['field_1']['top_values']['19'] == '1')): raise ()
from . import auth, content, meta
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os sys.path.insert(0, os.path.abspath("..")) from clint.textui import puts, indent, colored lorem = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." if __name__ == "__main__": puts("This is an example of text that is not indented. Awesome, eh?") puts("Lets quote some text.") with indent(4, quote=colored.blue(".")): puts("This is indented text.") with indent(3, quote=colored.blue(" >")): puts("This is quoted text.") puts(colored.green(lorem)) puts("And, we're back to the previous index level. That was easy.") with indent(12, quote=colored.cyan(" |")): puts("This is massively indented text.") puts(colored.magenta("This is massively indented text that's colored")) puts("Now I'll show you how to negatively indent.") with indent(-5, quote=colored.yellow("!! ")): puts("NOTE: " + colored.red("INCEPTION!")) puts("And back to where we were.") puts("Back to level 1.") puts("Back to normal.")
# -*- coding: utf-8 -*- """ grequests ~~~~~~~~~ This module contains an asynchronous replica of ``requests.api``, powered by gevent. All API methods return a ``Request`` instance (as opposed to ``Response``). A list of requests can be sent with ``map()``. """ from functools import partial import traceback try: import gevent from gevent import monkey as curious_george from gevent.pool import Pool except ImportError: raise RuntimeError("Gevent is required for grequests.") # Monkey-patch. curious_george.patch_all(thread=False, select=False) from requests import Session __all__ = ( "map", "imap", "get", "options", "head", "post", "put", "patch", "delete", "request", ) class AsyncRequest(object): """Asynchronous request. Accept same parameters as ``Session.request`` and some additional: :param session: Session which will do request :param callback: Callback called on response. Same as passing ``hooks={'response': callback}`` """ def __init__(self, method, url, **kwargs): #: Request method self.method = method #: URL to request self.url = url #: Associated ``Session`` self.session = kwargs.pop("session", None) if self.session is None: self.session = Session() callback = kwargs.pop("callback", None) if callback: kwargs["hooks"] = {"response": callback} #: The rest arguments for ``Session.request`` self.kwargs = kwargs #: Resulting ``Response`` self.response = None def send(self, **kwargs): """ Prepares request based on parameter passed to constructor and optional ``kwargs```. Then sends request and saves response to :attr:`response` :returns: ``Response`` """ merged_kwargs = {} merged_kwargs.update(self.kwargs) merged_kwargs.update(kwargs) try: self.response = self.session.request(self.method, self.url, **merged_kwargs) except Exception as e: self.exception = e self.traceback = traceback.format_exc() return self def send(r, pool=None, stream=False): """Sends the request object using the specified pool. If a pool isn't specified this method blocks. Pools are useful because you can specify size and can hence limit concurrency.""" if pool is not None: return pool.spawn(r.send, stream=stream) return gevent.spawn(r.send, stream=stream) # Shortcuts for creating AsyncRequest with appropriate HTTP method get = partial(AsyncRequest, "GET") options = partial(AsyncRequest, "OPTIONS") head = partial(AsyncRequest, "HEAD") post = partial(AsyncRequest, "POST") put = partial(AsyncRequest, "PUT") patch = partial(AsyncRequest, "PATCH") delete = partial(AsyncRequest, "DELETE") # synonym def request(method, url, **kwargs): return AsyncRequest(method, url, **kwargs) def map(requests, stream=False, size=None, exception_handler=None, gtimeout=None): """Concurrently converts a list of Requests to Responses. :param requests: a collection of Request objects. :param stream: If True, the content will not be downloaded immediately. :param size: Specifies the number of requests to make at a time. If None, no throttling occurs. :param exception_handler: Callback function, called when exception occured. Params: Request, Exception :param gtimeout: Gevent joinall timeout in seconds. (Note: unrelated to requests timeout) """ requests = list(requests) pool = Pool(size) if size else None jobs = [send(r, pool, stream=stream) for r in requests] gevent.joinall(jobs, timeout=gtimeout) ret = [] for request in requests: if request.response is not None: ret.append(request.response) elif exception_handler and hasattr(request, "exception"): ret.append(exception_handler(request, request.exception)) else: ret.append(None) return ret def imap(requests, stream=False, size=2, exception_handler=None): """Concurrently converts a generator object of Requests to a generator of Responses. :param requests: a generator of Request objects. :param stream: If True, the content will not be downloaded immediately. :param size: Specifies the number of requests to make at a time. default is 2 :param exception_handler: Callback function, called when exception occured. Params: Request, Exception """ pool = Pool(size) def send(r): return r.send(stream=stream) for request in pool.imap_unordered(send, requests): if request.response is not None: yield request.response elif exception_handler: exception_handler(request, request.exception) pool.join()
""" urllib3 - Thread-safe connection pooling and re-using. """ import warnings from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url from . import exceptions from .filepost import encode_multipart_formdata from .poolmanager import PoolManager, ProxyManager, proxy_from_url from .response import HTTPResponse from .util.request import make_headers from .util.url import get_host from .util.timeout import Timeout from .util.retry import Retry # Set default logging handler to avoid "No handler found" warnings. import logging try: # Python 2.7+ from logging import NullHandler except ImportError: class NullHandler(logging.Handler): def emit(self, record): pass __author__ = "Andrey Petrov (andrey.petrov@shazow.net)" __license__ = "MIT" __version__ = "1.15.1" __all__ = ( "HTTPConnectionPool", "HTTPSConnectionPool", "PoolManager", "ProxyManager", "HTTPResponse", "Retry", "Timeout", "add_stderr_logger", "connection_from_url", "disable_warnings", "encode_multipart_formdata", "get_host", "make_headers", "proxy_from_url", ) logging.getLogger(__name__).addHandler(NullHandler()) def add_stderr_logger(level=logging.DEBUG): """ Helper for quickly adding a StreamHandler to the logger. Useful for debugging. Returns the handler after adding it. """ # This method needs to be in this __init__.py to get the __name__ correct # even if urllib3 is vendored within another package. logger = logging.getLogger(__name__) handler = logging.StreamHandler() handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(message)s")) logger.addHandler(handler) logger.setLevel(level) logger.debug("Added a stderr logging handler to logger: %s", __name__) return handler # ... Clean up. del NullHandler # All warning filters *must* be appended unless you're really certain that they # shouldn't be: otherwise, it's very hard for users to use most Python # mechanisms to silence them. # SecurityWarning's always go off by default. warnings.simplefilter("always", exceptions.SecurityWarning, append=True) # SubjectAltNameWarning's should go off once per host warnings.simplefilter("default", exceptions.SubjectAltNameWarning, append=True) # InsecurePlatformWarning's don't vary between requests, so we keep it default. warnings.simplefilter("default", exceptions.InsecurePlatformWarning, append=True) # SNIMissingWarnings should go off only once. warnings.simplefilter("default", exceptions.SNIMissingWarning, append=True) def disable_warnings(category=exceptions.HTTPWarning): """ Helper for quickly disabling all urllib3 warnings. """ warnings.simplefilter("ignore", category)
import os import re import sys from codecs import open from setuptools import setup from setuptools.command.test import test as TestCommand class PyTest(TestCommand): user_options = [('pytest-args=', 'a', 'Arguments to pass into py.test')] def initialize_options(self): (self) self.pytest_args = [] def finalize_options(self): (self) self.test_args = [] self.test_suite = True def run_tests(self): import pytest errno = (self.pytest_args) (errno) if (sys.argv[(- 1)] == 'publish'): ('python setup.py sdist upload') () packages = ['requests', 'requests.packages', 'requests.packages.chardet', 'requests.packages.urllib3', 'requests.packages.urllib3.packages', 'requests.packages.urllib3.contrib', 'requests.packages.urllib3.util', 'requests.packages.urllib3.packages.ssl_match_hostname'] requires = [] test_requirements = ['pytest>=2.8.0', 'pytest-httpbin==0.0.7', 'pytest-cov'] with ('requests/__init__.py', 'r') as fd: version = (1) if (not version): raise ('Cannot find version information') with ('README.rst', 'r', 'utf-8') as f: readme = () with ('HISTORY.rst', 'r', 'utf-8') as f: history = () ()
# -*- coding: utf-8 -*- """ Tablib - TSV (Tab Separated Values) Support. """ from tablib.formats._csv import ( export_set as export_set_wrapper, import_set as import_set_wrapper, detect as detect_wrapper, ) title = "tsv" extensions = ("tsv",) DEFAULT_ENCODING = "utf-8" DELIMITER = "\t" def export_set(dataset): """Returns TSV representation of Dataset.""" return export_set_wrapper(dataset, delimiter=DELIMITER) def import_set(dset, in_stream, headers=True): """Returns dataset from TSV stream.""" return import_set_wrapper(dset, in_stream, headers=headers, delimiter=DELIMITER) def detect(stream): """Returns True if given stream is valid TSV.""" return detect_wrapper(stream, delimiter=DELIMITER)
# -*- coding: windows-1252 -*- import ExcelFormulaParser, ExcelFormulaLexer import struct from .antlr import ANTLRException class Formula(object): __slots__ = ["__init__", "__s", "__parser", "__sheet_refs", "__xcall_refs"] def __init__(self, s): try: self.__s = s lexer = ExcelFormulaLexer.Lexer(s) self.__parser = ExcelFormulaParser.Parser(lexer) self.__parser.formula() self.__sheet_refs = self.__parser.sheet_references self.__xcall_refs = self.__parser.xcall_references except ANTLRException as e: # print e raise ExcelFormulaParser.FormulaParseException("can't parse formula " + s) def get_references(self): return self.__sheet_refs, self.__xcall_refs def patch_references(self, patches): for offset, idx in patches: self.__parser.rpn = ( self.__parser.rpn[:offset] + struct.pack("<H", idx) + self.__parser.rpn[offset + 2 :] ) def text(self): return self.__s def rpn(self): """ Offset Size Contents 0 2 Size of the following formula data (sz) 2 sz Formula data (RPN token array) [2+sz] var. (optional) Additional data for specific tokens """ return struct.pack("<H", len(self.__parser.rpn)) + self.__parser.rpn
#!/usr/bin/env python # -*- coding: windows-1251 -*- # Copyright (C) 2005 Kiseliov Roman from xlwt import * w = Workbook() ws = w.add_sheet("Hey, Dude") fmts = [ "general", "0", "0.00", "#,##0", "#,##0.00", '"$"#,##0_);("$"#,##', '"$"#,##0_);[Red]("$"#,##', '"$"#,##0.00_);("$"#,##', '"$"#,##0.00_);[Red]("$"#,##', "0%", "0.00%", "0.00E+00", "# ?/?", "# ??/??", "M/D/YY", "D-MMM-YY", "D-MMM", "MMM-YY", "h:mm AM/PM", "h:mm:ss AM/PM", "h:mm", "h:mm:ss", "M/D/YY h:mm", "_(#,##0_);(#,##0)", "_(#,##0_);[Red](#,##0)", "_(#,##0.00_);(#,##0.00)", "_(#,##0.00_);[Red](#,##0.00)", '_("$"* #,##0_);_("$"* (#,##0);_("$"* "-"_);_(@_)', '_(* #,##0_);_(* (#,##0);_(* "-"_);_(@_)', '_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)', '_(* #,##0.00_);_(* (#,##0.00);_(* "-"??_);_(@_)', "mm:ss", "[h]:mm:ss", "mm:ss.0", "##0.0E+0", "@", ] i = 0 for fmt in fmts: ws.write(i, 0, fmt) style = XFStyle() style.num_format_str = fmt ws.write(i, 4, -1278.9078, style) i += 1 w.save("num_formats.xls")
try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools () from setuptools import setup, find_packages from distutils.command.build_py import build_py as _build_py from setuptools.command.sdist import sdist as _sdist import os from os import path v = (((__file__), 'VERSION')) VERSION = () () class build_py(_build_py): def run(self): init = (self.build_lib, 'git', '__init__.py') if (init): (init) (self) (init) ([init]) class sdist(_sdist): def make_release_tree(self, base_dir, files): (self, base_dir, files) orig = ('lib', 'git', '__init__.py') if (not (orig)): raise () dest = (base_dir, orig) if ((os, 'link') and (dest)): (dest) (orig, dest) (dest) def _stamp_version(filename): (found, out) = (False, []) f = (filename, 'r') for line in f: if ('__version__ =' in line): line = ("'git'", ("'%s'" % VERSION)) found = True (line) () if found: f = (filename, 'w') (out) () ()
from django.core.urlresolvers import reverse from django.utils.encoding import force_bytes from tests import models import pytest pytestmark = pytest.mark.django_db def test_delete(client): person = () response = (('person-detail')) if (not (response.status_code == 204)): raise () if (not (response.content == (''))): raise ()
import base64 import pytest from six.moves.urllib.request import urlopen, Request from six.moves.urllib.parse import urlencode from six.moves.urllib.error import HTTPError import vcr import json from assertions import assert_cassette_has_one_response, assert_is_json def _request_with_auth(url, username, password): request = (url) base64string = (((('ascii') + b':') + ('ascii'))) (b'Authorization', (b'Basic ' + base64string)) return (request) def _find_header(cassette, header): return (((header in request.headers) for request in cassette.requests)) def test_filter_basic_auth(tmpdir): url = 'http://httpbin.org/basic-auth/user/passwd' cass_file = (('basic_auth_filter.yaml')) my_vcr = () with (cass_file): with (HTTPError): resp = (url, 'user', 'wrongpasswd') if (not (() == 401)): raise () resp = (url, 'user', 'passwd') if (not (() == 200)): raise () with (cass_file) as cass: with (HTTPError): resp = (url, 'user', 'wrongpasswd') if (not (() == 401)): raise () resp = (url, 'user', 'passwd') if (not (() == 200)): raise () if (not (not (cass, 'authorization'))): raise () if (not ((cass) == 2)): raise () def test_filter_querystring(tmpdir): url = 'http://httpbin.org/?foo=bar' cass_file = (('filter_qs.yaml')) with (cass_file): (url) with (cass_file) as cass: (url) if (not ('foo' not in cass.requests[0].url)): raise () def test_filter_post_data(tmpdir): url = 'http://httpbin.org/post' data = ('utf-8') cass_file = (('filter_pd.yaml')) with (cass_file): (url, data) with (cass_file) as cass: if (not (b'id=secret' not in cass.requests[0].body)): raise () def test_filter_json_post_data(tmpdir): data = ('utf-8') request = ('http://httpbin.org/post') ('Content-Type', 'application/json') cass_file = (('filter_jpd.yaml')) with (cass_file): (request) with (cass_file) as cass: if (not (b'"id": "secret"' not in cass.requests[0].body)): raise () def test_filter_callback(tmpdir): url = 'http://httpbin.org/get' cass_file = (('basic_auth_filter.yaml')) def before_record_cb(request): if (request.path != '/get'): return request my_vcr = () with (cass_file) as cass: (url) if (not ((cass) == 0)): raise () my_vcr = () with (cass_file) as cass: (url) if (not ((cass) == 0)): raise () def test_decompress_gzip(tmpdir): url = 'http://httpbin.org/gzip' request = (url) cass_file = (('gzip_response.yaml')) with (cass_file): (request) with (cass_file) as cass: decoded_response = () (cass) (decoded_response) def test_decompress_deflate(tmpdir): url = 'http://httpbin.org/deflate' request = (url) cass_file = (('deflate_response.yaml')) with (cass_file): (request) with (cass_file) as cass: decoded_response = () (cass) (decoded_response) def test_decompress_regular(tmpdir): "Test that it doesn't try to decompress content that isn't compressed" url = 'http://httpbin.org/get' cass_file = (('noncompressed_response.yaml')) with (cass_file): (url) with (cass_file) as cass: resp = () (cass) (resp)
try: from unittest import mock except ImportError: import mock try: import contextlib except ImportError: import contextlib2 as contextlib else: if not hasattr(contextlib, "ExitStack"): import contextlib2 as contextlib import collections if not hasattr(collections, "Counter"): import backport_collections as collections __all__ = ["mock", "contextlib", "collections"]
from hamms import main if __name__ == "__main__": main()
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'NotificationQueue' db.create_table( "notifications_notificationqueue", ( ("id", self.gf("django.db.models.fields.AutoField")(primary_key=True)), ( "user", self.gf("django.db.models.fields.related.ForeignKey")( related_name="notifications", to=orm["auth.User"] ), ), ( "subject", self.gf("django.db.models.fields.CharField")( max_length=255, blank=True ), ), ("text", self.gf("django.db.models.fields.TextField")(blank=True)), ( "tries", self.gf("django.db.models.fields.PositiveIntegerField")(default=0), ), ( "notification_backend", self.gf("django.db.models.fields.CharField")(max_length=255), ), ), ) db.send_create_signal("notifications", ["NotificationQueue"]) # Adding model 'SelectedNotificationsType' db.create_table( "notifications_selectednotificationstype", ( ("id", self.gf("django.db.models.fields.AutoField")(primary_key=True)), ( "user", self.gf("django.db.models.fields.related.ForeignKey")( to=orm["auth.User"] ), ), ( "notification_type", self.gf("django.db.models.fields.CharField")(max_length=255), ), ( "notification_backends", self.gf("django.db.models.fields.TextField")(), ), ), ) db.send_create_signal("notifications", ["SelectedNotificationsType"]) # Adding unique constraint on 'SelectedNotificationsType', fields ['user', 'notification_type'] db.create_unique( "notifications_selectednotificationstype", ["user_id", "notification_type"] ) # Adding model 'NotificationBackendSettings' db.create_table( "notifications_notificationbackendsettings", ( ("id", self.gf("django.db.models.fields.AutoField")(primary_key=True)), ( "user", self.gf("django.db.models.fields.related.ForeignKey")( to=orm["auth.User"] ), ), ( "notification_backend", self.gf("django.db.models.fields.CharField")(max_length=255), ), ( "settings", self.gf("django.db.models.fields.TextField")(default="{}"), ), ), ) db.send_create_signal("notifications", ["NotificationBackendSettings"]) # Adding unique constraint on 'NotificationBackendSettings', fields ['user', 'notification_backend'] db.create_unique( "notifications_notificationbackendsettings", ["user_id", "notification_backend"], ) def backwards(self, orm): # Removing unique constraint on 'NotificationBackendSettings', fields ['user', 'notification_backend'] db.delete_unique( "notifications_notificationbackendsettings", ["user_id", "notification_backend"], ) # Removing unique constraint on 'SelectedNotificationsType', fields ['user', 'notification_type'] db.delete_unique( "notifications_selectednotificationstype", ["user_id", "notification_type"] ) # Deleting model 'NotificationQueue' db.delete_table("notifications_notificationqueue") # Deleting model 'SelectedNotificationsType' db.delete_table("notifications_selectednotificationstype") # Deleting model 'NotificationBackendSettings' db.delete_table("notifications_notificationbackendsettings") models = { "auth.group": { "Meta": {"object_name": "Group"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ( "django.db.models.fields.CharField", [], {"unique": "True", "max_length": "80"}, ), "permissions": ( "django.db.models.fields.related.ManyToManyField", [], { "to": "orm['auth.Permission']", "symmetrical": "False", "blank": "True", }, ), }, "auth.permission": { "Meta": { "ordering": "('content_type__app_label', 'content_type__model', 'codename')", "unique_together": "(('content_type', 'codename'),)", "object_name": "Permission", }, "codename": ( "django.db.models.fields.CharField", [], {"max_length": "100"}, ), "content_type": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['contenttypes.ContentType']"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "50"}), }, "auth.user": { "Meta": {"object_name": "User"}, "date_joined": ( "django.db.models.fields.DateTimeField", [], {"default": "datetime.datetime.now"}, ), "email": ( "django.db.models.fields.EmailField", [], {"max_length": "75", "unique": "True", "null": "True"}, ), "first_name": ( "django.db.models.fields.CharField", [], {"max_length": "30", "blank": "True"}, ), "groups": ( "django.db.models.fields.related.ManyToManyField", [], {"to": "orm['auth.Group']", "symmetrical": "False", "blank": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "is_active": ( "django.db.models.fields.BooleanField", [], {"default": "True"}, ), "is_staff": ( "django.db.models.fields.BooleanField", [], {"default": "False"}, ), "is_superuser": ( "django.db.models.fields.BooleanField", [], {"default": "False"}, ), "last_login": ( "django.db.models.fields.DateTimeField", [], {"default": "datetime.datetime.now"}, ), "last_name": ( "django.db.models.fields.CharField", [], {"max_length": "30", "blank": "True"}, ), "password": ( "django.db.models.fields.CharField", [], {"max_length": "128"}, ), "user_permissions": ( "django.db.models.fields.related.ManyToManyField", [], { "to": "orm['auth.Permission']", "symmetrical": "False", "blank": "True", }, ), "username": ( "django.db.models.fields.CharField", [], {"unique": "True", "max_length": "30"}, ), }, "contenttypes.contenttype": { "Meta": { "ordering": "('name',)", "unique_together": "(('app_label', 'model'),)", "object_name": "ContentType", "db_table": "'django_content_type'", }, "app_label": ( "django.db.models.fields.CharField", [], {"max_length": "100"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "model": ("django.db.models.fields.CharField", [], {"max_length": "100"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}), }, "notifications.notificationbackendsettings": { "Meta": { "unique_together": "(['user', 'notification_backend'],)", "object_name": "NotificationBackendSettings", }, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "notification_backend": ( "django.db.models.fields.CharField", [], {"max_length": "255"}, ), "settings": ("django.db.models.fields.TextField", [], {"default": "'{}'"}), "user": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['auth.User']"}, ), }, "notifications.notificationqueue": { "Meta": {"object_name": "NotificationQueue"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "notification_backend": ( "django.db.models.fields.CharField", [], {"max_length": "255"}, ), "subject": ( "django.db.models.fields.CharField", [], {"max_length": "255", "blank": "True"}, ), "text": ("django.db.models.fields.TextField", [], {"blank": "True"}), "tries": ( "django.db.models.fields.PositiveIntegerField", [], {"default": "0"}, ), "user": ( "django.db.models.fields.related.ForeignKey", [], {"related_name": "'notifications'", "to": "orm['auth.User']"}, ), }, "notifications.selectednotificationstype": { "Meta": { "unique_together": "(['user', 'notification_type'],)", "object_name": "SelectedNotificationsType", }, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "notification_backends": ("django.db.models.fields.TextField", [], {}), "notification_type": ( "django.db.models.fields.CharField", [], {"max_length": "255"}, ), "user": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['auth.User']"}, ), }, } complete_apps = ["notifications"]
import sys import os import re import pprint import logging from . import DEBUG1, DEBUG2, DEBUG3 _search_path = ['__init__()', '.', '~'] _filename = '.panrc' _valid_varnames = (['hostname', 'port', 'serial', 'api_username', 'api_password', 'api_key']) _sanitize_varnames = (['api_password', 'api_key']) _indent = 2 class PanRcError(Exception): pass class PanRc(): def __init__(self, tag=None, init_panrc=None, search_path=_search_path, filename=_filename): self._log = (__name__).log self.tag = tag self.init_panrc = init_panrc self.search_path = search_path self.filename = filename self.panrc = {} if (self.tag is not None): regexp = '^[\\w-]+$' if ((regexp, self.tag) is None): raise (('tag must match regexp "%s"' % regexp)) () s = ((self.panrc)) (DEBUG1, 'panrc: %s', s) def __parse_path(self): panrcs = [] for basename in self.search_path: if (basename == '__init__()'): if self.init_panrc: s = ((self.init_panrc)) (DEBUG2, '__parse_path: __init__(): %s', s) (self.init_panrc) else: path = (basename) path = (path) path = (path, self.filename) d = (path) if d: s = ((d)) (DEBUG2, '__parse_path: %s: %s', path, s) (d) if panrcs: (panrcs) def __parse_file(self, path): try: f = (path, 'r') except IOError as msg: (DEBUG3, 'open %s: %s', path, msg) return None panrc = {} for line in f: line = ('\r\n') if ('(^#|^\\s*$)', line): continue if self.tag: result = ('\\s*(\\w+)%([\\w-]+)\\s*=\\s*(.+)', line) if (result and ((2) == self.tag) and ((1) in _valid_varnames)): panrc[(1)] = (3) else: result = ('\\s*(\\w+)\\s*=\\s*(.+)', line) if (result and ((1) in _valid_varnames)): panrc[(1)] = (2) () return panrc def __merge_panrcs(self, panrcs): () s = ((panrcs)) (DEBUG2, 'panrcs: %s', s) for panrc in panrcs: for key in (()): self.panrc[key] = panrc[key] def __sanitize_obj(self, obj): if (obj, list): return [(x) for x in obj] else: return (obj) @staticmethod def __sanitize_dict(obj): if (not (obj, dict)): raise (('expect type dict, got %s' % (obj))) o = () for k in o: if (k in _sanitize_varnames): o[k] = ('*' * 6) return o if (__name__ == '__main__'): import pan.rc tag = None if (((sys.argv) > 1) and sys.argv[1]): tag = sys.argv[1] try: rc = () except PanRcError as msg: ('pan.rc.PanRc:', msg) (1) ('panrc:', (rc.panrc))
from django.core.exceptions import PermissionDenied from django.core.paginator import Paginator, InvalidPage from haystack.exceptions import SearchBackendError try: from django.utils.encoding import force_text except ImportError: # < Django 1.5 from django.utils.encoding import force_unicode as force_text from django.utils.translation import ugettext_lazy as _ from django.http import Http404, HttpResponseRedirect try: from functools import update_wrapper except ImportError: # < Django 1.6 from django.utils.functional import update_wrapper try: from django.template.response import TemplateResponse UPGRADED_RENDER = True except ImportError: # Some old Django, which gets worse renderers from django.shortcuts import render_to_response UPGRADED_RENDER = False from django.template import RequestContext from django.contrib import admin from django.contrib.admin.views.main import PAGE_VAR, SEARCH_VAR from django.contrib.admin.options import ModelAdmin from django.conf import settings from haystack import __version__ from haystack.query import SearchQuerySet from haystack.forms import model_choices from haystackbrowser.models import HaystackResults, SearchResultWrapper, FacetWrapper from haystackbrowser.forms import PreSelectedModelSearchForm from haystackbrowser.utils import get_haystack_settings from django.forms import Media try: from haystack.constants import DJANGO_CT, DJANGO_ID except ImportError: # really old haystack, early in 1.2 series? DJANGO_CT = "django_ct" DJANGO_ID = "django_id" _haystack_version = ".".join([str(x) for x in __version__]) def get_query_string(query_params, new_params=None, remove=None): # TODO: make this bettererer. Use propery dicty stuff on the Querydict? if new_params is None: new_params = {} if remove is None: remove = [] params = query_params.copy() for r in remove: for k in list(params): if k == r: del params[k] for k, v in list(new_params.items()): if v is None: if k in params: del params[k] else: params[k] = v return "?%s" % params.urlencode() class FakeChangeListForPaginator(object): """A value object to contain attributes required for Django's pagination template tag.""" def __init__(self, request, page, per_page, model_opts): self.paginator = page.paginator self.page_num = page.number - 1 self.can_show_all = False self.show_all = False self.result_count = self.paginator.count self.multi_page = self.result_count > per_page self.request = request self.opts = model_opts def get_query_string(self, a_dict): """Method to return a querystring appropriate for pagination.""" return get_query_string(self.request.GET, a_dict) def __repr__(self): return "<%(module)s.%(cls)s page=%(page)d total=%(count)d>" % { "module": self.__class__.__module__, "cls": self.__class__.__name__, "page": self.page_num, "count": self.result_count, } class Search404(Http404): pass class HaystackResultsAdmin(object): """Object which emulates enough of the standard Django ModelAdmin that it may be mounted into an AdminSite instance and pass validation. Used to work around the fact that we don't actually have a concrete Django Model. :param model: the model being mounted for this object. :type model: class :param admin_site: the parent site instance. :type admin_site: AdminSite object """ fields = None fieldsets = None exclude = None date_hierarchy = None ordering = None list_select_related = False save_as = False save_on_top = False def __init__(self, model, admin_site): self.model = model self.opts = model._meta self.admin_site = admin_site @classmethod def validate(cls, *args, **kwargs): return @staticmethod def check(*args, **kwargs): """it's not a real modeladmin, so we need this attribute in DEBUG.""" return () def get_model_perms(self, request): return { "add": self.has_add_permission(request), "change": self.has_change_permission(request), "delete": self.has_delete_permission(request), } def has_module_permission(self, request): return any(self.get_model_perms(request=request).values()) def has_add_permission(self, request): """Emulates the equivalent Django ModelAdmin method. :param request: the current request. :type request: WSGIRequest :return: `False` """ return False def has_change_permission(self, request, obj=None): """Emulates the equivalent Django ModelAdmin method. :param request: the current request. :param obj: the object is being viewed. :type request: WSGIRequest :type obj: None :return: The value of `request.user.is_superuser` """ return request.user.is_superuser def has_delete_permission(self, request, obj=None): """Emulates the equivalent Django ModelAdmin method. :param request: the current request. :param obj: the object is being viewed. :type request: WSGIRequest :type obj: None :return: `False` """ return False def urls(self): """Sets up the required urlconf for the admin views.""" try: # > 1.5 from django.conf.urls import patterns, url except ImportError as e: # < 1.5 from django.conf.urls.defaults import patterns, url def wrap(view): def wrapper(*args, **kwargs): return self.admin_site.admin_view(view)(*args, **kwargs) return update_wrapper(wrapper, view) if hasattr(self.model._meta, "model_name"): model_key = self.model._meta.model_name else: model_key = self.model._meta.module_name return patterns( "", url( regex=r"^(?P<content_type>.+)/(?P<pk>.+)/$", view=wrap(self.view), name="%s_%s_change" % (self.model._meta.app_label, model_key), ), url( regex=r"^$", view=wrap(self.index), name="%s_%s_changelist" % (self.model._meta.app_label, model_key), ), ) urls = property(urls) def get_results_per_page(self, request): """Allows for overriding the number of results shown. This differs from the usual way a ModelAdmin may declare pagination via ``list_per_page`` and instead looks in Django's ``LazySettings`` object for the item ``HAYSTACK_SEARCH_RESULTS_PER_PAGE``. If it's not found, falls back to **20**. :param request: the current request. :type request: WSGIRequest :return: The number of results to show, per page. """ return getattr( settings, "HAYSTACK_SEARCH_RESULTS_PER_PAGE", ModelAdmin.list_per_page ) def get_paginator_var(self, request): """Provides the name of the variable used in query strings to discover what page is being requested. Uses the same ``PAGE_VAR`` as the standard :py:class:`django.contrib.admin.views.main.ChangeList <django:django.contrib.admin.views.ChangeList>` :param request: the current request. :type request: WSGIRequest :return: the name of the variable used in query strings for pagination. """ return PAGE_VAR def get_search_var(self, request): """Provides the name of the variable used in query strings to discover what text search has been requested. Uses the same ``SEARCH_VAR`` as the standard :py:class:`django.contrib.admin.views.main.ChangeList <django:django.contrib.admin.views.ChangeList>` :param request: the current request. :type request: WSGIRequest :return: the name of the variable used in query strings for text searching. """ return SEARCH_VAR def get_searchresult_wrapper(self): """This method serves as a hook for potentially overriding which class is used for wrapping each result into a value object for display. :return: class for wrapping search results. Defaults to :py:class:`~haystackbrowser.models.SearchResultWrapper` """ return SearchResultWrapper def get_wrapped_search_results(self, object_list): """Wraps each :py:class:`~haystack.models.SearchResult` from the :py:class:`~haystack.query.SearchQuerySet` in our own value object, whose responsibility is providing additional attributes required for display. :param object_list: :py:class:`~haystack.models.SearchResult` objects. :return: list of items wrapped with whatever :py:meth:`~haystackbrowser.admin.HaystackResultsAdmin.get_searchresult_wrapper` provides. """ klass = self.get_searchresult_wrapper() return tuple(klass(x, self.admin_site.name) for x in object_list) def get_current_query_string(self, request, add=None, remove=None): """Method to return a querystring with modified parameters. :param request: the current request. :type request: WSGIRequest :param add: items to be added. :type add: dictionary :param remove: items to be removed. :type remove: dictionary :return: the new querystring. """ return get_query_string(request.GET, new_params=add, remove=remove) def get_settings(self): """Find all Django settings prefixed with ``HAYSTACK_`` :return: dictionary whose keys are setting names (tidied up). """ return get_haystack_settings() def do_render(self, request, template_name, context): if UPGRADED_RENDER: return TemplateResponse( request=request, template=template_name, context=context ) else: return render_to_response( template_name=template_name, context=context, context_instance=RequestContext(request), ) def index(self, request): """The view for showing all the results in the Haystack index. Emulates the standard Django ChangeList mostly. :param request: the current request. :type request: WSGIRequest :return: A template rendered into an HttpReponse """ if not self.has_change_permission(request, None): raise PermissionDenied("Not a superuser") page_var = self.get_paginator_var(request) form = PreSelectedModelSearchForm(request.GET or None, load_all=False) minimum_page = form.fields[page_var].min_value # Make sure there are some models indexed available_models = model_choices() if len(available_models) <= 0: raise Search404("No search indexes bound via Haystack") # We've not selected any models, so we're going to redirect and select # all of them. This will bite me in the ass if someone searches for a string # but no models, but I don't know WTF they'd expect to return, anyway. # Note that I'm only doing this to sidestep this issue: # https://gist.github.com/3766607 if "models" not in list(request.GET.keys()): # TODO: make this betterererer. new_qs = ["&models=%s" % x[0] for x in available_models] # if we're in haystack2, we probably want to provide the 'default' # connection so that it behaves as if "initial" were in place. if form.has_multiple_connections(): new_qs.append("&connection=" + form.fields["connection"].initial) new_qs = "".join(new_qs) existing_query = request.GET.copy() if page_var in existing_query: existing_query.pop(page_var) existing_query[page_var] = minimum_page location = "%(path)s?%(existing_qs)s%(new_qs)s" % { "existing_qs": existing_query.urlencode(), "new_qs": new_qs, "path": request.path_info, } return HttpResponseRedirect(location) sqs = form.search() cleaned_GET = form.cleaned_data_querydict try: page_no = int(cleaned_GET.get(PAGE_VAR, minimum_page)) except ValueError: page_no = minimum_page results_per_page = self.get_results_per_page(request) paginator = Paginator(sqs, results_per_page) try: page = paginator.page(page_no + 1) except (InvalidPage, ValueError): # paginator.page may raise InvalidPage if we've gone too far # meanwhile, casting the querystring parameter may raise ValueError # if it's None, or '', or other silly input. raise Search404("Invalid page") query = request.GET.get(self.get_search_var(request), None) connection = request.GET.get("connection", None) title = self.model._meta.verbose_name_plural wrapped_facets = FacetWrapper( sqs.facet_counts(), querydict=form.cleaned_data_querydict.copy() ) context = { "results": self.get_wrapped_search_results(page.object_list), "pagination_required": page.has_other_pages(), # this may be expanded into xrange(*page_range) to copy what # the paginator would yield. This prevents 50000+ pages making # the page slow to render because of django-debug-toolbar. "page_range": (1, paginator.num_pages + 1), "page_num": page.number, "result_count": paginator.count, "opts": self.model._meta, "title": force_text(title), "root_path": getattr(self.admin_site, "root_path", None), "app_label": self.model._meta.app_label, "filtered": True, "form": form, "form_valid": form.is_valid(), "query_string": self.get_current_query_string(request, remove=[page_var]), "search_model_count": len(cleaned_GET.getlist("models")), "search_facet_count": len(cleaned_GET.getlist("possible_facets")), "search_var": self.get_search_var(request), "page_var": page_var, "facets": wrapped_facets, "applied_facets": form.applied_facets(), "module_name": force_text(self.model._meta.verbose_name_plural), "cl": FakeChangeListForPaginator( request, page, results_per_page, self.model._meta ), "haystack_version": _haystack_version, # Note: the empty Media object isn't specficially required for the # standard Django admin, but is apparently a pre-requisite for # things like Grappelli. # See #1 (https://github.com/kezabelle/django-haystackbrowser/pull/1) "media": Media(), } return self.do_render( request=request, template_name="admin/haystackbrowser/result_list.html", context=context, ) def view(self, request, content_type, pk): """The view for showing the results of a single item in the Haystack index. :param request: the current request. :type request: WSGIRequest :param content_type: ``app_label`` and ``model_name`` as stored in Haystack, separated by "." :type content_type: string. :param pk: the object identifier stored in Haystack :type pk: string. :return: A template rendered into an HttpReponse """ if not self.has_change_permission(request, None): raise PermissionDenied("Not a superuser") query = {DJANGO_ID: pk, DJANGO_CT: content_type} try: raw_sqs = SearchQuerySet().filter(**query)[:1] wrapped_sqs = self.get_wrapped_search_results(raw_sqs) sqs = wrapped_sqs[0] except IndexError: raise Search404( "Search result using query {q!r} does not exist".format(q=query) ) except SearchBackendError as e: raise Search404("{exc!r} while trying query {q!r}".format(q=query, exc=e)) more_like_this = () # the model may no longer be in the database, instead being only backed # by the search backend. model_instance = sqs.object.object if model_instance is not None: raw_mlt = SearchQuerySet().more_like_this(model_instance)[:5] more_like_this = self.get_wrapped_search_results(raw_mlt) form = PreSelectedModelSearchForm(request.GET or None, load_all=False) form_valid = form.is_valid() context = { "original": sqs, "title": _("View stored data for this %s") % force_text(sqs.verbose_name), "app_label": self.model._meta.app_label, "module_name": force_text(self.model._meta.verbose_name_plural), "haystack_settings": self.get_settings(), "has_change_permission": self.has_change_permission(request, sqs), "similar_objects": more_like_this, "haystack_version": _haystack_version, "form": form, "form_valid": form_valid, } return self.do_render( request=request, template_name="admin/haystackbrowser/view.html", context=context, ) admin.site.register(HaystackResults, HaystackResultsAdmin)
#!/usr/bin/env python # -*- coding: utf-8 -*- # import sys sys.path.append(".") from pelicanconf import * SITEURL = "http://magically.us" FEED_DOMAIN = SITEURL PLUGINS.append("gist_comments") DELETE_OUTPUT_DIRECTORY = True # Uncomment following line for absolute URLs in production: # RELATIVE_URLS = False GOOGLE_ANALYTICS = "UA-24062285-2"
from fcntl import flock, LOCK_EX, LOCK_UN class LockingException(Exception): pass class FileLock(object): def __init__(self, name, mode="rw+"): self.name = name self.fd = open(name, mode) def acquire(self): flock(self.fd.fileno(), LOCK_EX) def release(self): flock(self.fd.fileno(), LOCK_UN) self.fd.close() self.fd = None def __enter__(self): self.acquire() # flock is blocking, so there's no need to handle a timeout return self def __exit__(self, type, value, traceback): self.release()
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Event.require_photo' db.add_column( "org_event", "require_photo", self.gf("django.db.models.fields.BooleanField")(default=True), keep_default=True, ) def backwards(self, orm): # Deleting field 'Event.require_photo' db.delete_column("org_event", "require_photo") models = { "auth.group": { "Meta": {"object_name": "Group"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ( "django.db.models.fields.CharField", [], {"unique": "True", "max_length": "80"}, ), "permissions": ( "django.db.models.fields.related.ManyToManyField", [], { "to": "orm['auth.Permission']", "symmetrical": "False", "blank": "True", }, ), }, "auth.permission": { "Meta": { "ordering": "('content_type__app_label', 'content_type__model', 'codename')", "unique_together": "(('content_type', 'codename'),)", "object_name": "Permission", }, "codename": ( "django.db.models.fields.CharField", [], {"max_length": "100"}, ), "content_type": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['contenttypes.ContentType']"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "50"}), }, "auth.user": { "Meta": {"object_name": "User"}, "date_joined": ( "django.db.models.fields.DateTimeField", [], {"default": "datetime.datetime.now"}, ), "email": ( "django.db.models.fields.EmailField", [], {"max_length": "75", "blank": "True"}, ), "first_name": ( "django.db.models.fields.CharField", [], {"max_length": "30", "blank": "True"}, ), "groups": ( "django.db.models.fields.related.ManyToManyField", [], {"to": "orm['auth.Group']", "symmetrical": "False", "blank": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "is_active": ( "django.db.models.fields.BooleanField", [], {"default": "True"}, ), "is_staff": ( "django.db.models.fields.BooleanField", [], {"default": "False"}, ), "is_superuser": ( "django.db.models.fields.BooleanField", [], {"default": "False"}, ), "last_login": ( "django.db.models.fields.DateTimeField", [], {"default": "datetime.datetime.now"}, ), "last_name": ( "django.db.models.fields.CharField", [], {"max_length": "30", "blank": "True"}, ), "password": ( "django.db.models.fields.CharField", [], {"max_length": "128"}, ), "user_permissions": ( "django.db.models.fields.related.ManyToManyField", [], { "to": "orm['auth.Permission']", "symmetrical": "False", "blank": "True", }, ), "username": ( "django.db.models.fields.CharField", [], {"unique": "True", "max_length": "30"}, ), }, "contenttypes.contenttype": { "Meta": { "ordering": "('name',)", "unique_together": "(('app_label', 'model'),)", "object_name": "ContentType", "db_table": "'django_content_type'", }, "app_label": ( "django.db.models.fields.CharField", [], {"max_length": "100"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "model": ("django.db.models.fields.CharField", [], {"max_length": "100"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}), }, "mercenaries.costcenter": { "Meta": {"object_name": "CostCenter"}, "code": ( "django.db.models.fields.IntegerField", [], {"null": "True", "blank": "True"}, ), "description": ( "django.db.models.fields.CharField", [], {"max_length": "300"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "200"}), "wage_per_hour": ( "django.db.models.fields.DecimalField", [], {"max_digits": "5", "decimal_places": "2"}, ), }, "mercenaries.salarytype": { "Meta": {"object_name": "SalaryType"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "200"}), }, "org.category": { "Meta": {"object_name": "Category"}, "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}), "note": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), }, "org.diary": { "Meta": {"object_name": "Diary"}, "author": ( "django.db.models.fields.related.ForeignKey", [], {"related_name": "'diary_author'", "to": "orm['auth.User']"}, ), "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "date": ( "django.db.models.fields.DateTimeField", [], {"default": "datetime.date(2010, 12, 17)", "db_index": "True"}, ), "event": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Event']", "null": "True", "blank": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "length": ( "django.db.models.fields.TimeField", [], {"default": "datetime.time(4, 0)"}, ), "log_formal": ("django.db.models.fields.TextField", [], {}), "log_informal": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "tags": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Tag']", "null": "True", "blank": "True", }, ), "task": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Project']"}, ), }, "org.email": { "Meta": {"object_name": "Email"}, "email": ("django.db.models.fields.EmailField", [], {"max_length": "75"}), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), }, "org.emailblacklist": { "Meta": {"object_name": "EmailBlacklist"}, "blacklisted": ( "django.db.models.fields.EmailField", [], {"unique": "True", "max_length": "75", "db_index": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), }, "org.event": { "Meta": {"ordering": "('title',)", "object_name": "Event"}, "announce": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), "category": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Category']"}, ), "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "emails": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Email']", "null": "True", "blank": "True", }, ), "end_date": ( "django.db.models.fields.DateTimeField", [], {"null": "True", "blank": "True"}, ), "event_image": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.IntranetImage']", "null": "True", "blank": "True"}, ), "flickr_set_id": ( "django.db.models.fields.BigIntegerField", [], {"null": "True", "blank": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "language": ( "django.db.models.fields.CharField", [], {"default": "'sl'", "max_length": "2", "null": "True", "blank": "True"}, ), "length": ("django.db.models.fields.TimeField", [], {}), "note": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), "place": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Place']"}, ), "project": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Project']"}, ), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "public": ("django.db.models.fields.BooleanField", [], {"default": "True"}), "require_photo": ( "django.db.models.fields.BooleanField", [], {"default": "False"}, ), "require_technician": ( "django.db.models.fields.BooleanField", [], {"default": "False"}, ), "require_video": ( "django.db.models.fields.BooleanField", [], {"default": "False"}, ), "responsible": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['auth.User']"}, ), "sequence": ( "django.db.models.fields.PositiveIntegerField", [], {"default": "0"}, ), "short_announce": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), "slides": ( "django.db.models.fields.files.FileField", [], {"max_length": "100", "null": "True", "blank": "True"}, ), "slug": ( "django.db.models.fields.SlugField", [], { "db_index": "True", "max_length": "150", "null": "True", "blank": "True", }, ), "start_date": ( "django.db.models.fields.DateTimeField", [], {"db_index": "True"}, ), "tags": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Tag']", "null": "True", "blank": "True", }, ), "technician": ( "django.db.models.fields.related.ManyToManyField", [], { "blank": "True", "related_name": "'event_technican'", "null": "True", "symmetrical": "False", "to": "orm['auth.User']", }, ), "title": ("django.db.models.fields.CharField", [], {"max_length": "100"}), "visitors": ( "django.db.models.fields.IntegerField", [], {"default": "0", "null": "True", "blank": "True"}, ), }, "org.intranetimage": { "Meta": {"ordering": "('-image',)", "object_name": "IntranetImage"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "image": ( "django.db.models.fields.files.ImageField", [], {"max_length": "100"}, ), "md5": ( "django.db.models.fields.CharField", [], { "db_index": "True", "unique": "True", "max_length": "32", "blank": "True", }, ), "title": ("django.db.models.fields.CharField", [], {"max_length": "255"}), }, "org.kb": { "Meta": {"object_name": "KB"}, "category": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.KbCategory']"}, ), "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "content": ("django.db.models.fields.TextField", [], {}), "editor": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['auth.User']"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "project": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Project']", "null": "True", "blank": "True", }, ), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "slug": ( "django.db.models.fields.SlugField", [], {"max_length": "75", "db_index": "True"}, ), "task": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Task']", "null": "True", "blank": "True", }, ), "title": ("django.db.models.fields.CharField", [], {"max_length": "150"}), }, "org.kbcategory": { "Meta": {"object_name": "KbCategory"}, "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "slug": ( "django.db.models.fields.SlugField", [], {"max_length": "75", "db_index": "True"}, ), "title": ("django.db.models.fields.CharField", [], {"max_length": "150"}), }, "org.lend": { "Meta": {"object_name": "Lend"}, "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "contact_info": ( "django.db.models.fields.CharField", [], {"max_length": "100", "null": "True", "blank": "True"}, ), "due_date": ( "django.db.models.fields.DateField", [], {"default": "datetime.date(2010, 12, 18)"}, ), "from_date": ( "django.db.models.fields.DateField", [], {"default": "datetime.date(2010, 12, 17)"}, ), "from_who": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['auth.User']"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "note": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "returned": ( "django.db.models.fields.BooleanField", [], {"default": "False"}, ), "to_who": ( "django.db.models.fields.CharField", [], {"max_length": "200", "null": "True", "blank": "True"}, ), "what": ("django.db.models.fields.CharField", [], {"max_length": "200"}), "why": ( "django.db.models.fields.CharField", [], {"max_length": "200", "null": "True", "blank": "True"}, ), }, "org.organization": { "Meta": {"object_name": "Organization"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "organization": ( "django.db.models.fields.CharField", [], {"max_length": "100"}, ), }, "org.person": { "Meta": {"ordering": "('name',)", "object_name": "Person"}, "email": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Email']", "null": "True", "blank": "True", }, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}), "note": ( "django.db.models.fields.CharField", [], {"max_length": "230", "null": "True", "blank": "True"}, ), "organization": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Organization']", "null": "True", "blank": "True", }, ), "phone": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Phone']", "null": "True", "blank": "True", }, ), "role": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Role']", "null": "True", "blank": "True", }, ), "title": ( "django.db.models.fields.CharField", [], {"max_length": "100", "null": "True", "blank": "True"}, ), }, "org.phone": { "Meta": {"object_name": "Phone"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "phone": ("django.db.models.fields.CharField", [], {"max_length": "100"}), }, "org.place": { "Meta": {"object_name": "Place"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}), "note": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), }, "org.project": { "Meta": {"ordering": "('name',)", "object_name": "Project"}, "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "cost_center": ( "django.db.models.fields.related.ForeignKey", [], { "to": "orm['mercenaries.CostCenter']", "null": "True", "blank": "True", }, ), "email": ( "django.db.models.fields.EmailField", [], {"max_length": "75", "null": "True", "blank": "True"}, ), "email_members": ( "django.db.models.fields.NullBooleanField", [], {"default": "True", "null": "True", "blank": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}), "note": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), "parent": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Project']", "null": "True", "blank": "True"}, ), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "responsible": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['auth.User']", "null": "True", "blank": "True"}, ), "salary_rate": ( "django.db.models.fields.FloatField", [], {"null": "True", "blank": "True"}, ), "salary_type": ( "django.db.models.fields.related.ForeignKey", [], { "to": "orm['mercenaries.SalaryType']", "null": "True", "blank": "True", }, ), "verbose_name": ( "django.db.models.fields.CharField", [], {"max_length": "255", "null": "True", "blank": "True"}, ), }, "org.projectaudit": { "Meta": { "ordering": "['-_audit_timestamp']", "object_name": "ProjectAudit", "db_table": "'org_project_audit'", }, "_audit_change_type": ( "django.db.models.fields.CharField", [], {"max_length": "1"}, ), "_audit_id": ( "django.db.models.fields.AutoField", [], {"primary_key": "True"}, ), "_audit_timestamp": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "db_index": "True", "blank": "True"}, ), "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "cost_center": ( "django.db.models.fields.related.ForeignKey", [], { "to": "orm['mercenaries.CostCenter']", "null": "True", "blank": "True", }, ), "email": ( "django.db.models.fields.EmailField", [], {"max_length": "75", "null": "True", "blank": "True"}, ), "email_members": ( "django.db.models.fields.NullBooleanField", [], {"default": "True", "null": "True", "blank": "True"}, ), "id": ("django.db.models.fields.IntegerField", [], {"db_index": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}), "note": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), "parent": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Project']", "null": "True", "blank": "True"}, ), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "responsible": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['auth.User']", "null": "True", "blank": "True"}, ), "salary_rate": ( "django.db.models.fields.FloatField", [], {"null": "True", "blank": "True"}, ), "salary_type": ( "django.db.models.fields.related.ForeignKey", [], { "to": "orm['mercenaries.SalaryType']", "null": "True", "blank": "True", }, ), "verbose_name": ( "django.db.models.fields.CharField", [], {"max_length": "255", "null": "True", "blank": "True"}, ), }, "org.role": { "Meta": {"object_name": "Role"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "role": ("django.db.models.fields.CharField", [], {"max_length": "100"}), }, "org.scratchpad": { "Meta": {"object_name": "Scratchpad"}, "author": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['auth.User']"}, ), "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "content": ("django.db.models.fields.TextField", [], {}), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), }, "org.shopping": { "Meta": {"object_name": "Shopping"}, "author": ( "django.db.models.fields.related.ForeignKey", [], {"related_name": "'shopping_author'", "to": "orm['auth.User']"}, ), "bought": ( "django.db.models.fields.BooleanField", [], {"default": "False"}, ), "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "cost": ( "django.db.models.fields.DecimalField", [], { "null": "True", "max_digits": "10", "decimal_places": "2", "blank": "True", }, ), "explanation": ("django.db.models.fields.TextField", [], {}), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}), "project": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Project']", "null": "True", "blank": "True", }, ), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "responsible": ( "django.db.models.fields.related.ForeignKey", [], { "blank": "True", "related_name": "'shopping_responsible'", "null": "True", "to": "orm['auth.User']", }, ), "supporters": ( "django.db.models.fields.related.ManyToManyField", [], { "blank": "True", "related_name": "'shopping_supporters'", "null": "True", "symmetrical": "False", "to": "orm['auth.User']", }, ), "tags": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Tag']", "null": "True", "blank": "True", }, ), }, "org.sodelovanje": { "Meta": { "ordering": "('-event__start_date',)", "object_name": "Sodelovanje", }, "event": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Event']", "null": "True", "blank": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "note": ( "django.db.models.fields.TextField", [], {"null": "True", "blank": "True"}, ), "person": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Person']"}, ), "project": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Project']", "null": "True", "blank": "True"}, ), "tip": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.TipSodelovanja']", "null": "True", "blank": "True"}, ), }, "org.stickynote": { "Meta": {"object_name": "StickyNote"}, "author": ( "django.db.models.fields.related.ForeignKey", [], {"related_name": "'message_author'", "to": "orm['auth.User']"}, ), "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "due_date": ( "django.db.models.fields.DateField", [], {"default": "datetime.date(2010, 12, 22)"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "note": ("django.db.models.fields.TextField", [], {}), "post_date": ( "django.db.models.fields.DateField", [], {"default": "datetime.date(2010, 12, 17)"}, ), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "tags": ( "django.db.models.fields.related.ManyToManyField", [], { "symmetrical": "False", "to": "orm['org.Tag']", "null": "True", "blank": "True", }, ), }, "org.tag": { "Meta": {"object_name": "Tag"}, "font_size": ( "django.db.models.fields.IntegerField", [], {"default": "0", "blank": "True"}, ), "name": ( "django.db.models.fields.CharField", [], {"max_length": "200", "primary_key": "'True'"}, ), "parent": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['org.Tag']", "null": "True", "blank": "True"}, ), "total_ref": ( "django.db.models.fields.IntegerField", [], {"default": "0", "blank": "True"}, ), }, "org.task": { "Meta": {"object_name": "Task"}, "chg_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now": "True", "blank": "True"}, ), "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "note": ("django.db.models.fields.TextField", [], {"blank": "True"}), "pub_date": ( "django.db.models.fields.DateTimeField", [], {"auto_now_add": "True", "blank": "True"}, ), "responsible": ( "django.db.models.fields.related.ForeignKey", [], {"to": "orm['auth.User']", "null": "True", "blank": "True"}, ), "title": ("django.db.models.fields.CharField", [], {"max_length": "100"}), }, "org.tipsodelovanja": { "Meta": {"object_name": "TipSodelovanja"}, "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}), "name": ("django.db.models.fields.CharField", [], {"max_length": "40"}), }, } complete_apps = ["org"]
from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.conf import settings from django.conf.urls.i18n import i18n_patterns from django.views.generic import ListView, TemplateView from feedjack.models import Post urlpatterns = patterns( "", (r"^intranet/", include("intranet.org.urls")), (r"^i18n/", include("django.conf.urls.i18n")), (r"^jsi18n/$", "django.views.i18n.javascript_catalog"), (r"^grappelli/", include("grappelli.urls")), (r"^tinymce/", include("tinymce.urls")), (r"^services/ltsp/", include("pipa.ltsp.urls")), url(r"^comments/", include("django.contrib.comments.urls")), url(r"^comments/post/$", "django.contrib.comments.views.comments.post_comment"), url( r"^ajax/index/events/$", "intranet.www.views.ajax_index_events", name="ajax_events", ), url( r"^ajax/index/events/(?P<year>\d{4})/(?P<week>\d+)/$", "intranet.www.views.ajax_index_events", name="ajax_events_week", ), url( r"^ajax/add_mail/(?P<event>[0-9]+)/(?P<email>[^/]*)$", "intranet.www.views.ajax_add_mail", ), url( r"^ajax/subscribe_mailinglist/", "intranet.www.views.ajax_subscribe_mailinglist", name="ajax_subscribe_mailinglist", ), url(r"^rss/$", TemplateView.as_view(template_name="www/rss.html"), name="rss"), ) urlpatterns += i18n_patterns( "", (r"^", include("intranet.www.urls")), (r"^gallery/", include("pipa.gallery.urls")), ( r"^planet/", ListView.as_view(queryset=Post.objects.order_by("-date_modified")[:30]), ), ) if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.db import models class Usage(models.Model): count = models.CommaSeparatedIntegerField(max_length=200) time = models.DateTimeField() def __unicode__(self): return "LTSP usage: %s %s" % (self.time, self.count)
"""airbrake-flask - Airbrake client for Python Flask airbrake-flask is a fast library that use the amazing requests library to send error, exception messages to airbrake.io. You can use this library with the amazing gevent library to send your request asynchronously. Example Usage with gevent ------------------------- from flask import Flask, request, got_request_exception from airbrake.airbrake import AirbrakeErrorHandler import gevent import sys app = Flask(__name__) ENV = ('ENV' in os.environ and os.environ['ENV']) or 'prod' def log_exception(error): handler = AirbrakeErrorHandler(api_key="PUT_YOUR_AIRBRAKE_KEY_HERE", env_name=ENV, request=request) gevent.spawn(handler.emit, error, sys.exc_info()) got_request_exception.connect(log_exception, app) Contribute ---------- This library is hosted on Github and you can contribute there: http://github.com/kienpham2000/airbrake-flask """ classifiers = """\ Development Status :: 5 - Production/Stable Environment :: Console Intended Audience :: Developers License :: OSI Approved :: MIT License Operating System :: OS Independent Programming Language :: Python :: 2 Topic :: Software Development :: Quality Assurance Topic :: Software Development :: Testing """.splitlines() from setuptools import setup from airbrake import __version__, __app_url__, __app_name__ doc = __doc__.splitlines() setup( name=__app_name__, version=__version__, packages=["airbrake"], zip_safe=False, author="Kien Pham, Kane Kim", author_email="kien@calolo.com", url=__app_url__, license="MIT", description=doc[0], long_description="\n".join(doc[2:]), install_requires=["requests", "six"], extras_require={"test": ["nose", "coverage", "mock", "blinker", "Flask", "gevent"]}, test_suite="tests", keywords="error airbrake flask exception", classifiers=classifiers, )
'\nContains tests for the timer metric.\n' from statsite.metrics import Timer class TestTimerMetric(object): def test_fold_sum(self): '\n Tests that folding generates a sum of the timers.\n ' now = 10 metrics = [('k', 10), ('k', 15), ('j', 7.4), ('j', 8.6)] result = (metrics, now) if (not (('timers.k.sum', 25, now) == ('timers.k.sum', result))): raise () if (not (('timers.j.sum', 16.0, now) == ('timers.j.sum', result))): raise () def test_fold_mean(self): '\n Tests that the mean is properly generated for the\n timers.\n ' now = 10 metrics = [('k', 10), ('k', 15), ('j', 7), ('j', 8)] result = (metrics, now) if (not (('timers.k.mean', 12.5, now) == ('timers.k.mean', result))): raise () if (not (('timers.j.mean', 7.5, now) == ('timers.j.mean', result))): raise () def test_fold_lower(self): '\n Tests that the lower bound for the timers is properly computed.\n ' now = 10 metrics = [('k', 10), ('k', 15), ('j', 7.9), ('j', 8)] result = (metrics, now) if (not (('timers.k.lower', 10, now) == ('timers.k.lower', result))): raise () if (not (('timers.j.lower', 7.9, now) == ('timers.j.lower', result))): raise () def test_fold_upper(self): '\n Tests that the upper bound for the timers is properly computed.\n ' now = 10 metrics = [('k', 10), ('k', 15), ('j', 7.9), ('j', 8)] result = (metrics, now) if (not (('timers.k.upper', 15, now) == ('timers.k.upper', result))): raise () if (not (('timers.j.upper', 8, now) == ('timers.j.upper', result))): raise () def test_fold_count(self): '\n Tests the counter of timers is properly computed.\n ' now = 10 metrics = [('k', 10), ('k', 15), ('j', 7.9), ('j', 8)] result = (metrics, now) if (not (('timers.k.count', 2, now) == ('timers.k.count', result))): raise () if (not (('timers.j.count', 2, now) == ('timers.j.count', result))): raise () def test_fold_stdev(self): '\n Tests the standard deviations of counters is properly computed.\n ' now = 10 metrics = [('k', 10), ('k', 15), ('j', 7.9), ('j', 8)] result = (metrics, now) if (not (('timers.k.stdev', ([10, 15], 12.5), now) == ('timers.k.stdev', result))): raise () if (not (('timers.j.stdev', ([7.9, 8], 7.95), now) == ('timers.j.stdev', result))): raise () def test_sum_percentile(self): '\n Tests the percentile sum is properly counted.\n ' now = 10 result = (self._100_timers, now) if (not (('timers.k.sum_90', 4545, now) == ('timers.k.sum_90', result))): raise () def test_mean_percentile(self): '\n Tests the percentile sum is properly counted.\n ' now = 10 result = (self._100_timers, now) if (not (('timers.k.mean_90', 50, now) == ('timers.k.mean_90', result))): raise () def test_stdev(self): '\n Tests that the standard deviation is properly computed.\n ' numbers = [0.331002, 0.591082, 0.668996, 0.422566, 0.458904, 0.868717, 0.30459, 0.513035, 0.900689, 0.655826] average = ((numbers) / (numbers)) if (not (((0.205767 * 10000)) == (((numbers, average) * 10000)))): raise () def _get_metric(self, key, metrics): '\n This will extract a specific metric out of an array of metrics.\n ' for metric in metrics: if (metric[0] == key): return metric return None @property def _100_timers(self): result = [] for i in (1, 101): (('k', i)) return result
from scrapy import signals from scrapy.contrib.exporter import CsvItemExporter, JsonItemExporter class ExportData(object): def __init__(self): self.files = {} self.exporter = None @classmethod def from_crawler(cls, crawler): pipeline = cls() crawler.signals.connect(pipeline.spider_opened, signals.spider_opened) crawler.signals.connect(pipeline.spider_closed, signals.spider_closed) return pipeline def spider_opened(self, spider): raise NotImplementedError def spider_closed(self, spider): self.exporter.finish_exporting() file_to_save = self.files.pop(spider) file_to_save.close() def process_item(self, item, spider): self.exporter.export_item(item) return item class ExportCSV(ExportData): """ Exporting to export/csv/spider-name.csv file """ def spider_opened(self, spider): file_to_save = open("exports/csv/%s.csv" % spider.name, "w+b") self.files[spider] = file_to_save self.exporter = CsvItemExporter(file_to_save) self.exporter.start_exporting() class ExportJSON(ExportData): """ Exporting to export/json/spider-name.json file """ def spider_opened(self, spider): file_to_save = open("exports/json/%s.json" % spider.name, "w+b") self.files[spider] = file_to_save self.exporter = JsonItemExporter(file_to_save) self.exporter.start_exporting()
#!/usr/bin/env python3 # coding: utf-8 import os, sys, unittest, collections, copy, re print(sys.version) sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) from watchtower import * from eight import * class TestPyCWL(unittest.TestCase): def setUp(self): pass def test_basic_pycwl_statements(self): h = CloudWatchLogHandler() loggers = [] for i in range(5): logger = logging.getLogger("logger{}".format(i)) logger.addHandler(h) # logger.addHandler(CloudWatchLogHandler(use_queues=False)) loggers.append(logger) for i in range(10001): for logger in loggers: logger.error("test") import time time.sleep(1) for i in range(9000): for logger in loggers: logger.error("test") for i in range(1001): for logger in loggers: logger.error("test") def test_flush_safing(self): handler = CloudWatchLogHandler() logger = logging.getLogger("l") logger.addHandler(handler) handler.flush() logger.critical("msg") def test_json_logging(self): handler = CloudWatchLogHandler() logger = logging.getLogger("json") logger.addHandler(handler) for i in range(10): logger.critical( dict(src="foo", event=str(i), stack=[1, 2, 3, i], details={}) ) def test_multiple_handlers(self): # FIXME: multiple active CloudWatchLogHandlers cause daemon thread crashes at exit. This can probably be fixed with thread locals. pass if __name__ == "__main__": unittest.main()
'\nBuildozer\n=========\n\nGeneric Python packager for Android / iOS. Desktop later.\n\n' __version__ = '0.32dev' import os import re import sys import zipfile import select import codecs from buildozer.jsonstore import JsonStore from sys import stdout, stderr, exit from re import search from os.path import join, exists, dirname, realpath, splitext, expanduser from subprocess import Popen, PIPE from os import environ, unlink, rename, walk, sep, listdir, makedirs from copy import copy from shutil import copyfile, rmtree, copytree from fnmatch import fnmatch try: from urllib.request import FancyURLopener from configparser import SafeConfigParser except ImportError: from urllib.request import FancyURLopener from configparser import SafeConfigParser try: import fcntl except ImportError: fcntl = None try: import colorama () RESET_SEQ = (colorama.Fore.RESET + colorama.Style.RESET_ALL) COLOR_SEQ = (lambda x: x) BOLD_SEQ = '' if (sys.platform == 'win32'): BLACK = (colorama.Fore.BLACK + colorama.Style.DIM) else: BLACK = (colorama.Fore.BLACK + colorama.Style.BRIGHT) RED = colorama.Fore.RED BLUE = colorama.Fore.CYAN USE_COLOR = ('NO_COLOR' not in environ) except ImportError: if (sys.platform != 'win32'): RESET_SEQ = '\x1b[0m' COLOR_SEQ = (lambda x: ((30 + x))) BOLD_SEQ = '\x1b[1m' BLACK = 0 RED = 1 BLUE = 4 USE_COLOR = ('NO_COLOR' not in environ) else: RESET_SEQ = '' COLOR_SEQ = '' BOLD_SEQ = '' RED = BLUE = BLACK = 0 USE_COLOR = False LOG_LEVELS_C = (RED, BLUE, BLACK) LOG_LEVELS_T = 'EID' SIMPLE_HTTP_SERVER_PORT = 8000 IS_PY3 = (sys.version_info[0] >= 3) class ChromeDownloader(FancyURLopener): version = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36' urlretrieve = ().retrieve class BuildozerException(Exception): '\n Exception raised for general situations buildozer cannot process.\n ' pass class BuildozerCommandException(BuildozerException): '\n Exception raised when an external command failed.\n\n See: `Buildozer.cmd()`.\n ' pass class Buildozer(object): standard_cmds = ('distclean', 'update', 'debug', 'release', 'deploy', 'run', 'serve') def __init__(self, filename='buildozer.spec', target=None): () self.log_level = 1 self.environ = {} self.specfilename = filename self.state = None self.build_id = None self.config_profile = '' self.config = () self.config.optionxform = (lambda value: value) self.config.getlist = self._get_config_list self.config.getlistvalues = self._get_config_list_values self.config.getdefault = self._get_config_default self.config.getbooldefault = self._get_config_bool if (filename): (filename) () (self.config) try: self.log_level = (('buildozer', 'log_level', '1')) except: raise self.builddir = ('buildozer', 'builddir', None) self.targetname = None self.target = None if target: (target) def set_target(self, target): 'Set the target to use (one of buildozer.targets, such as "android")' self.targetname = target m = ((target)) self.target = (self) () () def prepare_for_build(self): 'Prepare the build.' if (not (self.target is not None)): raise () if (self.target, '_build_prepared'): return ('Preparing build') ((self.targetname)) () ('Install platform') () ('Check application requirements') () ('Check garden requirements') () ('Compile platform') () self.target._build_prepared = True def build(self): "Do the build.\n\n The target can set build_mode to 'release' or 'debug' before calling\n this method.\n\n (:meth:`prepare_for_build` must have been call before.)\n " if (not (self.target is not None)): raise () if (not (self.target, '_build_prepared')): raise () if (self.target, '_build_done'): return self.build_id = ((('cache.build_id', '0')) + 1) self.state['cache.build_id'] = (self.build_id) ((self.build_id)) () ('Package the application') () self.target._build_done = True def log(self, level, msg): if (level > self.log_level): return if USE_COLOR: color = (LOG_LEVELS_C[level]) (((RESET_SEQ, color, '# ', msg, RESET_SEQ))) else: ((LOG_LEVELS_T[level], msg)) def debug(self, msg): (2, msg) def info(self, msg): (1, msg) def error(self, msg): (0, msg) def checkbin(self, msg, fn): ((msg)) if (fn): return (fn) for dn in (':'): rfn = ((dn, fn)) if (rfn): ((rfn)) return rfn ((msg)) (1) def cmd(self, command, **kwargs): env = (environ) (self.environ) ('env', env) ('stdout', PIPE) ('stderr', PIPE) ('close_fds', True) ('shell', True) ('show_output', (self.log_level > 1)) show_output = ('show_output') get_stdout = ('get_stdout', False) get_stderr = ('get_stderr', False) break_on_error = ('break_on_error', True) sensible = ('sensible', False) if (not sensible): ((command)) elif ((command) in (list, tuple)): ((command[0])) else: ((()[0])) ((('cwd'))) if (sys.platform == 'win32'): ('close_fds', None) process = (command) fd_stdout = () fd_stderr = () if fcntl: (fd_stdout, fcntl.F_SETFL, ((fd_stdout, fcntl.F_GETFL) | os.O_NONBLOCK)) (fd_stderr, fcntl.F_SETFL, ((fd_stderr, fcntl.F_GETFL) | os.O_NONBLOCK)) ret_stdout = ([] if get_stdout else None) ret_stderr = ([] if get_stderr else None) while True: try: readx = ([fd_stdout, fd_stderr], [], [])[0] except select.error: break if (fd_stdout in readx): chunk = () if (not chunk): break if get_stdout: (chunk) if show_output: if IS_PY3: (('utf-8')) else: (chunk) if (fd_stderr in readx): chunk = () if (not chunk): break if get_stderr: (chunk) if show_output: if IS_PY3: (('utf-8')) else: (chunk) () () () if ((process.returncode != 0) and break_on_error): ((command)) ('') ('Buildozer failed to execute the last command') if (self.log_level <= 1): ('If the error is not obvious, please raise the log_level to 2') ('and retry the latest command.') else: ('The error might be hidden in the log above this error') ('Please read the full log, and search for it before') ('raising an issue with buildozer itself.') ('In case of a bug report, please add a full log with log_level = 2') raise () if ret_stdout: ret_stdout = (ret_stdout) if ret_stderr: ret_stderr = (ret_stderr) return ((('utf-8', 'ignore') if ret_stdout else None), (('utf-8') if ret_stderr else None), process.returncode) def cmd_expect(self, command, **kwargs): from pexpect import spawnu env = (environ) (self.environ) ('env', env) ('show_output', (self.log_level > 1)) sensible = ('sensible', False) show_output = ('show_output') if show_output: if IS_PY3: kwargs['logfile'] = (stdout.buffer) else: kwargs['logfile'] = (stdout) if (not sensible): ((command)) else: ((()[0])) ((('cwd'))) return (command) def check_configuration_tokens(self): "Ensure the spec file is 'correct'." ('Check configuration tokens') get = self.config.getdefault errors = [] adderror = errors.append if (not ('app', 'title', '')): ('[app] "title" is missing') if (not ('app', 'source.dir', '')): ('[app] "source.dir" is missing') package_name = ('app', 'package.name', '') if (not package_name): ('[app] "package.name" is missing') elif (package_name[0] in ((str, ((10))))): ('[app] "package.name" may not start with a number.') version = ('app', 'version', '') version_regex = ('app', 'version.regex', '') if ((not version) and (not version_regex)): ('[app] One of "version" or "version.regex" must be set') if (version and version_regex): ('[app] Conflict between "version" and "version.regex", only one can be used.') if (version_regex and (not ('app', 'version.filename', ''))): ('[app] "version.filename" is missing, required by "version.regex"') orientation = ('app', 'orientation', 'landscape') if (orientation not in ('landscape', 'portrait', 'all')): ('[app] "orientation" have an invalid value') if errors: (((errors))) for error in errors: (error) (1) def check_build_layout(self): 'Ensure the build (local and global) directory layout and files are\n ready.\n ' ('Ensure build layout') if (not (self.specfilename)): ((self.specfilename)) (1) (self.global_buildozer_dir) (self.global_cache_dir) specdir = (self.specfilename) if self.builddir: specdir = self.builddir ((specdir, '.buildozer')) ((specdir, 'bin')) (self.applibs_dir) self.state = ((self.buildozer_dir, 'state.db')) if self.targetname: target = self.targetname ((self.global_platform_dir, target, 'platform')) ((specdir, '.buildozer', target, 'platform')) ((specdir, '.buildozer', target, 'app')) def check_application_requirements(self): 'Ensure the application requirements are all available and ready to be\n packaged as well.\n ' requirements = ('app', 'requirements', '') target_available_packages = () onlyname = (lambda x: ('==')[0]) requirements = [x for x in requirements if ((x) not in target_available_packages)] if ((self.applibs_dir) and (('cache.applibs', '') == requirements)): ('Application requirements already installed, pass') return (self.applibs_dir) (self.applibs_dir) for requirement in requirements: (requirement) self.state['cache.applibs'] = requirements def _install_application_requirement(self, module): () ('Install distribute') ('curl http://python-distribute.org/distribute_setup.py | venv/bin/python') ((module)) ((self.applibs_dir, module)) def check_garden_requirements(self): 'Ensure required garden packages are available to be included.' garden_requirements = ('app', 'garden_requirements', '') if ((self.gardenlibs_dir) and (('cache.gardenlibs', '') == garden_requirements)): ('Garden requirements already installed, pass') return (self.gardenlibs_dir) if (not garden_requirements): self.state['cache.gardenlibs'] = garden_requirements return () ('pip install Kivy-Garden==0.1.1') (self.gardenlibs_dir) for requirement in garden_requirements: (requirement) self.state['cache.gardenlibs'] = garden_requirements def _install_garden_package(self, package): () ((package)) ((package)) def _ensure_virtualenv(self): if (self, 'venv'): return self.venv = (self.buildozer_dir, 'venv') if (not (self.venv)): ('virtualenv --python=python2.7 ./venv') output = ('bash -c "source venv/bin/activate && env"') self.env_venv = (self.environ) for line in (): args = ('=', 1) if ((args) != 2): continue (key, value) = args if (key in ('VIRTUAL_ENV', 'PATH')): self.env_venv[key] = value if ('PYTHONHOME' in self.env_venv): del self.env_venv['PYTHONHOME'] self.env_venv['CC'] = '/bin/false' self.env_venv['CXX'] = '/bin/false' def mkdir(self, dn): if (dn): return ((dn)) (dn) def rmdir(self, dn): if (not (dn)): return ((dn)) (dn) def file_matches(self, patterns): from glob import glob result = [] for pattern in patterns: matches = ((())) if (not matches): return (matches) return result def file_exists(self, *args): return ((*args)) def file_rename(self, source, target, cwd=None): if cwd: source = (cwd, source) target = (cwd, target) ((source, target)) if (not ((target))): ((source, target, (target))) (source, target) def file_copy(self, source, target, cwd=None): if cwd: source = (cwd, source) target = (cwd, target) ((source, target)) (source, target) def file_extract(self, archive, cwd=None): if (('.tgz') or ('.tar.gz')): ((archive)) return if (('.tbz2') or ('.tar.bz2')): ((archive)) return if ('.bin'): ((archive)) ((archive)) return if ('.zip'): archive = (cwd, archive) zf = (archive) () () return raise ((archive)) def file_copytree(self, src, dest): ((src, dest)) if (src): if (not (dest)): (dest) files = (src) for f in files: ((src, f), (dest, f)) else: (src, dest) def clean_platform(self): ('Clean the platform build directory') if (not (self.platform_dir)): return (self.platform_dir) def download(self, url, filename, cwd=None): def report_hook(index, blksize, size): if (size <= 0): progression = ((index * blksize)) else: progression = ((((index * blksize) * 100.0) / (size))) ((progression)) () url = (url + filename) if cwd: filename = (cwd, filename) if (filename): (filename) ((url)) (url, filename, report_hook) return filename def get_version(self): c = self.config has_version = ('app', 'version') has_regex = ('app', 'version.regex') has_filename = ('app', 'version.filename') if has_version: if (has_regex or has_filename): raise ('version.regex and version.filename conflict with version') return ('app', 'version') if (has_regex or has_filename): if (has_regex and (not has_filename)): raise ('version.filename is missing') if (has_filename and (not has_regex)): raise ('version.regex is missing') fn = ('app', 'version.filename') with (fn) as fd: data = () regex = ('app', 'version.regex') match = (regex, data) if (not match): raise ((fn, regex)) version = ()[0] ((version)) return version raise ('Missing version or version.regex + version.filename') def build_application(self): () () () () def _copy_application_sources(self): source_dir = (('app', 'source.dir', '.')) include_exts = ('app', 'source.include_exts', '') exclude_exts = ('app', 'source.exclude_exts', '') exclude_dirs = ('app', 'source.exclude_dirs', '') exclude_patterns = ('app', 'source.exclude_patterns', '') app_dir = self.app_dir ((source_dir)) (self.app_dir) for (root, dirs, files) in (source_dir): if (True in [('.') for x in (sep)]): continue filtered_root = () if filtered_root: filtered_root += '/' is_excluded = False for exclude_dir in exclude_dirs: if (exclude_dir[(- 1)] != '/'): exclude_dir += '/' if (exclude_dir): is_excluded = True break if is_excluded: continue for pattern in exclude_patterns: if (filtered_root, pattern): is_excluded = True break if is_excluded: continue for fn in files: if ('.'): continue is_excluded = False dfn = () if filtered_root: dfn = (filtered_root, fn) for pattern in exclude_patterns: if (dfn, pattern): is_excluded = True break if is_excluded: continue (basename, ext) = (fn) if ext: ext = ext[1:] if (include_exts and (ext not in include_exts)): continue if (exclude_exts and (ext in exclude_exts)): continue sfn = (root, fn) rfn = ((app_dir, root[((source_dir) + 1):], fn)) dfn = (rfn) (dfn) ((sfn)) (sfn, rfn) def _copy_application_libs(self): (self.applibs_dir, (self.app_dir, '_applibs')) def _copy_garden_libs(self): if (self.gardenlibs_dir): (self.gardenlibs_dir, (self.app_dir, 'libs')) def _add_sitecustomize(self): (((__file__), 'sitecustomize.py'), (self.app_dir, 'sitecustomize.py')) main_py = (self.app_dir, 'service', 'main.py') if (not (main_py)): return header = 'import sys, os; sys.path = [os.path.join(os.getcwd(),"..", "_applibs")] + sys.path\n' with (main_py, 'rb') as fd: data = () data = (header + data) with (main_py, 'wb') as fd: (data) ('Patched service/main.py to include applibs') def namify(self, name): 'Return a "valid" name from a name with lot of invalid chars\n (allowed characters: a-z, A-Z, 0-9, -, _)\n ' return ('[^a-zA-Z0-9_\\-]', '_', name) @property def root_dir(self): return (((self.specfilename))) @property def buildozer_dir(self): if self.builddir: return (self.builddir, '.buildozer') return (self.root_dir, '.buildozer') @property def bin_dir(self): return (self.root_dir, 'bin') @property def platform_dir(self): return (self.buildozer_dir, self.targetname, 'platform') @property def app_dir(self): return (self.buildozer_dir, self.targetname, 'app') @property def applibs_dir(self): return (self.buildozer_dir, 'applibs') @property def gardenlibs_dir(self): return (self.buildozer_dir, 'libs') @property def global_buildozer_dir(self): return (('~'), '.buildozer') @property def global_platform_dir(self): return (self.global_buildozer_dir, self.targetname, 'platform') @property def global_packages_dir(self): return (self.global_buildozer_dir, self.targetname, 'packages') @property def global_cache_dir(self): return (self.global_buildozer_dir, 'cache') @property def package_full_name(self): package_name = ('app', 'package.name', '') package_domain = ('app', 'package.domain', '') if (package_domain == ''): return package_name return (package_domain, package_name) def targets(self): for fn in (((__file__), 'targets')): if (('.') or ('__')): continue if (not ('.py')): continue target = fn[:(- 3)] try: m = ((target)) (yield (target, m)) except NotImplementedError: raise except: raise pass def usage(self): ('Usage:') (' buildozer [--profile <name>] [--verbose] [target] <command>...') (' buildozer --version') ('') ('Available targets:') targets = (()) for (target, m) in targets: try: doc = () except Exception: doc = '<no description>' ((target, doc)) ('') ('Global commands (without target):') cmds = [x for x in (self) if ('cmd_')] for cmd in cmds: name = cmd[4:] meth = (self, cmd) if (not meth.__doc__): continue doc = () ((name, doc)) ('') ('Target commands:') (' clean Clean the target environment') (' update Update the target dependencies') (' debug Build the application in debug mode') (' release Build the application in release mode') (' deploy Deploy the application on the device') (' run Run the application on the device') (' serve Serve the bin directory via SimpleHTTPServer') for (target, m) in targets: mt = (self) commands = () if (not commands): continue ('') ((target)) for (command, doc) in commands: if (not doc): continue doc = () ((command, doc)) ('') def run_default(self): () if ('buildozer:defaultcommand' not in self.state): ('No default command set.') ('Use "buildozer setdefault <command args...>"') ('Use "buildozer help" for a list of all commands"') (1) cmd = self.state['buildozer:defaultcommand'] (cmd) def run_command(self, args): while args: if (not ('-')): break arg = (0) if (arg in ('-v', '--verbose')): self.log_level = 2 elif (arg in ('-h', '--help')): () (0) elif (arg in ('-p', '--profile')): self.config_profile = (0) elif (arg == '--version'): ((__version__)) (0) () () if (not args): () return (command, args) = (args[0], args[1:]) cmd = (command) if (self, cmd): (*args) return targets = [x[0] for x in ()] if (command not in targets): ((command)) (1) (command) (args) def check_root(self): 'If effective user id is 0, display a warning and require\n user input to continue (or to cancel)' if IS_PY3: input_func = input else: input_func = raw_input warn_on_root = ('buildozer', 'warn_on_root', '1') try: euid = (() == 0) except AttributeError: if (sys.platform == 'win32'): import ctypes euid = (() != 0) if ((warn_on_root == '1') and euid): ('\x1b[91m\x1b[1mBuildozer is running as root!\x1b[0m') ('\x1b[91mThis is \x1b[1mnot\x1b[0m \x1b[91mrecommended, and may lead to problems later.\x1b[0m') cont = None while (cont not in ('y', 'n')): cont = ('Are you sure you want to continue [y/n]? ') if (cont == 'n'): () def cmd_init(self, *args): 'Create a initial buildozer.spec in the current directory' if ('buildozer.spec'): ('ERROR: You already have a buildozer.spec file.') (1) (((__file__), 'default.spec'), 'buildozer.spec') ('File buildozer.spec created, ready to customize!') def cmd_distclean(self, *args): 'Clean the whole Buildozer environment.' ('Warning: Your ndk, sdk and all other cached packages will be removed. Continue? (y/n)') if (()[0] == 'y'): ('Clean the global build directory') if (not (self.global_buildozer_dir)): return (self.global_buildozer_dir) def cmd_help(self, *args): 'Show the Buildozer help.' () def cmd_setdefault(self, *args): 'Set the default command to do when to arguments are given' () self.state['buildozer:defaultcommand'] = args def cmd_version(self, *args): 'Show the Buildozer version' ((__version__)) def cmd_serve(self, *args): 'Serve the bin directory via SimpleHTTPServer' try: from http.server import SimpleHTTPRequestHandler from socketserver import TCPServer except ImportError: from http.server import SimpleHTTPRequestHandler from socketserver import TCPServer (self.bin_dir) handler = SimpleHTTPRequestHandler httpd = (('', SIMPLE_HTTP_SERVER_PORT), handler) ((SIMPLE_HTTP_SERVER_PORT)) ('Press Ctrl+c to quit serving.') () def _merge_config_profile(self): profile = self.config_profile if (not profile): return for section in (): parts = ('@', 1) if ((parts) < 2): continue (section_base, section_profiles) = parts section_profiles = (',') if (profile not in section_profiles): continue if (not (section_base)): (section_base) for (name, value) in (section): ((name, value, section_base, profile)) (section_base, name, value) def _get_config_list_values(self, *args, **kwargs): kwargs['with_values'] = True return (*args) def _get_config_list(self, section, token, default=None, with_values=False): (section, token, self.config) l_section = (section, token) if (l_section): values = (l_section) if with_values: return [(key, (l_section, key)) for key in values] else: return [() for x in values] values = (section, token, '') if (not values): return default values = (',') if (not values): return default return [() for x in values] def _get_config_default(self, section, token, default=None): (section, token, self.config) if (not (section)): return default if (not (section, token)): return default return (section, token) def _get_config_bool(self, section, token, default=False): (section, token, self.config) if (not (section)): return default if (not (section, token)): return default return (section, token) def set_config_from_envs(config): 'Takes a ConfigParser, and checks every section/token for an\n environment variable of the form SECTION_TOKEN, with any dots\n replaced by underscores. If the variable exists, sets the config\n variable to the env value.\n ' for section in (): for token in (section): (section, token, config) def set_config_token_from_env(section, token, config): 'Given a config section and token, checks for an appropriate\n environment variable. If the variable exists, sets the config entry to\n its value.\n\n The environment variable checked is of the form SECTION_TOKEN, all\n upper case, with any dots replaced by underscores.\n\n Returns True if the environment variable exists and was used, or\n False otherwise.\n\n ' env_var_name = ([(), '_', ('.', '_')]) env_var = (env_var_name) if (env_var is None): return False (section, token, env_var) return True
from distutils.core import setup, Extension import os setup( name="ios", version="1.0", ext_modules=[ Extension( "ios", ["ios.c", "ios_mail.m", "ios_browser.m"], libraries=[], library_dirs=[], ) ], )
import os import sys PY3 = (sys.version_info[0] == 3) OLD_PY2 = (sys.version_info[:2] < (2, 7)) if PY3: input_str = 'builtins.input' iteritems = (lambda d: ((()))) from unittest.mock import patch from io import StringIO def read_response(prompt=''): '\n Prompt the user for a response.\n\n Prints the given prompt (which should be a Unicode string),\n and returns the text entered by the user as a Unicode string.\n\n :param prompt: A Unicode string that is presented to the user.\n ' return ((prompt)) else: from builtins import raw_input input = raw_input input_str = '__builtin__.raw_input' iteritems = (lambda d: (())) from mock import patch from io import StringIO def read_response(prompt=''): '\n Prompt the user for a response.\n\n Prints the given prompt (which should be a Unicode string),\n and returns the text entered by the user as a Unicode string.\n\n :param prompt: A Unicode string that is presented to the user.\n ' if sys.stdout.encoding: prompt = (sys.stdout.encoding) else: prompt = '' enc = (sys.stdin.encoding or ()) return (enc) if PY3: from shutil import which else: def is_exe(program): '\n Returns whether or not a file is an executable.\n ' return ((program) and (program, os.X_OK)) def which(cmd, mode=(os.F_OK | os.X_OK), path=None): 'Given a command, mode, and a PATH string, return the path which\n conforms to the given mode on the PATH, or None if there is no such\n file.\n `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result\n of os.environ.get("PATH"), or can be overridden with a custom search\n path.\n\n Note: This function was backported from the Python 3 source code.\n ' def _access_check(fn, mode): return ((fn) and (fn, mode) and (not (fn))) if (cmd): if (cmd, mode): return cmd return None if (path is None): path = ('PATH', os.defpath) if (not path): return None path = (os.pathsep) if (sys.platform == 'win32'): if (os.curdir not in path): (0, os.curdir) pathext = (os.pathsep) if (((()) for ext in pathext)): files = [cmd] else: files = [(cmd + ext) for ext in pathext] else: files = [cmd] seen = () for dir in path: normdir = (dir) if (normdir not in seen): (normdir) for thefile in files: name = (dir, thefile) if (name, mode): return name return None def is_string(obj): 'Determine if an object is a string.' return (obj, (str if PY3 else str)) _hush_pyflakes = (patch, StringIO, which)
""" Audio example ============= This example plays sounds of different formats. You should see a grid of buttons labelled with filenames. Clicking on the buttons will play, or restart, each sound. Not all sound formats will play on all platforms. All the sounds are from the http://woolyss.com/chipmusic-samples.php "THE FREESOUND PROJECT", Under Creative Commons Sampling Plus 1.0 License. """ import kivy kivy.require("1.0.8") from kivy.app import App from kivy.uix.button import Button from kivy.uix.boxlayout import BoxLayout from kivy.core.audio import SoundLoader from kivy.properties import StringProperty, ObjectProperty, NumericProperty from glob import glob from os.path import dirname, join, basename class AudioButton(Button): filename = StringProperty(None) sound = ObjectProperty(None, allownone=True) volume = NumericProperty(1.0) def on_press(self): if self.sound is None: self.sound = SoundLoader.load(self.filename) # stop the sound if it's currently playing if self.sound.status != "stop": self.sound.stop() self.sound.volume = self.volume self.sound.play() def release_audio(self): if self.sound: self.sound.stop() self.sound.unload() self.sound = None def set_volume(self, volume): self.volume = volume if self.sound: self.sound.volume = volume class AudioBackground(BoxLayout): pass class AudioApp(App): def build(self): root = AudioBackground(spacing=5) for fn in glob(join(dirname(__file__), "*.wav")): btn = AudioButton( text=basename(fn[:-4]).replace("_", " "), filename=fn, size_hint=(None, None), halign="center", size=(128, 128), text_size=(118, None), ) root.ids.sl.add_widget(btn) return root def release_audio(self): for audiobutton in self.root.ids.sl.children: audiobutton.release_audio() def set_volume(self, value): for audiobutton in self.root.ids.sl.children: audiobutton.set_volume(value) if __name__ == "__main__": AudioApp().run()
__all__ = ( "MultistrokeSettingsContainer", "MultistrokeSettingItem", "MultistrokeSettingBoolean", "MultistrokeSettingSlider", "MultistrokeSettingString", "MultistrokeSettingTitle", ) from kivy.factory import Factory from kivy.lang import Builder from kivy.uix.gridlayout import GridLayout from kivy.uix.label import Label from kivy.properties import ( StringProperty, NumericProperty, OptionProperty, BooleanProperty, ) from kivy.uix.popup import Popup Builder.load_file("settings.kv") class MultistrokeSettingsContainer(GridLayout): pass class MultistrokeSettingItem(GridLayout): title = StringProperty("<No title set>") desc = StringProperty("") class MultistrokeSettingTitle(Label): title = StringProperty("<No title set>") desc = StringProperty("") class MultistrokeSettingBoolean(MultistrokeSettingItem): button_text = StringProperty("") value = BooleanProperty(False) class MultistrokeSettingString(MultistrokeSettingItem): value = StringProperty("") class EditSettingPopup(Popup): def __init__(self, **kwargs): super(EditSettingPopup, self).__init__(**kwargs) self.register_event_type("on_validate") def on_validate(self, *l): pass class MultistrokeSettingSlider(MultistrokeSettingItem): min = NumericProperty(0) max = NumericProperty(100) type = OptionProperty("int", options=["float", "int"]) value = NumericProperty(0) def __init__(self, **kwargs): super(MultistrokeSettingSlider, self).__init__(**kwargs) self._popup = EditSettingPopup() self._popup.bind(on_validate=self._validate) self._popup.bind(on_dismiss=self._dismiss) def _to_numtype(self, v): try: if self.type == "float": return round(float(v), 1) else: return int(v) except ValueError: return self.min def _dismiss(self, *l): self._popup.ids.input.focus = False def _validate(self, instance, value): self._popup.dismiss() val = self._to_numtype(self._popup.ids.input.text) if val < self.min: val = self.min elif val > self.max: val = self.max self.value = val def on_touch_down(self, touch): if not self.ids.sliderlabel.collide_point(*touch.pos): return super(MultistrokeSettingSlider, self).on_touch_down(touch) ids = self._popup.ids ids.value = str(self.value) ids.input.text = str(self._to_numtype(self.value)) self._popup.open() ids.input.focus = True ids.input.select_all() Factory.register("MultistrokeSettingsContainer", cls=MultistrokeSettingsContainer) Factory.register("MultistrokeSettingTitle", cls=MultistrokeSettingTitle) Factory.register("MultistrokeSettingBoolean", cls=MultistrokeSettingBoolean) Factory.register("MultistrokeSettingSlider", cls=MultistrokeSettingSlider) Factory.register("MultistrokeSettingString", cls=MultistrokeSettingString)
""" Tree shader =========== This example is an experimentation to show how we can use shader for a tree subset. Here, we made a ShaderTreeWidget, different than the ShaderWidget in the plasma.py example. The ShaderTree widget create a Frambuffer, render his children on it, and render the Framebuffer with a specific Shader. With this way, you can apply cool effect on your widgets :) """ from kivy.clock import Clock from kivy.app import App from kivy.uix.button import Button from kivy.uix.scatter import Scatter from kivy.uix.floatlayout import FloatLayout from kivy.core.window import Window from kivy.properties import StringProperty, ObjectProperty from kivy.graphics import RenderContext, Fbo, Color, Rectangle header = """ #ifdef GL_ES precision highp float; #endif /* Outputs from the vertex shader */ varying vec4 frag_color; varying vec2 tex_coord0; /* uniform texture samplers */ uniform sampler2D texture0; uniform vec2 resolution; uniform float time; """ # pulse (Danguafer/Silexars, 2010) shader_pulse = ( header + """ void main(void) { vec2 halfres = resolution.xy/2.0; vec2 cPos = gl_FragCoord.xy; cPos.x -= 0.5*halfres.x*sin(time/2.0)+0.3*halfres.x*cos(time)+halfres.x; cPos.y -= 0.4*halfres.y*sin(time/5.0)+0.3*halfres.y*cos(time)+halfres.y; float cLength = length(cPos); vec2 uv = tex_coord0+(cPos/cLength)*sin(cLength/30.0-time*10.0)/25.0; vec3 col = texture2D(texture0,uv).xyz*50.0/cLength; gl_FragColor = vec4(col,1.0); } """ ) # post processing (by iq, 2009) shader_postprocessing = ( header + """ uniform vec2 uvsize; uniform vec2 uvpos; void main(void) { vec2 q = tex_coord0 * vec2(1, -1); vec2 uv = 0.5 + (q-0.5);//*(0.9);// + 0.1*sin(0.2*time)); vec3 oricol = texture2D(texture0,vec2(q.x,1.0-q.y)).xyz; vec3 col; col.r = texture2D(texture0,vec2(uv.x+0.003,-uv.y)).x; col.g = texture2D(texture0,vec2(uv.x+0.000,-uv.y)).y; col.b = texture2D(texture0,vec2(uv.x-0.003,-uv.y)).z; col = clamp(col*0.5+0.5*col*col*1.2,0.0,1.0); //col *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0-uv.x)*(1.0-uv.y); col *= vec3(0.8,1.0,0.7); col *= 0.9+0.1*sin(10.0*time+uv.y*1000.0); col *= 0.97+0.03*sin(110.0*time); float comp = smoothstep( 0.2, 0.7, sin(time) ); //col = mix( col, oricol, clamp(-2.0+2.0*q.x+3.0*comp,0.0,1.0) ); gl_FragColor = vec4(col,1.0); } """ ) shader_monochrome = ( header + """ void main() { vec4 rgb = texture2D(texture0, tex_coord0); float c = (rgb.x + rgb.y + rgb.z) * 0.3333; gl_FragColor = vec4(c, c, c, 1.0); } """ ) class ShaderWidget(FloatLayout): # property to set the source code for fragment shader fs = StringProperty(None) # texture of the framebuffer texture = ObjectProperty(None) def __init__(self, **kwargs): # Instead of using canvas, we will use a RenderContext, # and change the default shader used. self.canvas = RenderContext(use_parent_projection=True) # We create a framebuffer at the size of the window # FIXME: this should be created at the size of the widget with self.canvas: self.fbo = Fbo(size=Window.size, use_parent_projection=True) # Set the fbo background to black. with self.fbo: Color(0, 0, 0) Rectangle(size=Window.size) # call the constructor of parent # if they are any graphics object, they will be added on our new canvas super(ShaderWidget, self).__init__(**kwargs) # We'll update our glsl variables in a clock Clock.schedule_interval(self.update_glsl, 0) # Don't forget to set the texture property to the texture of framebuffer self.texture = self.fbo.texture def update_glsl(self, *largs): self.canvas["time"] = Clock.get_boottime() self.canvas["resolution"] = [float(v) for v in self.size] def on_fs(self, instance, value): # set the fragment shader to our source code shader = self.canvas.shader old_value = shader.fs shader.fs = value if not shader.success: shader.fs = old_value raise Exception("failed") # # now, if we have new widget to add, # add their graphics canvas to our Framebuffer, not the usual canvas. # def add_widget(self, widget): c = self.canvas self.canvas = self.fbo super(ShaderWidget, self).add_widget(widget) self.canvas = c def remove_widget(self, widget): c = self.canvas self.canvas = self.fbo super(ShaderWidget, self).remove_widget(widget) self.canvas = c class ScatterImage(Scatter): source = StringProperty(None) class ShaderTreeApp(App): def build(self): # prepare shader list available_shaders = (shader_pulse, shader_postprocessing, shader_monochrome) self.shader_index = 0 # create our widget tree root = FloatLayout() sw = ShaderWidget() root.add_widget(sw) # add a button and scatter image inside the shader widget btn = Button( text="Hello world", size_hint=(None, None), pos_hint={"center_x": 0.25, "center_y": 0.5}, ) sw.add_widget(btn) center = Window.width * 0.75 - 256, Window.height * 0.5 - 256 scatter = ScatterImage( source="tex3.jpg", size_hint=(None, None), size=(512, 512), pos=center ) sw.add_widget(scatter) # create a button outside the shader widget, to change the current used # shader btn = Button(text="Change fragment shader", size_hint=(1, None), height=50) def change(*largs): sw.fs = available_shaders[self.shader_index] self.shader_index = (self.shader_index + 1) % len(available_shaders) btn.bind(on_release=change) root.add_widget(btn) return root if __name__ == "__main__": ShaderTreeApp().run()
import kivy kivy.require("1.0.8") from kivy.core.window import Window from kivy.uix.widget import Widget class MyKeyboardListener(Widget): def __init__(self, **kwargs): super(MyKeyboardListener, self).__init__(**kwargs) self._keyboard = Window.request_keyboard(self._keyboard_closed, self, "text") if self._keyboard.widget: # If it exists, this widget is a VKeyboard object which you can use # to change the keyboard layout. pass self._keyboard.bind(on_key_down=self._on_keyboard_down) def _keyboard_closed(self): print("My keyboard have been closed!") self._keyboard.unbind(on_key_down=self._on_keyboard_down) self._keyboard = None def _on_keyboard_down(self, keyboard, keycode, text, modifiers): print(("The key", keycode, "have been pressed")) print((" - text is %r" % text)) print((" - modifiers are %r" % modifiers)) # Keycode is composed of an integer + a string # If we hit escape, release the keyboard if keycode[1] == "escape": keyboard.release() # Return True to accept the key. Otherwise, it will be used by # the system. return True if __name__ == "__main__": from kivy.base import runTouchApp runTouchApp(MyKeyboardListener())
__all__ = 'AnimatedButton' from kivy.factory import Factory from kivy.uix.label import Label from kivy.uix.image import Image from kivy.graphics import * from kivy.properties import StringProperty, OptionProperty, ObjectProperty, BooleanProperty class AnimatedButton(Label): state = ('normal') allow_stretch = (True) keep_ratio = (False) border = (None) anim_delay = (None) background_normal = ('atlas://data/images/defaulttheme/button') texture_background = (None) background_down = ('atlas://data/images/defaulttheme/button_pressed') def __init__(self, **kwargs): () ('on_press') ('on_release') self.border = (16, 16, 16, 16) self.img = () def anim_reset(*l): self.img.anim_delay = self.anim_delay () self.anim_delay = 0.1 () () def background_changed(*l): self.img.source = self.background_normal self.anim_delay = 0.1 () def on_tex_changed(self, *largs): self.texture_background = self.img.texture def _do_press(self): self.state = 'down' def _do_release(self): self.state = 'normal' def on_touch_down(self, touch): if (not (touch.x, touch.y)): return False if ((self) in touch.ud): return False (self) touch.ud[(self)] = True _animdelay = self.img.anim_delay self.img.source = self.background_down self.img.anim_delay = _animdelay () ('on_press') return True def on_touch_move(self, touch): return ((self) in touch.ud) def on_touch_up(self, touch): if (touch.grab_current is not self): return if (not ((self) in touch.ud)): raise () (self) _animdelay = self.img._coreimage.anim_delay self.img.source = self.background_normal self.anim_delay = _animdelay () ('on_release') return True def on_press(self): pass def on_release(self): pass ('AnimatedButton')
""" Core Abstraction ================ This module defines the abstraction layers for our core providers and their implementations. For further information, please refer to :ref:`architecture` and the :ref:`providers` section of the documentation. In most cases, you shouldn't directly use a library that's already covered by the core abstraction. Always try to use our providers first. In case we are missing a feature or method, please let us know by opening a new Bug report instead of relying on your library. .. warning:: These are **not** widgets! These are just abstractions of the respective functionality. For example, you cannot add a core image to your window. You have to use the image **widget** class instead. If you're really looking for widgets, please refer to :mod:`kivy.uix` instead. """ import os import sys import traceback import kivy from kivy.logger import Logger class CoreCriticalException(Exception): pass def core_select_lib( category, llist, create_instance=False, base="kivy.core", basemodule=None ): if "KIVY_DOC" in os.environ: return category = category.lower() basemodule = basemodule or category libs_ignored = [] errs = [] for option, modulename, classname in llist: try: # module activated in config ? try: if option not in kivy.kivy_options[category]: libs_ignored.append(modulename) Logger.debug( "{0}: Provider <{1}> ignored by config".format( category.capitalize(), option ) ) continue except KeyError: pass # import module mod = __import__( name="{2}.{0}.{1}".format(basemodule, modulename, base), globals=globals(), locals=locals(), fromlist=[modulename], level=0, ) cls = mod.__getattribute__(classname) # ok ! Logger.info( "{0}: Provider: {1}{2}".format( category.capitalize(), option, "({0} ignored)".format(libs_ignored) if libs_ignored else "", ) ) if create_instance: cls = cls() return cls except ImportError as e: errs.append((option, e, sys.exc_info()[2])) libs_ignored.append(modulename) Logger.debug( "{0}: Ignored <{1}> (import error)".format( category.capitalize(), option ) ) Logger.trace("", exc_info=e) except CoreCriticalException as e: errs.append((option, e, sys.exc_info()[2])) Logger.error("{0}: Unable to use {1}".format(category.capitalize(), option)) Logger.error( "{0}: The module raised an important error: {1!r}".format( category.capitalize(), e.message ) ) raise except Exception as e: errs.append((option, e, sys.exc_info()[2])) libs_ignored.append(modulename) Logger.trace( "{0}: Unable to use {1}".format(category.capitalize(), option, category) ) Logger.trace("", exc_info=e) err = "\n".join( [ "{} - {}: {}\n{}".format( opt, e.__class__.__name__, e, "".join(traceback.format_tb(tb)) ) for opt, e, tb in errs ] ) Logger.critical( "{0}: Unable to find any valuable {0} provider at all!\n{1}".format( category.capitalize(), err ) ) def core_register_libs(category, libs, base="kivy.core"): if "KIVY_DOC" in os.environ: return category = category.lower() kivy_options = kivy.kivy_options[category] libs_loadable = {} libs_ignored = [] for option, lib in libs: # module activated in config ? if option not in kivy_options: Logger.debug( "{0}: option <{1}> ignored by config".format( category.capitalize(), option ) ) libs_ignored.append(lib) continue libs_loadable[option] = lib libs_loaded = [] for item in kivy_options: try: # import module try: lib = libs_loadable[item] except KeyError: continue __import__( name="{2}.{0}.{1}".format(category, lib, base), globals=globals(), locals=locals(), fromlist=[lib], level=0, ) libs_loaded.append(lib) except Exception as e: Logger.trace( "{0}: Unable to use <{1}> as loader!".format( category.capitalize(), option ) ) Logger.trace("", exc_info=e) libs_ignored.append(lib) Logger.info( "{0}: Providers: {1} {2}".format( category.capitalize(), ", ".join(libs_loaded), "({0} ignored)".format(", ".join(libs_ignored)) if libs_ignored else "", ) ) return libs_loaded
""" DDS: DDS image loader """ __all__ = ("ImageLoaderDDS",) from kivy.lib.ddsfile import DDSFile from kivy.logger import Logger from kivy.core.image import ImageLoaderBase, ImageData, ImageLoader class ImageLoaderDDS(ImageLoaderBase): @staticmethod def extensions(): return ("dds",) def load(self, filename): try: dds = DDSFile(filename=filename) except: Logger.warning("Image: Unable to load image <%s>" % filename) raise self.filename = filename width, height = dds.size im = ImageData( width, height, dds.dxt, dds.images[0], source=filename, flip_vertical=False ) if len(dds.images) > 1: images = dds.images images_size = dds.images_size for index in range(1, len(dds.images)): w, h = images_size[index] data = images[index] im.add_mipmap(index, w, h, data) return [im] # register ImageLoader.register(ImageLoaderDDS)
""" Effects ======= .. versionadded:: 1.7.0 Everything starts with the :class:`~kinetic.KineticEffect`, the base class for computing velocity out of a movement. This base class is used to implement the :class:`~scroll.ScrollEffect`, a base class used for our :class:`~kivy.uix.scrollview.ScrollView` widget effect. We have multiple implementations: - :class:`~kivy.effects.scroll.ScrollEffect`: base class used for implementing an effect. It only calculates the scrolling and the overscroll. - :class:`~kivy.effects.dampedscroll.DampedScrollEffect`: uses the overscroll information to allow the user to drag more than expected. Once the user stops the drag, the position is returned to one of the bounds. - :class:`~kivy.effects.opacityscroll.OpacityScrollEffect`: uses the overscroll information to reduce the opacity of the scrollview widget. When the user stops the drag, the opacity is set back to 1. """
""" Leap Motion - finger only ========================= """ __all__ = ("LeapFingerEventProvider", "LeapFingerEvent") from collections import deque from kivy.logger import Logger from kivy.input.provider import MotionEventProvider from kivy.input.factory import MotionEventFactory from kivy.input.motionevent import MotionEvent _LEAP_QUEUE = deque() Leap = InteractionBox = None def normalize(value, a, b): return (value - a) / float(b - a) class LeapFingerEvent(MotionEvent): def depack(self, args): super(LeapFingerEvent, self).depack(args) if args[0] is None: return self.profile = ( "pos", "pos3d", ) x, y, z = args self.sx = normalize(x, -150, 150) self.sy = normalize(y, 40, 460) self.sz = normalize(z, -350, 350) self.z = z self.is_touch = True class LeapFingerEventProvider(MotionEventProvider): __handlers__ = {} def start(self): # don't do the import at start, or teh error will be always displayed # for user who don't have Leap global Leap, InteractionBox import Leap from Leap import InteractionBox class LeapMotionListener(Leap.Listener): def on_init(self, controller): Logger.info("leapmotion: Initialized") def on_connect(self, controller): Logger.info("leapmotion: Connected") def on_disconnect(self, controller): Logger.info("leapmotion: Disconnected") def on_frame(self, controller): frame = controller.frame() _LEAP_QUEUE.append(frame) def on_exit(self, controller): pass self.uid = 0 self.touches = {} self.listener = LeapMotionListener() self.controller = Leap.Controller(self.listener) def update(self, dispatch_fn): try: while True: frame = _LEAP_QUEUE.popleft() events = self.process_frame(frame) for ev in events: dispatch_fn(*ev) except IndexError: pass def process_frame(self, frame): events = [] touches = self.touches available_uid = [] for hand in frame.hands: for finger in hand.fingers: # print hand.id(), finger.id(), finger.tip() uid = "{0}:{1}".format(hand.id, finger.id) available_uid.append(uid) position = finger.tip_position args = (position.x, position.y, position.z) if uid not in touches: touch = LeapFingerEvent(self.device, uid, args) events.append(("begin", touch)) touches[uid] = touch else: touch = touches[uid] touch.move(args) events.append(("update", touch)) for key in list(touches.keys())[:]: if key not in available_uid: events.append(("end", touches[key])) del touches[key] return events # registers MotionEventFactory.register("leapfinger", LeapFingerEventProvider)
'\nConsole\n=======\n\n.. versionadded:: 1.9.1\n\nReboot of the old inspector, designed to be modular and keep concerns separated.\nIt also have a addons architecture that allow you to add a button, panel, or\nmore in the Console itself.\n\n.. warning::\n\n This module works, but might fail in some cases. Please contribute!\n\nUsage\n-----\n\nFor normal module usage, please see the :mod:`~kivy.modules` documentation::\n\n python main.py -m console\n\nMouse navigation\n----------------\n\nWhen "Select" button is activated, you can:\n\n- tap once on a widget to select it without leaving inspect mode\n- double tap on a widget to select and leave inspect mode (then you can\n manipulate the widget again)\n\nKeyboard navigation\n-------------------\n\n- "Ctrl + e": toggle console\n- "Escape": cancel widget lookup, then hide inspector view\n- "Top": select the parent widget\n- "Down": select the first children of the current selected widget\n- "Left": select the previous following sibling\n- "Right": select the next following sibling\n\nAdditionnal informations\n------------------------\n\nSome properties can be edited live. However, due to the delayed usage of\nsome properties, it might crash if you don\'t handle all the cases.\n\nAddons\n------\n\nAddons must be added to `Console.addons` before the first Clock tick of the\napplication, or before the create_console is called. You cannot add addons on\nthe fly currently. Addons are quite cheap until the Console is activated. Panel\nare even cheaper, nothing is done until the user select it.\n\nBy default, we provide multiple addons activated by default:\n\n- ConsoleAddonFps: display the FPS at the top-right\n- ConsoleAddonSelect: activate the selection mode\n- ConsoleAddonBreadcrumb: display the hierarchy of the current widget at the\n bottom\n- ConsoleAddonWidgetTree: panel to display the widget tree of the application\n- ConsoleAddonWidgetPanel: panel to display the properties of the selected\n widget\n\nIf you need to add custom widget in the Console, please use either\n:class:`ConsoleButton`, :class:`ConsoleToggleButton` or :class:`ConsoleLabel`\n\nAn addon must inherit from the :class:`ConsoleAddon` class.\n\nFor example, here is a simple addon for displaying the FPS at the top/right\nof the Console::\n\n from kivy.modules.console import Console, ConsoleAddon\n\n class ConsoleAddonFps(ConsoleAddon):\n def init(self):\n self.lbl = ConsoleLabel(text="0 Fps")\n self.console.add_toolbar_widget(self.lbl, right=True)\n\n def activate(self):\n Clock.schedule_interval(self.update_fps, 1 / 2.)\n\n def deactivated(self):\n Clock.unschedule(self.update_fps)\n\n def update_fps(self, *args):\n fps = Clock.get_fps()\n self.lbl.text = "{} Fps".format(int(fps))\n\n Console.register_addon(ConsoleAddonFps)\n\n\nYou can create addon that adds panels. Panel activation/deactivation are not\ntied to the addon activation/deactivation, but on some cases, you can use the\nsame callback for deactivating the addon and the panel. Here is a simple About\npanel addon::\n\n from kivy.modules.console import Console, ConsoleAddon, ConsoleLabel\n\n class ConsoleAddonAbout(ConsoleAddon):\n def init(self):\n self.console.add_panel("About", self.panel_activate,\n self.panel_deactivate)\n\n def panel_activate(self):\n self.console.bind(widget=self.update_content)\n self.update_content()\n\n def panel_deactivate(self):\n self.console.unbind(widget=self.update_content)\n\n def deactivate(self):\n self.panel_deactivate()\n\n def update_content(self, *args):\n widget = self.console.widget\n if not widget:\n return\n text = "Selected widget is: {!r}".format(widget)\n lbl = ConsoleLabel(text=text)\n self.console.set_content(lbl)\n\n Console.register_addon(ConsoleAddonAbout)\n\n' __all__ = ('start', 'stop', 'create_console', 'Console', 'ConsoleAddon', 'ConsoleButton', 'ConsoleToggleButton', 'ConsoleLabel') import kivy ('1.9.0') import weakref from functools import partial from itertools import chain from kivy.logger import Logger from kivy.uix.widget import Widget from kivy.uix.button import Button from kivy.uix.togglebutton import ToggleButton from kivy.uix.label import Label from kivy.uix.textinput import TextInput from kivy.uix.image import Image from kivy.uix.treeview import TreeViewNode, TreeView from kivy.uix.gridlayout import GridLayout from kivy.uix.relativelayout import RelativeLayout from kivy.uix.boxlayout import BoxLayout from kivy.uix.modalview import ModalView from kivy.graphics import Color, Rectangle, PushMatrix, PopMatrix from kivy.graphics.context_instructions import Transform from kivy.graphics.transformation import Matrix from kivy.properties import ObjectProperty, BooleanProperty, ListProperty, NumericProperty, StringProperty, OptionProperty, ReferenceListProperty, AliasProperty, VariableListProperty from kivy.graphics.texture import Texture from kivy.clock import Clock from kivy.lang import Builder ('\n<Console>:\n size_hint: (1, None) if self.mode == "docked" else (None, None)\n height: dp(250)\n\n canvas:\n Color:\n rgb: .185, .18, .18\n Rectangle:\n size: self.size\n Color:\n rgb: .3, .3, .3\n Rectangle:\n pos: 0, self.height - dp(48)\n size: self.width, dp(48)\n\n GridLayout:\n cols: 1\n id: layout\n\n GridLayout:\n id: toolbar\n rows: 1\n height: "48dp"\n size_hint_y: None\n padding: "4dp"\n spacing: "4dp"\n\n\n RelativeLayout:\n id: content\n\n\n<ConsoleAddonSeparator>:\n size_hint_x: None\n width: "10dp"\n\n<ConsoleButton,ConsoleToggleButton,ConsoleLabel>:\n size_hint_x: None\n width: self.texture_size[0] + dp(20)\n\n\n<ConsoleAddonBreadcrumbView>:\n size_hint_y: None\n height: "48dp"\n canvas:\n Color:\n rgb: .3, .3, .3\n Rectangle:\n size: self.size\n ScrollView:\n id: sv\n do_scroll_y: False\n GridLayout:\n id: stack\n rows: 1\n size_hint_x: None\n width: self.minimum_width\n padding: "4dp"\n spacing: "4dp"\n\n<TreeViewProperty>:\n height: max(dp(48), max(lkey.texture_size[1], ltext.texture_size[1]))\n Label:\n id: lkey\n text: root.key\n text_size: (self.width, None)\n width: 150\n size_hint_x: None\n Label:\n id: ltext\n text: [repr(getattr(root.widget, root.key, \'\')), root.refresh][0] if root.widget else \'\'\n text_size: (self.width, None)\n\n<ConsoleAddonWidgetTreeView>:\n ScrollView:\n scroll_type: [\'bars\', \'content\']\n bar_width: \'10dp\'\n\n ConsoleAddonWidgetTreeImpl:\n id: widgettree\n hide_root: True\n size_hint: None, None\n height: self.minimum_height\n width: max(self.parent.width, self.minimum_width)\n selected_widget: root.widget\n on_select_widget: root.console.highlight_widget(args[1])\n\n<-TreeViewWidget>:\n height: self.texture_size[1] + sp(4)\n size_hint_x: None\n width: self.texture_size[0] + sp(4)\n\n canvas.before:\n Color:\n rgba: self.color_selected if self.is_selected else (0, 0, 0, 0)\n Rectangle:\n pos: self.pos\n size: self.size\n Color:\n rgba: 1, 1, 1, int(not self.is_leaf)\n Rectangle:\n source:\n (\'atlas://data/images/defaulttheme/tree_%s\' %\n (\'opened\' if self.is_open else \'closed\'))\n size: 16, 16\n pos: self.x - 20, self.center_y - 8\n\n canvas:\n Color:\n rgba:\n (self.disabled_color if self.disabled else\n (self.color if not self.markup else (1, 1, 1, 1)))\n Rectangle:\n texture: self.texture\n size: self.texture_size\n pos:\n (int(self.center_x - self.texture_size[0] / 2.),\n int(self.center_y - self.texture_size[1] / 2.))\n\n') def ignore_exception(f): def f2(*args, **kwargs): try: return (*args) except: raise return f2 class TreeViewProperty(BoxLayout, TreeViewNode): key = (None) refresh = (False) widget_ref = (None) def _get_widget(self): wr = self.widget_ref if (wr is None): return None wr = () if (wr is None): self.widget_ref = None return None return wr widget = (_get_widget, None) class ConsoleButton(Button): 'Button specialized for the Console' pass class ConsoleToggleButton(ToggleButton): 'ToggleButton specialized for the Console' pass class ConsoleLabel(Label): 'LabelButton specialized for the Console' pass class ConsoleAddonSeparator(Widget): pass class ConsoleAddon(object): 'Base class for implementing addons' console = None def __init__(self, console): () self.console = console () def init(self): 'Method called when the addon is instanciated by the Console' pass def activate(self): 'Method called when the addon is activated by the console\n (when the console is displayed)' pass def deactivate(self): 'Method called when the addon is deactivated by the console\n (when the console is hidden)\n ' pass class ConsoleAddonMode(ConsoleAddon): def init(self): btn = () (btn) class ConsoleAddonSelect(ConsoleAddon): def init(self): self.btn = () () (self.btn) () def on_inspect_enabled(self, instance, value): self.btn.state = ('down' if value else 'normal') def on_button_state(self, instance, value): self.console.inspect_enabled = (value == 'down') class ConsoleAddonFps(ConsoleAddon): def init(self): self.lbl = () (self.lbl) def activate(self): (self.update_fps, (1 / 2.0)) def deactivated(self): (self.update_fps) def update_fps(self, *args): fps = () self.lbl.text = ((fps)) class ConsoleAddonBreadcrumbView(RelativeLayout): widget = (None) parents = [] def on_widget(self, instance, value): stack = self.ids.stack prefs = [() for btn in self.parents] if (value in prefs): index = (value) for btn in self.parents: btn.state = 'normal' self.parents[index].state = 'down' return () if (not value): return widget = value parents = [] while True: btn = () btn.widget_ref = (widget) () (btn) if (widget == widget.parent): break widget = widget.parent for btn in (parents): (btn) self.ids.sv.scroll_x = 1 self.parents = parents btn.state = 'down' def highlight_widget(self, instance): self.console.widget = () class ConsoleAddonBreadcrumb(ConsoleAddon): def init(self): self.view = () self.view.console = self.console (self.view) def activate(self): () () def deactivate(self): () def update_content(self, *args): self.view.widget = self.console.widget class ConsoleAddonWidgetPanel(ConsoleAddon): def init(self): ('Properties', self.panel_activate, self.deactivate) def panel_activate(self): () () def deactivate(self): () def update_content(self, *args): widget = self.console.widget if (not widget): return from kivy.uix.scrollview import ScrollView self.root = root = () self.sv = sv = () treeview = () () keys = (()) () node = None wk_widget = (widget) for key in keys: node = () () try: () except: raise (node) (sv) (treeview) (root) def show_property(self, instance, value, key=None, index=(- 1), *l): if (value is False): return console = self.console content = None if (key is None): nested = False widget = instance.widget key = instance.key prop = (key) value = (widget, key) else: nested = True widget = instance prop = None dtype = None if ((prop, AliasProperty) or nested): if ((value) in (str, str)): dtype = 'string' elif ((value) in (int, float)): dtype = 'numeric' elif ((value) in (tuple, list)): dtype = 'list' if ((prop, NumericProperty) or (dtype == 'numeric')): content = () () elif ((prop, StringProperty) or (dtype == 'string')): content = () () elif ((prop, ListProperty) or (prop, ReferenceListProperty) or (prop, VariableListProperty) or (dtype == 'list')): content = () () for (i, item) in (value): button = () if (item, Widget): () else: () (button) elif (prop, OptionProperty): content = () () for option in prop.options: button = () () (button) elif (prop, ObjectProperty): if (value, Widget): content = () () elif (value, Texture): content = () else: content = () elif (prop, BooleanProperty): state = ('down' if value else 'normal') content = () () () (self.sv) if content: (content) @ignore_exception def save_property_numeric(self, widget, key, index, instance, value): if (index >= 0): (widget, key)[index] = (instance.text) else: (widget, key, (instance.text)) @ignore_exception def save_property_text(self, widget, key, index, instance, value): if (index >= 0): (widget, key)[index] = instance.text else: (widget, key, instance.text) @ignore_exception def save_property_boolean(self, widget, key, index, instance): value = (instance.state == 'down') if (index >= 0): (widget, key)[index] = value else: (widget, key, value) @ignore_exception def save_property_option(self, widget, key, instance, *l): (widget, key, instance.text) class TreeViewWidget(Label, TreeViewNode): widget = (None) class ConsoleAddonWidgetTreeImpl(TreeView): selected_widget = (None) __events__ = ('on_select_widget',) def __init__(self, **kwargs): () self.update_scroll = (self._update_scroll) def find_node_by_widget(self, widget): for node in (): if (not node.parent_node): continue try: if (node.widget == widget): return node except ReferenceError: raise return None def update_selected_widget(self, widget): if widget: node = (widget) if node: (node, False) while (node and (node, TreeViewWidget)): if (not node.is_open): (node) node = node.parent_node def on_selected_widget(self, inst, widget): if widget: (widget) () def select_node(self, node, select_widget=True): (node) if select_widget: try: ('on_select_widget', node.widget.__self__) except ReferenceError: raise def on_select_widget(self, widget): pass def _update_scroll(self, *args): node = self._selected_node if (not node): return (node) class ConsoleAddonWidgetTreeView(RelativeLayout): widget = (None) _window_node = None def _update_widget_tree_node(self, node, widget, is_open=False): tree = self.ids.widgettree update_nodes = [] nodes = {} for cnode in node.nodes[:]: try: nodes[cnode.widget] = cnode except ReferenceError: raise (cnode) for child in widget.children: if (child, Console): continue if (child in nodes): cnode = (nodes[child], node) else: cnode = ((), node) ((cnode, child)) return update_nodes def update_widget_tree(self, *args): win = self.console.win if (not self._window_node): self._window_node = (()) nodes = (self._window_node, win) while nodes: ntmp = nodes[:] nodes = [] for node in ntmp: nodes += (*node) (self.widget) class ConsoleAddonWidgetTree(ConsoleAddon): def init(self): self.content = None ('Tree', self.panel_activate, self.deactivate, self.panel_refresh) def panel_activate(self): () () def deactivate(self): if self.content: self.content.widget = None self.content.console = None () def update_content(self, *args): widget = self.console.widget if (not self.content): self.content = () self.content.console = self.console self.content.widget = widget () (self.content) def panel_refresh(self): if self.content: () class Console(RelativeLayout): 'Console interface\n\n This widget is created by create_console(), when the module is loaded.\n During that time, you can add addons on the console to extend the\n functionnalities, or add your own application stats / debugging module.\n ' addons = [ConsoleAddonSelect, ConsoleAddonFps, ConsoleAddonWidgetPanel, ConsoleAddonWidgetTree, ConsoleAddonBreadcrumb] mode = ('docked') widget = (None) inspect_enabled = (False) activated = (False) def __init__(self, **kwargs): self.win = ('win', None) () self.avoid_bring_to_top = False with self.canvas.before: self.gcolor = (1, 0, 0, 0.25) () self.gtransform = (()) self.grect = () () (self.update_widget_graphics, 0) self._toolbar = {'left': [], 'panels': [], 'right': []} self._addons = [] self._panel = None for addon in self.addons: instance = (self) (instance) () self._panel = self._toolbar['panels'][0] self._panel.state = 'down' () def _init_toolbar(self): toolbar = self.ids.toolbar for key in ('left', 'panels', 'right'): if (key == 'right'): (()) for el in self._toolbar[key]: (el) if (key != 'right'): (()) @classmethod def register_addon(cls, addon): (addon) def add_toolbar_widget(self, widget, right=False): 'Add a widget in the top left toolbar of the Console.\n Use `right=True` if you wanna add the widget at the right instead.\n ' key = ('right' if right else 'left') (widget) def remove_toolbar_widget(self, widget): 'Remove a widget from the toolbar' (widget) def add_panel(self, name, cb_activate, cb_deactivate, cb_refresh=None): "Add a new panel in the Console.\n\n - `cb_activate` is a callable that will be called when the panel is\n activated by the user.\n\n - `cb_deactivate` is a callable that will be called when the panel is\n deactivated or when the console will hide.\n\n - `cb_refresh` is an optionnal callable that is called if the user\n click again on the button for display the panel\n\n When activated, it's up to the panel to display a content in the\n Console by using :meth:`set_content`.\n " btn = () btn.cb_activate = cb_activate btn.cb_deactivate = cb_deactivate btn.cb_refresh = cb_refresh () (btn) def _activate_panel(self, instance): if (self._panel != instance): () self._panel.state = 'normal' () self._panel = instance () self._panel.state = 'down' else: self._panel.state = 'down' if self._panel.cb_refresh: () def set_content(self, content): 'Replace the Console content with a new one.' () (content) def on_touch_down(self, touch): ret = (touch) if ((('button' not in touch.profile) or (touch.button == 'left')) and (not ret) and self.inspect_enabled): (*touch.pos) if touch.is_double_tap: self.inspect_enabled = False ret = True else: ret = (*touch.pos) return ret def on_touch_move(self, touch): ret = (touch) if ((not ret) and self.inspect_enabled): (*touch.pos) ret = True return ret def on_touch_up(self, touch): ret = (touch) if ((not ret) and self.inspect_enabled): ret = True return ret def on_window_children(self, win, children): if self.avoid_bring_to_top: return self.avoid_bring_to_top = True (self) (self) self.avoid_bring_to_top = False def highlight_at(self, x, y): 'Select a widget from a x/y window coordinate.\n This is mostly used internally when Select mode is activated\n ' widget = None win_children = self.win.children children = ((c for c in (win_children) if (c, ModalView)), (c for c in (win_children) if (not (c, ModalView)))) for child in children: if (child is self): continue widget = (child, x, y) if widget: break (widget) def highlight_widget(self, widget, *largs): self.widget = widget if (not widget): self.grect.size = (0, 0) def update_widget_graphics(self, *l): if (not self.activated): return if (self.widget is None): self.grect.size = (0, 0) return self.grect.size = self.widget.size matrix = () if (() != ()): self.gtransform.matrix = matrix def pick(self, widget, x, y): 'Pick a widget at x/y, given a root `widget`' ret = None if ((widget, 'visible') and (not widget.visible)): return ret if (x, y): ret = widget (x2, y2) = (x, y) for child in (widget.children): ret = ((child, x2, y2) or ret) return ret def on_activated(self, instance, activated): if activated: () else: () def _activate_console(self): if (not (self in self.win.children)): (self) self.y = 0 for addon in self._addons: () ('Console: console activated') def _deactivate_console(self): for addon in self._addons: () self.grect.size = (0, 0) self.y = (- self.height) self.widget = None self.inspect_enabled = False self._window_node = None ('Console: console deactivated') def keyboard_shortcut(self, win, scancode, *largs): modifiers = largs[(- 1)] if ((scancode == 101) and (modifiers == ['ctrl'])): self.activated = (not self.activated) if self.activated: self.inspect_enabled = True return True elif (scancode == 27): if self.inspect_enabled: self.inspect_enabled = False return True if self.activated: self.activated = False return True if ((not self.activated) or (not self.widget)): return if (scancode == 273): self.widget = self.widget.parent elif (scancode == 274): filtered_children = [c for c in self.widget.children if (not (c, Console))] if filtered_children: self.widget = filtered_children[0] elif (scancode == 276): parent = self.widget.parent filtered_children = [c for c in parent.children if (not (c, Console))] index = (self.widget) index = (0, (index - 1)) self.widget = filtered_children[index] elif (scancode == 275): parent = self.widget.parent filtered_children = [c for c in parent.children if (not (c, Console))] index = (self.widget) index = (((filtered_children) - 1), (index + 1)) self.widget = filtered_children[index] def create_console(win, ctx, *l): ctx.console = () () def start(win, ctx): 'Create an Console instance attached to the *ctx* and bound to the\n Windows :meth:`~kivy.core.window.WindowBase.on_keyboard` event for capturing\n the keyboard shortcut.\n\n :Parameters:\n `win`: A :class:`Window <kivy.core.window.WindowBase>`\n The application Window to bind to.\n `ctx`: A :class:`~kivy.uix.widget.Widget` or subclass\n The Widget to be inspected.\n\n ' ((create_console, win, ctx)) def stop(win, ctx): 'Stop and unload any active Inspectors for the given *ctx*.' if (ctx, 'console'): () (ctx.console) del ctx.console
import unittest from kivy.vector import Vector from operator import truediv class VectorTestCase(unittest.TestCase): def test_initializer_oneparameter_as_list(self): vector = Vector([1]) self.assertEqual(vector.x, 1) with self.assertRaises(IndexError): vector.y def test_initializer_oneparameter_as_int(self): with self.assertRaises(TypeError): Vector(1) def test_initializer_twoparameters(self): vector = Vector(1, 2) self.assertEqual(vector.x, 1) self.assertEqual(vector.y, 2) def test_initializer_noparameter(self): with self.assertRaises(Exception): Vector() def test_initializer_threeparameters(self): with self.assertRaises(Exception): Vector(1, 2, 3) def test_sum_twovectors(self): finalVector = Vector(1, 1) + Vector(1, 1) self.assertEqual(finalVector.x, 2) self.assertEqual(finalVector.y, 2) def test_sum_inplace(self): finalVector = Vector(1, 1) finalVector += Vector(1, 1) self.assertEqual(finalVector.x, 2) self.assertEqual(finalVector.y, 2) def test_sum_inplace_scalar(self): finalVector = Vector(1, 1) finalVector += 1 self.assertEqual(finalVector.x, 2) self.assertEqual(finalVector.y, 2) def test_sum_scalar(self): with self.assertRaises(TypeError): Vector(1, 1) + 1 def test_sub_twovectors(self): finalVector = Vector(3, 3) - Vector(2, 2) self.assertEqual(finalVector.x, 1) self.assertEqual(finalVector.y, 1) def test_sub_inplace(self): finalVector = Vector(3, 3) finalVector -= Vector(2, 2) self.assertEqual(finalVector.x, 1) self.assertEqual(finalVector.y, 1) def test_sub_scalar(self): with self.assertRaises(TypeError): Vector(3, 3) - 2 def test_sub_inplace_scalar(self): finalVector = Vector(3, 3) finalVector -= 2 self.assertEqual(finalVector.x, 1) self.assertEqual(finalVector.y, 1) def test_mul_twovectors(self): finalVector = Vector(2, 2) * Vector(3, 3) self.assertEqual(finalVector.x, 6) self.assertEqual(finalVector.y, 6) def test_mul_inplace(self): finalVector = Vector(2, 2) finalVector *= Vector(3, 3) self.assertEqual(finalVector.x, 6) self.assertEqual(finalVector.y, 6) def test_mul_inplace_scalar(self): finalVector = Vector(2, 2) finalVector *= 3 self.assertEqual(finalVector.x, 6) self.assertEqual(finalVector.y, 6) def test_mul_scalar(self): finalVector = Vector(2, 2) * 3 self.assertEqual(finalVector.x, 6) self.assertEqual(finalVector.y, 6) def test_rmul_list(self): finalVector = (3, 3) * Vector(2, 2) self.assertEqual(finalVector.x, 6) self.assertEqual(finalVector.y, 6) def test_rmul_scalar(self): finalVector = 3 * Vector(2, 2) self.assertEqual(finalVector.x, 6) self.assertEqual(finalVector.y, 6) def test_div_twovectors(self): finalVector = Vector(6, 6) / Vector(2, 2) self.assertEqual(finalVector.x, 3) self.assertEqual(finalVector.y, 3) def test_truediv_twovectors(self): finalVector = truediv(Vector(6, 6), Vector(2.0, 2.0)) self.assertEqual(finalVector.x, 3.0) self.assertEqual(finalVector.y, 3.0) def test_truediv_scalar(self): finalVector = truediv(Vector(6, 6), 2.0) self.assertEqual(finalVector.x, 3.0) self.assertEqual(finalVector.y, 3.0) def test_div_inplace(self): finalVector = Vector(6, 6) finalVector /= Vector(2, 2) self.assertEqual(finalVector.x, 3) self.assertEqual(finalVector.y, 3) def test_div_inplace_scalar(self): finalVector = Vector(6, 6) finalVector /= 2 self.assertEqual(finalVector.x, 3) self.assertEqual(finalVector.y, 3) def test_div_scalar(self): finalVector = Vector(6, 6) / 2 self.assertEqual(finalVector.x, 3) self.assertEqual(finalVector.y, 3) def test_rdiv_list(self): finalVector = (6.0, 6.0) / Vector(3.0, 3.0) self.assertEqual(finalVector.x, 2) self.assertEqual(finalVector.y, 2) def test_rdiv_scalar(self): finalVector = 6 / Vector(3, 3) self.assertEqual(finalVector.x, 2) self.assertEqual(finalVector.y, 2) def test_sum_oversizedlist(self): Vector(6, 6) + (1, 2) def test_negation(self): vector = -Vector(1, 1) self.assertEqual(vector.x, -1) self.assertEqual(vector.y, -1) def test_length(self): length = Vector(10, 10).length() self.assertEqual(length, 14.142135623730951) def test_length_zerozero(self): length = Vector(0, 0).length() self.assertEqual(length, 0) def test_length2(self): length = Vector(10, 10).length2() self.assertEqual(length, 200) def test_distance(self): distance = Vector(10, 10).distance((5, 10)) self.assertEqual(distance, 5) def test_distance2(self): distance = Vector(10, 10).distance2((5, 10)) self.assertEqual(distance, 25) def test_normalize(self): vector = Vector(88, 33).normalize() self.assertEqual(vector.x, 0.93632917756904444) self.assertEqual(vector.y, 0.3511234415883917) self.assertAlmostEqual(vector.length(), 1.0) def test_normalize_zerovector(self): vector = Vector(0, 0).normalize() self.assertEqual(vector.x, 0) self.assertEqual(vector.y, 0) self.assertEqual(vector.length(), 0) def test_dot(self): result = Vector(2, 4).dot((2, 2)) self.assertEqual(result, 12) def test_angle(self): result = Vector(100, 0).angle((0, 100)) self.assertEqual(result, -90.0) def test_rotate(self): v = Vector(100, 0) v = v.rotate(45) self.assertEqual(v.x, 70.710678118654755) self.assertEqual(v.y, 70.710678118654741) def test_(self): a = (98, 28) b = (72, 33) c = (10, -5) d = (20, 88) result = Vector.line_intersection(a, b, c, d) self.assertEqual(result.x, 15.25931928687196) self.assertEqual(result.y, 43.911669367909241) def test_inbbox(self): bmin = (0, 0) bmax = (100, 100) result = Vector.in_bbox((50, 50), bmin, bmax) self.assertTrue(result) result = Vector.in_bbox((647, -10), bmin, bmax) self.assertFalse(result)
''' Compound Selection Behavior =========================== The :class:`~kivy.uix.behaviors.compoundselection.CompoundSelectionBehavior` `mixin <https://en.wikipedia.org/wiki/Mixin>`_ class implements the logic behind keyboard and touch selection of selectable widgets managed by the derived widget. For example, it can be combined with a :class:`~kivy.uix.gridlayout.GridLayout` to add selection to the layout. Compound selection concepts --------------------------- At its core, it keeps a dynamic list of widgets that can be selected. Then, as the touches and keyboard input are passed in, it selects one or more of the widgets based on these inputs. For example, it uses the mouse scroll and keyboard up/down buttons to scroll through the list of widgets. Multiselection can also be achieved using the keyboard shift and ctrl keys. Finally, in addition to the up/down type keyboard inputs, compound selection can also accept letters from the keyboard to be used to select nodes with associated strings that start with those letters, similar to how files are selected by a file browser. Selection mechanics ------------------- When the controller needs to select a node, it calls :meth:`select_node` and :meth:`deselect_node`. Therefore, they must be overwritten in order alter node selection. By default, the class doesn't listen for keyboard or touch events, so the derived widget must call :meth:`select_with_touch`, :meth:`select_with_key_down`, and :meth:`select_with_key_up` on events that it wants to pass on for selection purposes. Example ------- To add selection to a grid layout which will contain :class:`~kivy.uix.Button` widgets. For each button added to the layout, you need to bind the :attr:`~kivy.uix.widget.Widget.on_touch_down` of the button to :meth:`select_with_touch` to pass on the touch events:: from kivy.uix.behaviors.compoundselection import CompoundSelectionBehavior from kivy.uix.button import Button from kivy.uix.gridlayout import GridLayout from kivy.core.window import Window from kivy.app import App class SelectableGrid(CompoundSelectionBehavior, GridLayout): def __init__(self, **kwargs): """ Use the initialize method to bind to the keyboard to enable keyboard interaction e.g. using shift and control for multi-select. """ super(CompoundSelectionBehavior, self).__init__(**kwargs) keyboard = Window.request_keyboard(None, self) keyboard.bind(on_key_down=self.select_with_key_down, on_key_up=self.select_with_key_up) def add_widget(self, widget): """ Override the adding of widgets so we can bind and catch their *on_touch_down* events. """ widget.bind(on_touch_down=self.button_touch_down, on_touch_up=self.button_touch_up) return super(SelectableGrid, self).add_widget(widget) def button_touch_down(self, button, touch): """ Use collision detection to select buttons when the touch occurs within their area. """ if button.collide_point(*touch.pos): self.select_with_touch(button, touch) def button_touch_up(self, button, touch): """ Use collision detection to de-select buttons when the touch occurs outside their area and *touch_multiselect* is not True. """ if not (button.collide_point(*touch.pos) or self.touch_multiselect): self.deselect_node(button) def select_node(self, node): node.background_color = (1, 0, 0, 1) return super(SelectableGrid, self).select_node(node) def deselect_node(self, node): node.background_color = (1, 1, 1, 1) super(SelectableGrid, self).deselect_node(node) def on_selected_nodes(self, gird, nodes): print("Selected nodes = {0}".format(nodes)) class TestApp(App): def build(self): grid = SelectableGrid(cols=3, rows=2, touch_multiselect=True, multiselect=True) for i in range(0, 6): grid.add_widget(Button(text="Button {0}".format(i))) return grid TestApp().run() .. warning:: This code is still experimental, and its API is subject to change in a future version. ''' __all__ = ("CompoundSelectionBehavior",) from kivy.properties import NumericProperty, BooleanProperty, ListProperty from time import time import string class CompoundSelectionBehavior(object): """The Selection behavior `mixin <https://en.wikipedia.org/wiki/Mixin>`_ implements the logic behind keyboard and touch selection of selectable widgets managed by the derived widget. Please see the :mod:`compound selection behaviors module <kivy.uix.behaviors.compoundselection>` documentation for more information. .. versionadded:: 1.9.0 """ selected_nodes = ListProperty([]) """The list of selected nodes. .. note:: Multiple nodes can be selected right after one another e.g. using the keyboard. When listening to :attr:`selected_nodes`, one should be aware of this. :attr:`selected_nodes` is a :class:`~kivy.properties.ListProperty` and defaults to the empty list, []. It is read-only and should not be modified. """ touch_multiselect = BooleanProperty(False) """A special touch mode which determines whether touch events, as processed by :meth:`select_with_touch`, will add the currently touched node to the selection, or if it will clear the selection before adding the node. This allows the selection of multiple nodes by simply touching them. This is different from :attr:`multiselect` because when it is True, simply touching an unselected node will select it, even if ctrl is not pressed. If it is False, however, ctrl must be pressed in order to add to the selection when :attr:`multiselect` is True. .. note:: :attr:`multiselect`, when False, will disable :attr:`touch_multiselect`. :attr:`touch_multiselect` is a :class:`~kivy.properties.BooleanProperty` and defaults to False. """ multiselect = BooleanProperty(False) """Determines whether multiple nodes can be selected. If enabled, keyboard shift and ctrl selection, optionally combined with touch, for example, will be able to select multiple widgets in the normally expected manner. This dominates :attr:`touch_multiselect` when False. :attr:`multiselect` is a :class:`~kivy.properties.BooleanProperty` and defaults to False. """ keyboard_select = BooleanProperty(True) """Determines whether the keyboard can be used for selection. If False, keyboard inputs will be ignored. :attr:`keyboard_select` is a :class:`~kivy.properties.BooleanProperty` and defaults to True. """ page_count = NumericProperty(10) """Determines by how much the selected node is moved up or down, relative to the position of the last selected node, when pageup (or pagedown) is pressed. :attr:`page_count` is a :class:`~kivy.properties.NumericProperty` and defaults to 10. """ up_count = NumericProperty(1) """Determines by how much the selected node is moved up or down, relative to the position of the last selected node, when the up (or down) arrow on the keyboard is pressed. :attr:`up_count` is a :class:`~kivy.properties.NumericProperty` and defaults to 1. """ right_count = NumericProperty(1) """Determines by how much the selected node is moved up or down, relative to the position of the last selected node, when the right (or left) arrow on the keyboard is pressed. :attr:`right_count` is a :class:`~kivy.properties.NumericProperty` and defaults to 1. """ scroll_count = NumericProperty(0) """Determines by how much the selected node is moved up or down, relative to the position of the last selected node, when the mouse scroll wheel is scrolled. :attr:`right_count` is a :class:`~kivy.properties.NumericProperty` and defaults to 0. """ nodes_order_reversed = BooleanProperty(True) """ (Internal) Indicates whether the order of the nodes as displayed top- down is reversed compared to their order in :meth:`get_selectable_nodes` (e.g. how the children property is reversed compared to how it's displayed). """ _anchor = None # the last anchor node selected (e.g. shift relative node) # the idx may be out of sync _anchor_idx = 0 # cache indexs in case list hasn't changed _last_selected_node = None # the absolute last node selected _last_node_idx = 0 _ctrl_down = False # if it's pressed - for e.g. shift selection _shift_down = False # holds str used to find node, e.g. if word is typed. passed to goto_node _word_filter = "" _last_key_time = 0 # time since last press, for finding whole strs in node _printable = set(string.printable) _key_list = [] # keys that are already pressed, to not press continuously _offset_counts = {} # cache of counts for faster access def __init__(self, **kwargs): super(CompoundSelectionBehavior, self).__init__(**kwargs) def ensure_single_select(*l): if (not self.multiselect) and len(self.selected_nodes) > 1: self.clear_selection() update_counts = self._update_counts update_counts() fbind = self.fbind fbind("multiselect", ensure_single_select) fbind("page_count", update_counts) fbind("up_count", update_counts) fbind("right_count", update_counts) fbind("scroll_count", update_counts) def select_with_touch(self, node, touch=None): """(internal) Processes a touch on the node. This should be called by the derived widget when a node is touched and is to be used for selection. Depending on the keyboard keys pressed and the configuration, it could select or deslect this and other nodes in the selectable nodes list, :meth:`get_selectable_nodes`. :Parameters: `node` The node that recieved the touch. Can be None for a scroll type touch. `touch` Optionally, the touch. Defaults to None. :Returns: bool, True if the touch was used, False otherwise. """ multi = self.multiselect multiselect = multi and (self._ctrl_down or self.touch_multiselect) range_select = multi and self._shift_down if ( touch and "button" in touch.profile and touch.button in ("scrollup", "scrolldown", "scrollleft", "scrollright") ): node_src, idx_src = self._reslove_last_node() node, idx = self.goto_node(touch.button, node_src, idx_src) if node == node_src: return False if range_select: self._select_range(multiselect, True, node, idx) else: if not multiselect: self.clear_selection() self.select_node(node) return True if node is None: return False if node in self.selected_nodes and (not range_select): # selected if multiselect: self.deselect_node(node) else: self.clear_selection() self.select_node(node) elif range_select: # keep anchor only if not multislect (ctrl-type selection) self._select_range(multiselect, not multiselect, node, 0) else: # it's not selected at this point if not multiselect: self.clear_selection() self.select_node(node) return True def select_with_key_down(self, keyboard, scancode, codepoint, modifiers, **kwargs): """Processes a key press. This is called when a key press is to be used for selection. Depending on the keyboard keys pressed and the configuration, it could select or deselect nodes or node ranges from the selectable nodes list, :meth:`get_selectable_nodes`. The parameters are such that it could be bound directly to the on_key_down event of a keyboard. Therefore, it is safe to be called repeatedly when the key is held down as is done by the keyboard. :Returns: bool, True if the keypress was used, False otherwise. """ if not self.keyboard_select: return False keys = self._key_list multi = self.multiselect node_src, idx_src = self._reslove_last_node() if scancode[1] == "shift": self._shift_down = True elif scancode[1] in ("ctrl", "lctrl", "rctrl"): self._ctrl_down = True elif ( multi and "ctrl" in modifiers and scancode[1] in ("a", "A") and scancode[1] not in keys ): sister_nodes = self.get_selectable_nodes() select = self.select_node for node in sister_nodes: select(node) keys.append(scancode[1]) else: if scancode[1] in self._printable: if time() - self._last_key_time <= 1.0: self._word_filter += scancode[1] else: self._word_filter = scancode[1] self._last_key_time = time() node, idx = self.goto_node(self._word_filter, node_src, idx_src) else: node, idx = self.goto_node(scancode[1], node_src, idx_src) if node == node_src: return False multiselect = multi and "ctrl" in modifiers if multi and "shift" in modifiers: self._select_range(multiselect, True, node, idx) else: if not multiselect: self.clear_selection() self.select_node(node) return True return False def select_with_key_up(self, keyboard, scancode, **kwargs): """(internal) Processes a key release. This must be called by the derived widget when a key that :meth:`select_with_key_down` returned True is released. The parameters are such that it could be bound directly to the on_key_up event of a keyboard. :Returns: bool, True if the key release was used, False otherwise. """ if scancode[1] == "shift": self._shift_down = False elif scancode[1] in ("ctrl", "lctrl", "rctrl"): self._ctrl_down = False else: try: self._key_list.remove(scancode[1]) return True except ValueError: return False return True def _update_counts(self, *largs): # doesn't invert indices here pc = self.page_count uc = self.up_count rc = self.right_count sc = self.scroll_count self._offset_counts = { "pageup": -pc, "pagedown": pc, "up": -uc, "down": uc, "right": rc, "left": -rc, "scrollup": sc, "scrolldown": -sc, "scrollright": -sc, "scrollleft": sc, } def _reslove_last_node(self): # for offset selection, we have a anchor, and we select everything # between anchor and added offset relative to last node sister_nodes = self.get_selectable_nodes() if not len(sister_nodes): return None, 0 last_node = self._last_selected_node last_idx = self._last_node_idx end = len(sister_nodes) - 1 if last_node is None: last_node = self._anchor last_idx = self._anchor_idx if last_node is None: return sister_nodes[end], end if last_idx > end or sister_nodes[last_idx] != last_node: try: return last_node, self.get_index_of_node(last_node, sister_nodes) except ValueError: return sister_nodes[end], end return last_node, last_idx def _select_range(self, multiselect, keep_anchor, node, idx): """Selects a range between self._anchor and node or idx. If multiselect is True, it will be added to the selection, otherwise it will unselect everything before selecting the range. This is only called if self.multiselect is True. If keep anchor is False, the anchor is moved to node. This should always be True for keyboard selection. """ select = self.select_node sister_nodes = self.get_selectable_nodes() end = len(sister_nodes) - 1 last_node = self._anchor last_idx = self._anchor_idx if last_node is None: last_idx = end last_node = sister_nodes[end] else: if last_idx > end or sister_nodes[last_idx] != last_node: try: last_idx = self.get_index_of_node(last_node, sister_nodes) except ValueError: # list changed - cannot do select across them return if idx > end or sister_nodes[idx] != node: try: # just in case idx = self.get_index_of_node(node, sister_nodes) except ValueError: return if last_idx > idx: last_idx, idx = idx, last_idx if not multiselect: self.clear_selection() for item in sister_nodes[last_idx : idx + 1]: select(item) if keep_anchor: self._anchor = last_node self._anchor_idx = last_idx else: self._anchor = node # in case idx was reversed, reset self._anchor_idx = idx self._last_selected_node = node self._last_node_idx = idx def clear_selection(self): """Deselects all the currently selected nodes.""" # keep the anchor and last selected node deselect = self.deselect_node nodes = self.selected_nodes # empty beforehand so lookup in deselect will be fast for node in nodes[:]: deselect(node) def get_selectable_nodes(self): """(internal) Returns a list of the nodes that can be selected. It can be overwritten by the derived widget to return the correct list. This list is used to determine which nodes to select with group selection. E.g. the last element in the list will be selected when home is pressed, pagedown will move (or add to, if shift is held) the selection from the current position by negative :attr:`page_count` nodes starting from the position of the currently selected node in this list and so on. Still, nodes can be selected even if they are not in this list. .. note:: It is safe to dynamically change this list including removing, adding, or re-arranging its elements. Nodes can be selected even if they are not on this list. And selected nodes removed from the list will remain selected until :meth:`deselect_node` is called. .. warning:: Layouts display their children in the reverse order. That is, the contents of :attr:`~kivy.uix.widget.Widget.children` is displayed form right to left, bottom to top. Therefore, internally, the indices of the elements returned by this function are reversed to make it work by default for most layouts so that the final result is consistent e.g. home, although it will select the last element in this list visually, will select the first element when counting from top to bottom and left to right. If this behavior is not desired, a reversed list should be returned instead. Defaults to returning :attr:`~kivy.uix.widget.Widget.children`. """ return self.children def get_index_of_node(self, node, selectable_nodes): """(internal) Returns the index of the `node` within the `selectable_nodes` returned by :meth:`get_selectable_nodes`. """ return selectable_nodes.index(node) def goto_node(self, key, last_node, last_node_idx): """(internal) Used by the controller to get the node at the position indicated by key. The key can be keyboard inputs, e.g. pageup, or scroll inputs from the mouse scroll wheel, e.g. scrollup. 'last_node' is the last node selected and is used to find the resulting node. For example, if the key is up, the returned node is one node up from the last node. It can be overwritten by the derived widget. :Parameters: `key` str, the string used to find the desired node. It can be any of the keyboard keys, as well as the mouse scrollup, scrolldown, scrollright, and scrollleft strings. If letters are typed in quick succession, the letters will be combined before it's passed in as key and can be used to find nodes that have an associated string that starts with those letters. `last_node` The last node that was selected. `last_node_idx` The cached index of the last node selected in the :meth:`get_selectable_nodes` list. If the list hasn't changed it saves having to look up the index of `last_node` in that list. :Returns: tuple, the node targeted by key and its index in the :meth:`get_selectable_nodes` list. Returning `(last_node, last_node_idx)` indicates a node wasn't found. """ sister_nodes = self.get_selectable_nodes() end = len(sister_nodes) - 1 counts = self._offset_counts if end == -1: return last_node, last_node_idx if last_node_idx > end or sister_nodes[last_node_idx] != last_node: try: # just in case last_node_idx = self.get_index_of_node(last_node, sister_nodes) except ValueError: return last_node, last_node_idx is_reversed = self.nodes_order_reversed if key in counts: count = -counts[key] if is_reversed else counts[key] idx = max(min(count + last_node_idx, end), 0) return sister_nodes[idx], idx elif key == "home": if is_reversed: return sister_nodes[end], end return sister_nodes[0], 0 elif key == "end": if is_reversed: return sister_nodes[0], 0 return sister_nodes[end], end else: return last_node, last_node_idx def select_node(self, node): """Selects a node. It is called by the controller when it selects a node and can be called from the outside to select a node directly. The derived widget should overwrite this method and change the node state to selected when called. :Parameters: `node` The node to be selected. :Returns: bool, True if the node was selected, False otherwise. .. warning:: This method must be called by the derived widget using super if it is overwritten. """ nodes = self.selected_nodes if (not self.multiselect) and len(nodes): self.clear_selection() if node not in nodes: nodes.append(node) self._anchor = node self._last_selected_node = node return True def deselect_node(self, node): """Deselects a possibly selected node. It is called by the controller when it deselects a node and can also be called from the outside to deselect a node directly. The derived widget should overwrite this method and change the node to its unselected state when this is called :Parameters: `node` The node to be deselected. .. warning:: This method must be called by the derived widget using super if it is overwritten. """ try: self.selected_nodes.remove(node) return True except ValueError: return False