passagemath-repl 10.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. passagemath_repl-10.5.1.data/scripts/sage-cachegrind +25 -0
  2. passagemath_repl-10.5.1.data/scripts/sage-callgrind +16 -0
  3. passagemath_repl-10.5.1.data/scripts/sage-cleaner +230 -0
  4. passagemath_repl-10.5.1.data/scripts/sage-coverage +327 -0
  5. passagemath_repl-10.5.1.data/scripts/sage-eval +14 -0
  6. passagemath_repl-10.5.1.data/scripts/sage-fixdoctests +710 -0
  7. passagemath_repl-10.5.1.data/scripts/sage-inline-fortran +12 -0
  8. passagemath_repl-10.5.1.data/scripts/sage-ipynb2rst +50 -0
  9. passagemath_repl-10.5.1.data/scripts/sage-ipython +16 -0
  10. passagemath_repl-10.5.1.data/scripts/sage-massif +25 -0
  11. passagemath_repl-10.5.1.data/scripts/sage-notebook +267 -0
  12. passagemath_repl-10.5.1.data/scripts/sage-omega +25 -0
  13. passagemath_repl-10.5.1.data/scripts/sage-preparse +302 -0
  14. passagemath_repl-10.5.1.data/scripts/sage-run +27 -0
  15. passagemath_repl-10.5.1.data/scripts/sage-run-cython +10 -0
  16. passagemath_repl-10.5.1.data/scripts/sage-runtests +9 -0
  17. passagemath_repl-10.5.1.data/scripts/sage-startuptime.py +163 -0
  18. passagemath_repl-10.5.1.data/scripts/sage-valgrind +34 -0
  19. passagemath_repl-10.5.1.dist-info/METADATA +77 -0
  20. passagemath_repl-10.5.1.dist-info/RECORD +162 -0
  21. passagemath_repl-10.5.1.dist-info/WHEEL +5 -0
  22. passagemath_repl-10.5.1.dist-info/top_level.txt +1 -0
  23. sage/all__sagemath_repl.py +119 -0
  24. sage/doctest/__init__.py +4 -0
  25. sage/doctest/__main__.py +236 -0
  26. sage/doctest/all.py +4 -0
  27. sage/doctest/check_tolerance.py +261 -0
  28. sage/doctest/control.py +1727 -0
  29. sage/doctest/external.py +534 -0
  30. sage/doctest/fixtures.py +383 -0
  31. sage/doctest/forker.py +2665 -0
  32. sage/doctest/marked_output.py +102 -0
  33. sage/doctest/parsing.py +1708 -0
  34. sage/doctest/parsing_test.py +79 -0
  35. sage/doctest/reporting.py +733 -0
  36. sage/doctest/rif_tol.py +124 -0
  37. sage/doctest/sources.py +1657 -0
  38. sage/doctest/test.py +584 -0
  39. sage/doctest/tests/1second.rst +4 -0
  40. sage/doctest/tests/99seconds.rst +4 -0
  41. sage/doctest/tests/abort.rst +5 -0
  42. sage/doctest/tests/atexit.rst +7 -0
  43. sage/doctest/tests/fail_and_die.rst +6 -0
  44. sage/doctest/tests/initial.rst +15 -0
  45. sage/doctest/tests/interrupt.rst +7 -0
  46. sage/doctest/tests/interrupt_diehard.rst +14 -0
  47. sage/doctest/tests/keyboardinterrupt.rst +11 -0
  48. sage/doctest/tests/longtime.rst +5 -0
  49. sage/doctest/tests/nodoctest +5 -0
  50. sage/doctest/tests/random_seed.rst +4 -0
  51. sage/doctest/tests/show_skipped.rst +18 -0
  52. sage/doctest/tests/sig_on.rst +9 -0
  53. sage/doctest/tests/simple_failure.rst +8 -0
  54. sage/doctest/tests/sleep_and_raise.rst +106 -0
  55. sage/doctest/tests/tolerance.rst +31 -0
  56. sage/doctest/util.py +750 -0
  57. sage/interfaces/cleaner.py +48 -0
  58. sage/interfaces/quit.py +163 -0
  59. sage/misc/all__sagemath_repl.py +51 -0
  60. sage/misc/banner.py +235 -0
  61. sage/misc/benchmark.py +221 -0
  62. sage/misc/classgraph.py +134 -0
  63. sage/misc/copying.py +22 -0
  64. sage/misc/cython.py +694 -0
  65. sage/misc/dev_tools.py +745 -0
  66. sage/misc/edit_module.py +304 -0
  67. sage/misc/explain_pickle.py +3079 -0
  68. sage/misc/gperftools.py +361 -0
  69. sage/misc/inline_fortran.py +212 -0
  70. sage/misc/messaging.py +86 -0
  71. sage/misc/pager.py +21 -0
  72. sage/misc/profiler.py +179 -0
  73. sage/misc/python.py +70 -0
  74. sage/misc/remote_file.py +53 -0
  75. sage/misc/sage_eval.py +249 -0
  76. sage/misc/sage_input.py +3621 -0
  77. sage/misc/sagedoc.py +1742 -0
  78. sage/misc/sh.py +38 -0
  79. sage/misc/trace.py +90 -0
  80. sage/repl/__init__.py +16 -0
  81. sage/repl/all.py +15 -0
  82. sage/repl/attach.py +625 -0
  83. sage/repl/configuration.py +186 -0
  84. sage/repl/display/__init__.py +1 -0
  85. sage/repl/display/fancy_repr.py +354 -0
  86. sage/repl/display/formatter.py +318 -0
  87. sage/repl/display/jsmol_iframe.py +290 -0
  88. sage/repl/display/pretty_print.py +153 -0
  89. sage/repl/display/util.py +163 -0
  90. sage/repl/image.py +302 -0
  91. sage/repl/inputhook.py +91 -0
  92. sage/repl/interface_magic.py +298 -0
  93. sage/repl/interpreter.py +854 -0
  94. sage/repl/ipython_extension.py +593 -0
  95. sage/repl/ipython_kernel/__init__.py +1 -0
  96. sage/repl/ipython_kernel/__main__.py +4 -0
  97. sage/repl/ipython_kernel/all_jupyter.py +10 -0
  98. sage/repl/ipython_kernel/install.py +301 -0
  99. sage/repl/ipython_kernel/interact.py +278 -0
  100. sage/repl/ipython_kernel/kernel.py +217 -0
  101. sage/repl/ipython_kernel/widgets.py +466 -0
  102. sage/repl/ipython_kernel/widgets_sagenb.py +587 -0
  103. sage/repl/ipython_tests.py +163 -0
  104. sage/repl/load.py +326 -0
  105. sage/repl/preparse.py +2218 -0
  106. sage/repl/prompts.py +90 -0
  107. sage/repl/rich_output/__init__.py +4 -0
  108. sage/repl/rich_output/backend_base.py +648 -0
  109. sage/repl/rich_output/backend_doctest.py +316 -0
  110. sage/repl/rich_output/backend_emacs.py +151 -0
  111. sage/repl/rich_output/backend_ipython.py +596 -0
  112. sage/repl/rich_output/buffer.py +311 -0
  113. sage/repl/rich_output/display_manager.py +829 -0
  114. sage/repl/rich_output/example.avi +0 -0
  115. sage/repl/rich_output/example.canvas3d +1 -0
  116. sage/repl/rich_output/example.dvi +0 -0
  117. sage/repl/rich_output/example.flv +0 -0
  118. sage/repl/rich_output/example.gif +0 -0
  119. sage/repl/rich_output/example.jpg +0 -0
  120. sage/repl/rich_output/example.mkv +0 -0
  121. sage/repl/rich_output/example.mov +0 -0
  122. sage/repl/rich_output/example.mp4 +0 -0
  123. sage/repl/rich_output/example.ogv +0 -0
  124. sage/repl/rich_output/example.pdf +0 -0
  125. sage/repl/rich_output/example.png +0 -0
  126. sage/repl/rich_output/example.svg +54 -0
  127. sage/repl/rich_output/example.webm +0 -0
  128. sage/repl/rich_output/example.wmv +0 -0
  129. sage/repl/rich_output/example_jmol.spt.zip +0 -0
  130. sage/repl/rich_output/example_wavefront_scene.mtl +7 -0
  131. sage/repl/rich_output/example_wavefront_scene.obj +17 -0
  132. sage/repl/rich_output/output_basic.py +391 -0
  133. sage/repl/rich_output/output_browser.py +103 -0
  134. sage/repl/rich_output/output_catalog.py +54 -0
  135. sage/repl/rich_output/output_graphics.py +320 -0
  136. sage/repl/rich_output/output_graphics3d.py +345 -0
  137. sage/repl/rich_output/output_video.py +231 -0
  138. sage/repl/rich_output/preferences.py +432 -0
  139. sage/repl/rich_output/pretty_print.py +339 -0
  140. sage/repl/rich_output/test_backend.py +201 -0
  141. sage/repl/user_globals.py +214 -0
  142. sage/tests/all.py +0 -0
  143. sage/tests/all__sagemath_repl.py +3 -0
  144. sage/tests/article_heuberger_krenn_kropf_fsm-in-sage.py +630 -0
  145. sage/tests/arxiv_0812_2725.py +351 -0
  146. sage/tests/benchmark.py +1925 -0
  147. sage/tests/book_schilling_zabrocki_kschur_primer.py +795 -0
  148. sage/tests/book_stein_ent.py +651 -0
  149. sage/tests/book_stein_modform.py +558 -0
  150. sage/tests/cmdline.py +796 -0
  151. sage/tests/combinatorial_hopf_algebras.py +52 -0
  152. sage/tests/finite_poset.py +623 -0
  153. sage/tests/functools_partial_src.py +27 -0
  154. sage/tests/gosper-sum.py +218 -0
  155. sage/tests/lazy_imports.py +28 -0
  156. sage/tests/modular_group_cohomology.py +80 -0
  157. sage/tests/numpy.py +21 -0
  158. sage/tests/parigp.py +76 -0
  159. sage/tests/startup.py +27 -0
  160. sage/tests/symbolic-series.py +76 -0
  161. sage/tests/sympy.py +16 -0
  162. sage/tests/test_deprecation.py +31 -0
sage/misc/benchmark.py ADDED
@@ -0,0 +1,221 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ # sage.doctest: needs sage.all
3
+ "Benchmarks"
4
+
5
+ from sage.misc.misc import cputime
6
+
7
+ from sage.all import *
8
+
9
+
10
+ def benchmark(n=-1):
11
+ """
12
+ Run a well-chosen range of Sage commands and record the time it
13
+ takes for each to run.
14
+
15
+ INPUT:
16
+
17
+ - ``n`` -- integer (default: -1); the benchmark number; the default
18
+ of -1 runs all the benchmarks
19
+
20
+ OUTPUT:
21
+
22
+ list -- summary of timings for each benchmark.
23
+ int -- if n == -1, also return the total time
24
+
25
+ EXAMPLES::
26
+
27
+ sage: from sage.misc.benchmark import *
28
+ sage: _ = benchmark()
29
+ Running benchmark 0
30
+ Benchmark 0: Factor the following polynomial over
31
+ the rational numbers: (x^97+19*x+1)*(x^103-19*x^97+14)*(x^100-1)
32
+ Time: ... seconds
33
+ Running benchmark 1
34
+ Find the Mordell-Weil group of the elliptic curve 5077A using mwrank
35
+ Time: ... seconds
36
+ Running benchmark 2
37
+ Some basic arithmetic with very large Integer numbers: '3^1000001 * 19^100001
38
+ Time: ... seconds
39
+ Running benchmark 3
40
+ Some basic arithmetic with very large Rational numbers: '(2/3)^100001 * (17/19)^100001
41
+ Time: ... seconds
42
+ Running benchmark 4
43
+ Rational polynomial arithmetic using Sage. Compute (x^29+17*x-5)^200.
44
+ Time: ... seconds
45
+ Running benchmark 5
46
+ Rational polynomial arithmetic using Sage. Compute (x^19 - 18*x + 1)^50 one hundred times.
47
+ Time: ... seconds
48
+ Running benchmark 6
49
+ Compute the p-division polynomials of y^2 = x^3 + 37*x - 997 for primes p < 40.
50
+ Time: ... seconds
51
+ Running benchmark 7
52
+ Compute the Mordell-Weil group of y^2 = x^3 + 37*x - 997.
53
+ Time: ... seconds
54
+ Running benchmark 8
55
+ """
56
+
57
+ if isinstance(n, list):
58
+ t = cputime()
59
+ v = [benchmark(m) for m in n]
60
+ return v, cputime(t)
61
+
62
+ if n != -1:
63
+ print("Running benchmark {}".format(n))
64
+ try:
65
+ desc, t = eval("bench{}()".format(n))
66
+ except NameError:
67
+ raise RuntimeError("no benchmark {}".format(n))
68
+ print(desc)
69
+ print("Time: {} seconds".format(t))
70
+ return (n, t, desc)
71
+
72
+ t = cputime()
73
+ m = 0
74
+ v = []
75
+ while True:
76
+ try:
77
+ v.append(benchmark(m))
78
+ m += 1
79
+ except RuntimeError:
80
+ break
81
+ return v, cputime(t)
82
+
83
+
84
+ def bench0():
85
+ """
86
+ Run a benchmark.
87
+
88
+ BENCHMARK::
89
+
90
+ sage: from sage.misc.benchmark import *
91
+ sage: print(bench0()[0])
92
+ Benchmark 0: Factor the following polynomial over
93
+ the rational numbers: (x^97+19*x+1)*(x^103-19*x^97+14)*(x^100-1)
94
+ """
95
+ desc = """Benchmark 0: Factor the following polynomial over
96
+ the rational numbers: (x^97+19*x+1)*(x^103-19*x^97+14)*(x^100-1)"""
97
+ x = polygen(QQ, "x")
98
+ f = (x**97+19*x+1)*(x**103-19*x**97+14)*(x**100-1)
99
+ t = cputime()
100
+ F = f.factor()
101
+ return (desc, cputime(t))
102
+
103
+
104
+ def bench1():
105
+ """
106
+ Run a benchmark.
107
+
108
+ BENCHMARK::
109
+
110
+ sage: from sage.misc.benchmark import *
111
+ sage: print(bench1()[0])
112
+ Find the Mordell-Weil group of the elliptic curve 5077A using mwrank
113
+ """
114
+ desc = """Find the Mordell-Weil group of the elliptic curve 5077A using mwrank"""
115
+ E = mwrank_EllipticCurve([0, 0, 1, -7, 6])
116
+ t = cputime()
117
+ g = E.gens()
118
+ return (desc, cputime(t))
119
+
120
+
121
+ def bench2():
122
+ """
123
+ Run a benchmark.
124
+
125
+ BENCHMARK::
126
+
127
+ sage: from sage.misc.benchmark import *
128
+ sage: print(bench2()[0])
129
+ Some basic arithmetic with very large Integer numbers: '3^1000001 * 19^100001
130
+ """
131
+ desc = """Some basic arithmetic with very large Integer numbers: '3^1000001 * 19^100001"""
132
+ t = cputime()
133
+ a = ZZ(3)**1000001 * ZZ(19)**100001
134
+ return (desc, cputime(t))
135
+
136
+
137
+ def bench3():
138
+ """
139
+ Run a benchmark.
140
+
141
+ BENCHMARK::
142
+
143
+ sage: from sage.misc.benchmark import *
144
+ sage: print(bench3()[0])
145
+ Some basic arithmetic with very large Rational numbers: '(2/3)^100001 * (17/19)^100001
146
+ """
147
+ desc = """Some basic arithmetic with very large Rational numbers: '(2/3)^100001 * (17/19)^100001"""
148
+ t = cputime()
149
+ a = QQ((2, 3))**100001 * QQ((17, 19))**100001
150
+ return (desc, cputime(t))
151
+
152
+
153
+ def bench4():
154
+ """
155
+ Run a benchmark.
156
+
157
+ BENCHMARK::
158
+
159
+ sage: from sage.misc.benchmark import *
160
+ sage: print(bench4()[0])
161
+ Rational polynomial arithmetic using Sage. Compute (x^29+17*x-5)^200.
162
+ """
163
+ desc = """Rational polynomial arithmetic using Sage. Compute (x^29+17*x-5)^200."""
164
+ x = PolynomialRing(QQ, 'x').gen()
165
+ t = cputime()
166
+ f = x**29 + 17*x-5
167
+ a = f**200
168
+ return (desc, cputime(t))
169
+
170
+
171
+ def bench5():
172
+ """
173
+ Run a benchmark.
174
+
175
+ BENCHMARK::
176
+
177
+ sage: from sage.misc.benchmark import *
178
+ sage: print(bench5()[0])
179
+ Rational polynomial arithmetic using Sage. Compute (x^19 - 18*x + 1)^50 one hundred times.
180
+ """
181
+ desc = """Rational polynomial arithmetic using Sage. Compute (x^19 - 18*x + 1)^50 one hundred times."""
182
+ x = PolynomialRing(QQ, 'x').gen()
183
+ t = cputime()
184
+ f = x**19 - 18*x + 1
185
+ w = [f**50 for _ in range(100)]
186
+ return (desc, cputime(t))
187
+
188
+
189
+ def bench6():
190
+ """
191
+ Run a benchmark.
192
+
193
+ BENCHMARK::
194
+
195
+ sage: from sage.misc.benchmark import *
196
+ sage: print(bench6()[0])
197
+ Compute the p-division polynomials of y^2 = x^3 + 37*x - 997 for primes p < 40.
198
+ """
199
+ desc = """Compute the p-division polynomials of y^2 = x^3 + 37*x - 997 for primes p < 40."""
200
+ E = EllipticCurve([0, 0, 0, 37, -997])
201
+ t = cputime()
202
+ for p in [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]:
203
+ f = E.division_polynomial(p)
204
+ return (desc, cputime(t))
205
+
206
+
207
+ def bench7():
208
+ """
209
+ Run a benchmark.
210
+
211
+ BENCHMARK::
212
+
213
+ sage: from sage.misc.benchmark import *
214
+ sage: print(bench7()[0])
215
+ Compute the Mordell-Weil group of y^2 = x^3 + 37*x - 997.
216
+ """
217
+ desc = """Compute the Mordell-Weil group of y^2 = x^3 + 37*x - 997."""
218
+ E = EllipticCurve([0, 0, 0, 37, -997])
219
+ t = cputime()
220
+ G = E.gens()
221
+ return (desc, cputime(t))
@@ -0,0 +1,134 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ # sage.doctest: needs sage.graphs
3
+ r"""
4
+ Class inheritance graphs
5
+ """
6
+ # ****************************************************************************
7
+ # Copyright (C) 2007 William Stein <wstein@math.ucsd.edu>
8
+ # 2011 Nicolas M. Thiery <nthiery at users.sf.net>
9
+ #
10
+ # Distributed under the terms of the GNU General Public License (GPL)
11
+ # https://www.gnu.org/licenses/
12
+ # *****************************************************************************
13
+
14
+ import inspect
15
+
16
+
17
+ def class_graph(top, depth=5, name_filter=None, classes=None, as_graph=True):
18
+ """
19
+ Return the class inheritance graph of a module, class, or object.
20
+
21
+ INPUT:
22
+
23
+ - ``top`` -- the module, class, or object to start with (e.g. ``sage``,
24
+ ``Integer``, ``3``)
25
+ - ``depth`` -- maximal recursion depth within submodules (default: 5)
26
+ - ``name_filter`` -- e.g. 'sage.rings' to only consider classes in
27
+ :mod:`sage.rings`
28
+ - ``classes`` -- (optional) dictionary to be filled in (it is also returned)
29
+ - ``as_graph`` -- boolean (default: ``True``)
30
+
31
+ OUTPUT:
32
+
33
+ An oriented graph, with class names as vertices, and an edge
34
+ from each class to each of its bases.
35
+
36
+ EXAMPLES:
37
+
38
+ We construct the inheritance graph of the classes within a given module::
39
+
40
+ sage: # needs sage.rings.padics
41
+ sage: from sage.rings.polynomial.padics import polynomial_padic_capped_relative_dense, polynomial_padic_flat
42
+ sage: G = class_graph(sage.rings.polynomial.padics); G
43
+ Digraph on 6 vertices
44
+ sage: G.vertices(sort=True)
45
+ ['Polynomial',
46
+ 'Polynomial_generic_cdv',
47
+ 'Polynomial_generic_dense',
48
+ 'Polynomial_padic',
49
+ 'Polynomial_padic_capped_relative_dense',
50
+ 'Polynomial_padic_flat']
51
+ sage: G.edges(sort=True, labels=False)
52
+ [('Polynomial_padic', 'Polynomial'),
53
+ ('Polynomial_padic_capped_relative_dense', 'Polynomial_generic_cdv'),
54
+ ('Polynomial_padic_capped_relative_dense', 'Polynomial_padic'),
55
+ ('Polynomial_padic_flat', 'Polynomial_generic_dense'),
56
+ ('Polynomial_padic_flat', 'Polynomial_padic')]
57
+
58
+ We construct the inheritance graph of a given class::
59
+
60
+ sage: class_graph(Parent).edges(sort=True, labels=False)
61
+ [('CategoryObject', 'SageObject'), ('Parent', 'CategoryObject'), ('SageObject', 'object')]
62
+
63
+ We construct the inheritance graph of the class of an object::
64
+
65
+ sage: class_graph([1,2,3]).edges(sort=True, labels=False)
66
+ [('list', 'object')]
67
+
68
+ .. warning:: the output of ``class_graph`` used to be a dictionary
69
+ mapping each class name to the list of names of its bases. This
70
+ can be emulated by setting the option ``as_graph`` to ``False``::
71
+
72
+ sage: # needs sage.rings.padics
73
+ sage: import sage.rings.polynomial.padics
74
+ sage: class_graph(sage.rings.polynomial.padics, depth=2, as_graph=False)
75
+ {'Polynomial_padic': ['Polynomial'],
76
+ 'Polynomial_padic_capped_relative_dense': ['Polynomial_generic_cdv',
77
+ 'Polynomial_padic'],
78
+ 'Polynomial_padic_flat': ['Polynomial_generic_dense', 'Polynomial_padic']}
79
+
80
+ .. NOTE:: the ``classes`` and ``as_graph`` options are mostly
81
+ intended for internal recursive use.
82
+
83
+ .. NOTE:: ``class_graph`` does not yet handle nested classes
84
+
85
+ TESTS::
86
+
87
+ sage: G = class_graph(sage.rings.polynomial.padics, depth=2); G # needs sage.rings.padics
88
+ Digraph on 6 vertices
89
+ """
90
+ # This function descends recursively down the submodules of the
91
+ # top module (if ``top`` is a module) and then down the hierarchy
92
+ # of classes. Along the way, the result is stored in the "global"
93
+ # dictionary ``classes`` which associates to each class the list
94
+ # of its bases.
95
+
96
+ # Termination
97
+ if depth < 0:
98
+ return classes
99
+
100
+ # (first recursive call)
101
+ if classes is None:
102
+ classes = {}
103
+
104
+ # Build the list ``children`` of submodules (resp. base classes)
105
+ # of ``top`` the function will recurse through
106
+ if inspect.ismodule(top):
107
+ if top.__name__.endswith('.all'): # Ignore sage.rings.all and friends
108
+ return classes
109
+ if name_filter is None:
110
+ name_filter = top.__name__
111
+ children = [item for item in top.__dict__.values()
112
+ if inspect.ismodule(item) or inspect.isclass(item)]
113
+ depth -= 1
114
+ elif inspect.isclass(top):
115
+ if name_filter is None:
116
+ name_filter = ""
117
+ if not top.__module__.startswith(name_filter):
118
+ return classes
119
+ children = top.__bases__
120
+ classes[top.__name__] = [e.__name__ for e in children]
121
+ else: # top is a plain Python object; inspect its class
122
+ children = [top.__class__]
123
+
124
+ # Recurse
125
+ for child in children:
126
+ class_graph(child, depth=depth, name_filter=name_filter,
127
+ classes=classes, as_graph=False)
128
+
129
+ # (first recursive call): construct the graph
130
+ if as_graph:
131
+ from sage.graphs.digraph import DiGraph
132
+ return DiGraph(classes)
133
+ else:
134
+ return classes
sage/misc/copying.py ADDED
@@ -0,0 +1,22 @@
1
+ # sage_setup: distribution = sagemath-repl
2
+ "License"
3
+
4
+ import os
5
+ from sage.misc import pager
6
+
7
+ from sage.env import SAGE_ROOT
8
+
9
+
10
+ class License:
11
+ def __call__(self):
12
+ pager.pager()(str(self))
13
+
14
+ def __repr__(self):
15
+ return "Type license() to see the full license text."
16
+
17
+ def __str__(self):
18
+ with open(os.path.join(SAGE_ROOT, 'COPYING.txt')) as f:
19
+ return f.read()
20
+
21
+
22
+ license = License()