@agent-webui/ai-desk-python-darwin-x64 1.0.29-beta1

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 (1883) hide show
  1. package/README.md +3 -0
  2. package/package.json +20 -0
  3. package/python/bin/idle3.13 +7 -0
  4. package/python/bin/pip +8 -0
  5. package/python/bin/pip3 +8 -0
  6. package/python/bin/pip3.13 +8 -0
  7. package/python/bin/pydoc3.13 +7 -0
  8. package/python/bin/python3.13 +0 -0
  9. package/python/bin/python3.13-config +76 -0
  10. package/python/include/python3.13/Python.h +140 -0
  11. package/python/include/python3.13/abstract.h +921 -0
  12. package/python/include/python3.13/bltinmodule.h +14 -0
  13. package/python/include/python3.13/boolobject.h +54 -0
  14. package/python/include/python3.13/bytearrayobject.h +44 -0
  15. package/python/include/python3.13/bytesobject.h +66 -0
  16. package/python/include/python3.13/ceval.h +145 -0
  17. package/python/include/python3.13/codecs.h +176 -0
  18. package/python/include/python3.13/compile.h +22 -0
  19. package/python/include/python3.13/complexobject.h +30 -0
  20. package/python/include/python3.13/cpython/abstract.h +87 -0
  21. package/python/include/python3.13/cpython/bytearrayobject.h +34 -0
  22. package/python/include/python3.13/cpython/bytesobject.h +37 -0
  23. package/python/include/python3.13/cpython/cellobject.h +44 -0
  24. package/python/include/python3.13/cpython/ceval.h +25 -0
  25. package/python/include/python3.13/cpython/classobject.h +71 -0
  26. package/python/include/python3.13/cpython/code.h +358 -0
  27. package/python/include/python3.13/cpython/compile.h +50 -0
  28. package/python/include/python3.13/cpython/complexobject.h +33 -0
  29. package/python/include/python3.13/cpython/context.h +74 -0
  30. package/python/include/python3.13/cpython/critical_section.h +134 -0
  31. package/python/include/python3.13/cpython/descrobject.h +62 -0
  32. package/python/include/python3.13/cpython/dictobject.h +102 -0
  33. package/python/include/python3.13/cpython/fileobject.h +16 -0
  34. package/python/include/python3.13/cpython/fileutils.h +8 -0
  35. package/python/include/python3.13/cpython/floatobject.h +27 -0
  36. package/python/include/python3.13/cpython/frameobject.h +35 -0
  37. package/python/include/python3.13/cpython/funcobject.h +184 -0
  38. package/python/include/python3.13/cpython/genobject.h +83 -0
  39. package/python/include/python3.13/cpython/import.h +25 -0
  40. package/python/include/python3.13/cpython/initconfig.h +274 -0
  41. package/python/include/python3.13/cpython/listobject.h +53 -0
  42. package/python/include/python3.13/cpython/lock.h +63 -0
  43. package/python/include/python3.13/cpython/longintrepr.h +146 -0
  44. package/python/include/python3.13/cpython/longobject.h +116 -0
  45. package/python/include/python3.13/cpython/memoryobject.h +50 -0
  46. package/python/include/python3.13/cpython/methodobject.h +66 -0
  47. package/python/include/python3.13/cpython/modsupport.h +26 -0
  48. package/python/include/python3.13/cpython/monitoring.h +250 -0
  49. package/python/include/python3.13/cpython/object.h +535 -0
  50. package/python/include/python3.13/cpython/objimpl.h +104 -0
  51. package/python/include/python3.13/cpython/odictobject.h +43 -0
  52. package/python/include/python3.13/cpython/picklebufobject.h +31 -0
  53. package/python/include/python3.13/cpython/pthread_stubs.h +105 -0
  54. package/python/include/python3.13/cpython/pyatomic.h +569 -0
  55. package/python/include/python3.13/cpython/pyatomic_gcc.h +551 -0
  56. package/python/include/python3.13/cpython/pyatomic_msc.h +1095 -0
  57. package/python/include/python3.13/cpython/pyatomic_std.h +976 -0
  58. package/python/include/python3.13/cpython/pyctype.h +39 -0
  59. package/python/include/python3.13/cpython/pydebug.h +38 -0
  60. package/python/include/python3.13/cpython/pyerrors.h +132 -0
  61. package/python/include/python3.13/cpython/pyfpe.h +15 -0
  62. package/python/include/python3.13/cpython/pyframe.h +45 -0
  63. package/python/include/python3.13/cpython/pyhash.h +47 -0
  64. package/python/include/python3.13/cpython/pylifecycle.h +92 -0
  65. package/python/include/python3.13/cpython/pymem.h +84 -0
  66. package/python/include/python3.13/cpython/pystate.h +277 -0
  67. package/python/include/python3.13/cpython/pystats.h +175 -0
  68. package/python/include/python3.13/cpython/pythonrun.h +96 -0
  69. package/python/include/python3.13/cpython/pythread.h +43 -0
  70. package/python/include/python3.13/cpython/pytime.h +27 -0
  71. package/python/include/python3.13/cpython/setobject.h +71 -0
  72. package/python/include/python3.13/cpython/sysmodule.h +22 -0
  73. package/python/include/python3.13/cpython/traceback.h +13 -0
  74. package/python/include/python3.13/cpython/tracemalloc.h +32 -0
  75. package/python/include/python3.13/cpython/tupleobject.h +38 -0
  76. package/python/include/python3.13/cpython/unicodeobject.h +703 -0
  77. package/python/include/python3.13/cpython/warnings.h +20 -0
  78. package/python/include/python3.13/cpython/weakrefobject.h +63 -0
  79. package/python/include/python3.13/critical_section.h +16 -0
  80. package/python/include/python3.13/datetime.h +267 -0
  81. package/python/include/python3.13/descrobject.h +100 -0
  82. package/python/include/python3.13/dictobject.h +108 -0
  83. package/python/include/python3.13/dynamic_annotations.h +499 -0
  84. package/python/include/python3.13/enumobject.h +17 -0
  85. package/python/include/python3.13/errcode.h +45 -0
  86. package/python/include/python3.13/exports.h +108 -0
  87. package/python/include/python3.13/fileobject.h +41 -0
  88. package/python/include/python3.13/fileutils.h +62 -0
  89. package/python/include/python3.13/floatobject.h +54 -0
  90. package/python/include/python3.13/frameobject.h +20 -0
  91. package/python/include/python3.13/genericaliasobject.h +14 -0
  92. package/python/include/python3.13/import.h +103 -0
  93. package/python/include/python3.13/internal/mimalloc/mimalloc/atomic.h +392 -0
  94. package/python/include/python3.13/internal/mimalloc/mimalloc/internal.h +969 -0
  95. package/python/include/python3.13/internal/mimalloc/mimalloc/prim.h +329 -0
  96. package/python/include/python3.13/internal/mimalloc/mimalloc/track.h +147 -0
  97. package/python/include/python3.13/internal/mimalloc/mimalloc/types.h +721 -0
  98. package/python/include/python3.13/internal/mimalloc/mimalloc.h +565 -0
  99. package/python/include/python3.13/internal/pycore_abstract.h +61 -0
  100. package/python/include/python3.13/internal/pycore_asdl.h +112 -0
  101. package/python/include/python3.13/internal/pycore_ast.h +926 -0
  102. package/python/include/python3.13/internal/pycore_ast_state.h +268 -0
  103. package/python/include/python3.13/internal/pycore_atexit.h +67 -0
  104. package/python/include/python3.13/internal/pycore_backoff.h +145 -0
  105. package/python/include/python3.13/internal/pycore_bitutils.h +186 -0
  106. package/python/include/python3.13/internal/pycore_blocks_output_buffer.h +321 -0
  107. package/python/include/python3.13/internal/pycore_brc.h +74 -0
  108. package/python/include/python3.13/internal/pycore_bytes_methods.h +82 -0
  109. package/python/include/python3.13/internal/pycore_bytesobject.h +152 -0
  110. package/python/include/python3.13/internal/pycore_call.h +205 -0
  111. package/python/include/python3.13/internal/pycore_capsule.h +17 -0
  112. package/python/include/python3.13/internal/pycore_cell.h +48 -0
  113. package/python/include/python3.13/internal/pycore_ceval.h +305 -0
  114. package/python/include/python3.13/internal/pycore_ceval_state.h +137 -0
  115. package/python/include/python3.13/internal/pycore_code.h +603 -0
  116. package/python/include/python3.13/internal/pycore_codecs.h +86 -0
  117. package/python/include/python3.13/internal/pycore_compile.h +118 -0
  118. package/python/include/python3.13/internal/pycore_complexobject.h +25 -0
  119. package/python/include/python3.13/internal/pycore_condvar.h +93 -0
  120. package/python/include/python3.13/internal/pycore_context.h +61 -0
  121. package/python/include/python3.13/internal/pycore_critical_section.h +233 -0
  122. package/python/include/python3.13/internal/pycore_crossinterp.h +340 -0
  123. package/python/include/python3.13/internal/pycore_descrobject.h +28 -0
  124. package/python/include/python3.13/internal/pycore_dict.h +340 -0
  125. package/python/include/python3.13/internal/pycore_dict_state.h +32 -0
  126. package/python/include/python3.13/internal/pycore_dtoa.h +75 -0
  127. package/python/include/python3.13/internal/pycore_emscripten_signal.h +30 -0
  128. package/python/include/python3.13/internal/pycore_emscripten_trampoline.h +81 -0
  129. package/python/include/python3.13/internal/pycore_exceptions.h +40 -0
  130. package/python/include/python3.13/internal/pycore_faulthandler.h +99 -0
  131. package/python/include/python3.13/internal/pycore_fileutils.h +335 -0
  132. package/python/include/python3.13/internal/pycore_fileutils_windows.h +98 -0
  133. package/python/include/python3.13/internal/pycore_floatobject.h +62 -0
  134. package/python/include/python3.13/internal/pycore_flowgraph.h +40 -0
  135. package/python/include/python3.13/internal/pycore_format.h +27 -0
  136. package/python/include/python3.13/internal/pycore_frame.h +370 -0
  137. package/python/include/python3.13/internal/pycore_freelist.h +153 -0
  138. package/python/include/python3.13/internal/pycore_function.h +55 -0
  139. package/python/include/python3.13/internal/pycore_gc.h +365 -0
  140. package/python/include/python3.13/internal/pycore_genobject.h +32 -0
  141. package/python/include/python3.13/internal/pycore_getopt.h +22 -0
  142. package/python/include/python3.13/internal/pycore_gil.h +66 -0
  143. package/python/include/python3.13/internal/pycore_global_objects.h +105 -0
  144. package/python/include/python3.13/internal/pycore_global_objects_fini_generated.h +1554 -0
  145. package/python/include/python3.13/internal/pycore_global_strings.h +814 -0
  146. package/python/include/python3.13/internal/pycore_hamt.h +134 -0
  147. package/python/include/python3.13/internal/pycore_hashtable.h +150 -0
  148. package/python/include/python3.13/internal/pycore_identifier.h +20 -0
  149. package/python/include/python3.13/internal/pycore_import.h +213 -0
  150. package/python/include/python3.13/internal/pycore_importdl.h +139 -0
  151. package/python/include/python3.13/internal/pycore_initconfig.h +200 -0
  152. package/python/include/python3.13/internal/pycore_instruction_sequence.h +73 -0
  153. package/python/include/python3.13/internal/pycore_instruments.h +75 -0
  154. package/python/include/python3.13/internal/pycore_interp.h +423 -0
  155. package/python/include/python3.13/internal/pycore_intrinsics.h +51 -0
  156. package/python/include/python3.13/internal/pycore_jit.h +25 -0
  157. package/python/include/python3.13/internal/pycore_list.h +66 -0
  158. package/python/include/python3.13/internal/pycore_llist.h +106 -0
  159. package/python/include/python3.13/internal/pycore_lock.h +241 -0
  160. package/python/include/python3.13/internal/pycore_long.h +310 -0
  161. package/python/include/python3.13/internal/pycore_memoryobject.h +20 -0
  162. package/python/include/python3.13/internal/pycore_mimalloc.h +69 -0
  163. package/python/include/python3.13/internal/pycore_modsupport.h +107 -0
  164. package/python/include/python3.13/internal/pycore_moduleobject.h +56 -0
  165. package/python/include/python3.13/internal/pycore_namespace.h +21 -0
  166. package/python/include/python3.13/internal/pycore_object.h +867 -0
  167. package/python/include/python3.13/internal/pycore_object_alloc.h +71 -0
  168. package/python/include/python3.13/internal/pycore_object_stack.h +97 -0
  169. package/python/include/python3.13/internal/pycore_object_state.h +41 -0
  170. package/python/include/python3.13/internal/pycore_obmalloc.h +702 -0
  171. package/python/include/python3.13/internal/pycore_obmalloc_init.h +66 -0
  172. package/python/include/python3.13/internal/pycore_opcode_metadata.h +1922 -0
  173. package/python/include/python3.13/internal/pycore_opcode_utils.h +73 -0
  174. package/python/include/python3.13/internal/pycore_optimizer.h +272 -0
  175. package/python/include/python3.13/internal/pycore_parking_lot.h +97 -0
  176. package/python/include/python3.13/internal/pycore_parser.h +95 -0
  177. package/python/include/python3.13/internal/pycore_pathconfig.h +26 -0
  178. package/python/include/python3.13/internal/pycore_pyarena.h +68 -0
  179. package/python/include/python3.13/internal/pycore_pyatomic_ft_wrappers.h +165 -0
  180. package/python/include/python3.13/internal/pycore_pybuffer.h +21 -0
  181. package/python/include/python3.13/internal/pycore_pyerrors.h +190 -0
  182. package/python/include/python3.13/internal/pycore_pyhash.h +107 -0
  183. package/python/include/python3.13/internal/pycore_pylifecycle.h +136 -0
  184. package/python/include/python3.13/internal/pycore_pymath.h +205 -0
  185. package/python/include/python3.13/internal/pycore_pymem.h +161 -0
  186. package/python/include/python3.13/internal/pycore_pymem_init.h +103 -0
  187. package/python/include/python3.13/internal/pycore_pystate.h +299 -0
  188. package/python/include/python3.13/internal/pycore_pystats.h +21 -0
  189. package/python/include/python3.13/internal/pycore_pythonrun.h +39 -0
  190. package/python/include/python3.13/internal/pycore_pythread.h +172 -0
  191. package/python/include/python3.13/internal/pycore_qsbr.h +173 -0
  192. package/python/include/python3.13/internal/pycore_range.h +21 -0
  193. package/python/include/python3.13/internal/pycore_runtime.h +410 -0
  194. package/python/include/python3.13/internal/pycore_runtime_init.h +329 -0
  195. package/python/include/python3.13/internal/pycore_runtime_init_generated.h +1551 -0
  196. package/python/include/python3.13/internal/pycore_semaphore.h +67 -0
  197. package/python/include/python3.13/internal/pycore_setobject.h +39 -0
  198. package/python/include/python3.13/internal/pycore_signal.h +108 -0
  199. package/python/include/python3.13/internal/pycore_sliceobject.h +20 -0
  200. package/python/include/python3.13/internal/pycore_stackref.h +195 -0
  201. package/python/include/python3.13/internal/pycore_strhex.h +39 -0
  202. package/python/include/python3.13/internal/pycore_structseq.h +40 -0
  203. package/python/include/python3.13/internal/pycore_symtable.h +204 -0
  204. package/python/include/python3.13/internal/pycore_sysmodule.h +38 -0
  205. package/python/include/python3.13/internal/pycore_time.h +337 -0
  206. package/python/include/python3.13/internal/pycore_token.h +106 -0
  207. package/python/include/python3.13/internal/pycore_traceback.h +106 -0
  208. package/python/include/python3.13/internal/pycore_tracemalloc.h +170 -0
  209. package/python/include/python3.13/internal/pycore_tstate.h +46 -0
  210. package/python/include/python3.13/internal/pycore_tuple.h +35 -0
  211. package/python/include/python3.13/internal/pycore_typeobject.h +245 -0
  212. package/python/include/python3.13/internal/pycore_typevarobject.h +27 -0
  213. package/python/include/python3.13/internal/pycore_ucnhash.h +36 -0
  214. package/python/include/python3.13/internal/pycore_unicodeobject.h +351 -0
  215. package/python/include/python3.13/internal/pycore_unicodeobject_generated.h +2980 -0
  216. package/python/include/python3.13/internal/pycore_unionobject.h +25 -0
  217. package/python/include/python3.13/internal/pycore_uop_ids.h +295 -0
  218. package/python/include/python3.13/internal/pycore_uop_metadata.h +1010 -0
  219. package/python/include/python3.13/internal/pycore_warnings.h +31 -0
  220. package/python/include/python3.13/internal/pycore_weakref.h +133 -0
  221. package/python/include/python3.13/intrcheck.h +23 -0
  222. package/python/include/python3.13/iterobject.h +24 -0
  223. package/python/include/python3.13/listobject.h +55 -0
  224. package/python/include/python3.13/lock.h +16 -0
  225. package/python/include/python3.13/longobject.h +114 -0
  226. package/python/include/python3.13/marshal.h +31 -0
  227. package/python/include/python3.13/memoryobject.h +34 -0
  228. package/python/include/python3.13/methodobject.h +137 -0
  229. package/python/include/python3.13/modsupport.h +146 -0
  230. package/python/include/python3.13/moduleobject.h +122 -0
  231. package/python/include/python3.13/monitoring.h +18 -0
  232. package/python/include/python3.13/object.h +1280 -0
  233. package/python/include/python3.13/objimpl.h +211 -0
  234. package/python/include/python3.13/opcode.h +42 -0
  235. package/python/include/python3.13/opcode_ids.h +244 -0
  236. package/python/include/python3.13/osdefs.h +57 -0
  237. package/python/include/python3.13/osmodule.h +17 -0
  238. package/python/include/python3.13/patchlevel.h +35 -0
  239. package/python/include/python3.13/py_curses.h +117 -0
  240. package/python/include/python3.13/pyatomic.h +16 -0
  241. package/python/include/python3.13/pybuffer.h +145 -0
  242. package/python/include/python3.13/pycapsule.h +58 -0
  243. package/python/include/python3.13/pyconfig.h +2033 -0
  244. package/python/include/python3.13/pydtrace.h +59 -0
  245. package/python/include/python3.13/pyerrors.h +335 -0
  246. package/python/include/python3.13/pyexpat.h +62 -0
  247. package/python/include/python3.13/pyframe.h +26 -0
  248. package/python/include/python3.13/pyhash.h +59 -0
  249. package/python/include/python3.13/pylifecycle.h +80 -0
  250. package/python/include/python3.13/pymacconfig.h +91 -0
  251. package/python/include/python3.13/pymacro.h +199 -0
  252. package/python/include/python3.13/pymath.h +62 -0
  253. package/python/include/python3.13/pymem.h +110 -0
  254. package/python/include/python3.13/pyport.h +633 -0
  255. package/python/include/python3.13/pystate.h +132 -0
  256. package/python/include/python3.13/pystats.h +26 -0
  257. package/python/include/python3.13/pystrcmp.h +23 -0
  258. package/python/include/python3.13/pystrtod.h +37 -0
  259. package/python/include/python3.13/pythonrun.h +49 -0
  260. package/python/include/python3.13/pythread.h +131 -0
  261. package/python/include/python3.13/pytypedefs.h +30 -0
  262. package/python/include/python3.13/rangeobject.h +27 -0
  263. package/python/include/python3.13/setobject.h +49 -0
  264. package/python/include/python3.13/sliceobject.h +69 -0
  265. package/python/include/python3.13/structmember.h +56 -0
  266. package/python/include/python3.13/structseq.h +46 -0
  267. package/python/include/python3.13/sysmodule.h +44 -0
  268. package/python/include/python3.13/traceback.h +26 -0
  269. package/python/include/python3.13/tupleobject.h +46 -0
  270. package/python/include/python3.13/typeslots.h +88 -0
  271. package/python/include/python3.13/unicodeobject.h +1021 -0
  272. package/python/include/python3.13/warnings.h +45 -0
  273. package/python/include/python3.13/weakrefobject.h +46 -0
  274. package/python/lib/itcl4.3.5/itcl.tcl +151 -0
  275. package/python/lib/itcl4.3.5/itclConfig.sh +67 -0
  276. package/python/lib/itcl4.3.5/itclHullCmds.tcl +562 -0
  277. package/python/lib/itcl4.3.5/itclWidget.tcl +447 -0
  278. package/python/lib/itcl4.3.5/libitcl4.3.5.dylib +0 -0
  279. package/python/lib/itcl4.3.5/libitclstub.a +0 -0
  280. package/python/lib/itcl4.3.5/libitclstub4.3.5.a +0 -0
  281. package/python/lib/itcl4.3.5/libtcl9itcl4.3.5.dylib +0 -0
  282. package/python/lib/itcl4.3.5/pkgIndex.tcl +14 -0
  283. package/python/lib/libpython3.13.dylib +0 -0
  284. package/python/lib/libtcl9.0.dylib +0 -0
  285. package/python/lib/libtcl9tk9.0.dylib +0 -0
  286. package/python/lib/pkgconfig/python-3.13-embed.pc +13 -0
  287. package/python/lib/pkgconfig/python-3.13.pc +13 -0
  288. package/python/lib/python3.13/LICENSE.txt +277 -0
  289. package/python/lib/python3.13/__future__.py +147 -0
  290. package/python/lib/python3.13/__hello__.py +16 -0
  291. package/python/lib/python3.13/__phello__/__init__.py +7 -0
  292. package/python/lib/python3.13/__phello__/spam.py +7 -0
  293. package/python/lib/python3.13/_aix_support.py +108 -0
  294. package/python/lib/python3.13/_android_support.py +192 -0
  295. package/python/lib/python3.13/_apple_support.py +66 -0
  296. package/python/lib/python3.13/_collections_abc.py +1182 -0
  297. package/python/lib/python3.13/_colorize.py +119 -0
  298. package/python/lib/python3.13/_compat_pickle.py +251 -0
  299. package/python/lib/python3.13/_compression.py +162 -0
  300. package/python/lib/python3.13/_ios_support.py +71 -0
  301. package/python/lib/python3.13/_markupbase.py +396 -0
  302. package/python/lib/python3.13/_opcode_metadata.py +343 -0
  303. package/python/lib/python3.13/_osx_support.py +579 -0
  304. package/python/lib/python3.13/_py_abc.py +147 -0
  305. package/python/lib/python3.13/_pydatetime.py +2639 -0
  306. package/python/lib/python3.13/_pydecimal.py +6351 -0
  307. package/python/lib/python3.13/_pyio.py +2704 -0
  308. package/python/lib/python3.13/_pylong.py +363 -0
  309. package/python/lib/python3.13/_pyrepl/__init__.py +19 -0
  310. package/python/lib/python3.13/_pyrepl/__main__.py +10 -0
  311. package/python/lib/python3.13/_pyrepl/_minimal_curses.py +68 -0
  312. package/python/lib/python3.13/_pyrepl/_threading_handler.py +74 -0
  313. package/python/lib/python3.13/_pyrepl/base_eventqueue.py +110 -0
  314. package/python/lib/python3.13/_pyrepl/commands.py +492 -0
  315. package/python/lib/python3.13/_pyrepl/completing_reader.py +295 -0
  316. package/python/lib/python3.13/_pyrepl/console.py +229 -0
  317. package/python/lib/python3.13/_pyrepl/curses.py +33 -0
  318. package/python/lib/python3.13/_pyrepl/fancy_termios.py +82 -0
  319. package/python/lib/python3.13/_pyrepl/historical_reader.py +419 -0
  320. package/python/lib/python3.13/_pyrepl/input.py +114 -0
  321. package/python/lib/python3.13/_pyrepl/keymap.py +213 -0
  322. package/python/lib/python3.13/_pyrepl/main.py +59 -0
  323. package/python/lib/python3.13/_pyrepl/mypy.ini +29 -0
  324. package/python/lib/python3.13/_pyrepl/pager.py +175 -0
  325. package/python/lib/python3.13/_pyrepl/reader.py +764 -0
  326. package/python/lib/python3.13/_pyrepl/readline.py +599 -0
  327. package/python/lib/python3.13/_pyrepl/simple_interact.py +180 -0
  328. package/python/lib/python3.13/_pyrepl/trace.py +21 -0
  329. package/python/lib/python3.13/_pyrepl/types.py +10 -0
  330. package/python/lib/python3.13/_pyrepl/unix_console.py +852 -0
  331. package/python/lib/python3.13/_pyrepl/unix_eventqueue.py +76 -0
  332. package/python/lib/python3.13/_pyrepl/utils.py +83 -0
  333. package/python/lib/python3.13/_pyrepl/windows_console.py +692 -0
  334. package/python/lib/python3.13/_pyrepl/windows_eventqueue.py +42 -0
  335. package/python/lib/python3.13/_sitebuiltins.py +91 -0
  336. package/python/lib/python3.13/_strptime.py +800 -0
  337. package/python/lib/python3.13/_sysconfigdata__darwin_darwin.py +1028 -0
  338. package/python/lib/python3.13/_threading_local.py +120 -0
  339. package/python/lib/python3.13/_weakrefset.py +205 -0
  340. package/python/lib/python3.13/abc.py +188 -0
  341. package/python/lib/python3.13/antigravity.py +17 -0
  342. package/python/lib/python3.13/argparse.py +2690 -0
  343. package/python/lib/python3.13/ast.py +1865 -0
  344. package/python/lib/python3.13/asyncio/__init__.py +47 -0
  345. package/python/lib/python3.13/asyncio/__main__.py +207 -0
  346. package/python/lib/python3.13/asyncio/base_events.py +2075 -0
  347. package/python/lib/python3.13/asyncio/base_futures.py +67 -0
  348. package/python/lib/python3.13/asyncio/base_subprocess.py +319 -0
  349. package/python/lib/python3.13/asyncio/base_tasks.py +94 -0
  350. package/python/lib/python3.13/asyncio/constants.py +41 -0
  351. package/python/lib/python3.13/asyncio/coroutines.py +109 -0
  352. package/python/lib/python3.13/asyncio/events.py +882 -0
  353. package/python/lib/python3.13/asyncio/exceptions.py +62 -0
  354. package/python/lib/python3.13/asyncio/format_helpers.py +84 -0
  355. package/python/lib/python3.13/asyncio/futures.py +425 -0
  356. package/python/lib/python3.13/asyncio/locks.py +617 -0
  357. package/python/lib/python3.13/asyncio/log.py +7 -0
  358. package/python/lib/python3.13/asyncio/mixins.py +21 -0
  359. package/python/lib/python3.13/asyncio/proactor_events.py +896 -0
  360. package/python/lib/python3.13/asyncio/protocols.py +216 -0
  361. package/python/lib/python3.13/asyncio/queues.py +307 -0
  362. package/python/lib/python3.13/asyncio/runners.py +216 -0
  363. package/python/lib/python3.13/asyncio/selector_events.py +1326 -0
  364. package/python/lib/python3.13/asyncio/sslproto.py +929 -0
  365. package/python/lib/python3.13/asyncio/staggered.py +174 -0
  366. package/python/lib/python3.13/asyncio/streams.py +787 -0
  367. package/python/lib/python3.13/asyncio/subprocess.py +229 -0
  368. package/python/lib/python3.13/asyncio/taskgroups.py +278 -0
  369. package/python/lib/python3.13/asyncio/tasks.py +1118 -0
  370. package/python/lib/python3.13/asyncio/threads.py +25 -0
  371. package/python/lib/python3.13/asyncio/timeouts.py +184 -0
  372. package/python/lib/python3.13/asyncio/transports.py +337 -0
  373. package/python/lib/python3.13/asyncio/trsock.py +98 -0
  374. package/python/lib/python3.13/asyncio/unix_events.py +1536 -0
  375. package/python/lib/python3.13/asyncio/windows_events.py +903 -0
  376. package/python/lib/python3.13/asyncio/windows_utils.py +173 -0
  377. package/python/lib/python3.13/base64.py +621 -0
  378. package/python/lib/python3.13/bdb.py +973 -0
  379. package/python/lib/python3.13/bisect.py +118 -0
  380. package/python/lib/python3.13/bz2.py +352 -0
  381. package/python/lib/python3.13/cProfile.py +197 -0
  382. package/python/lib/python3.13/calendar.py +813 -0
  383. package/python/lib/python3.13/cmd.py +409 -0
  384. package/python/lib/python3.13/code.py +386 -0
  385. package/python/lib/python3.13/codecs.py +1132 -0
  386. package/python/lib/python3.13/codeop.py +155 -0
  387. package/python/lib/python3.13/collections/__init__.py +1600 -0
  388. package/python/lib/python3.13/colorsys.py +166 -0
  389. package/python/lib/python3.13/compileall.py +470 -0
  390. package/python/lib/python3.13/concurrent/__init__.py +1 -0
  391. package/python/lib/python3.13/concurrent/futures/__init__.py +54 -0
  392. package/python/lib/python3.13/concurrent/futures/_base.py +654 -0
  393. package/python/lib/python3.13/concurrent/futures/process.py +862 -0
  394. package/python/lib/python3.13/concurrent/futures/thread.py +240 -0
  395. package/python/lib/python3.13/config-3.13-darwin/Makefile +3505 -0
  396. package/python/lib/python3.13/config-3.13-darwin/Setup +298 -0
  397. package/python/lib/python3.13/config-3.13-darwin/Setup.bootstrap +38 -0
  398. package/python/lib/python3.13/config-3.13-darwin/Setup.local +89 -0
  399. package/python/lib/python3.13/config-3.13-darwin/Setup.stdlib +181 -0
  400. package/python/lib/python3.13/config-3.13-darwin/config.c +260 -0
  401. package/python/lib/python3.13/config-3.13-darwin/config.c.in +71 -0
  402. package/python/lib/python3.13/config-3.13-darwin/install-sh +541 -0
  403. package/python/lib/python3.13/config-3.13-darwin/makesetup +341 -0
  404. package/python/lib/python3.13/config-3.13-darwin/python-config.py +76 -0
  405. package/python/lib/python3.13/config-3.13-darwin/python.o +0 -0
  406. package/python/lib/python3.13/configparser.py +1387 -0
  407. package/python/lib/python3.13/contextlib.py +814 -0
  408. package/python/lib/python3.13/contextvars.py +4 -0
  409. package/python/lib/python3.13/copy.py +306 -0
  410. package/python/lib/python3.13/copyreg.py +217 -0
  411. package/python/lib/python3.13/csv.py +513 -0
  412. package/python/lib/python3.13/ctypes/__init__.py +603 -0
  413. package/python/lib/python3.13/ctypes/_aix.py +327 -0
  414. package/python/lib/python3.13/ctypes/_endian.py +78 -0
  415. package/python/lib/python3.13/ctypes/macholib/README.ctypes +7 -0
  416. package/python/lib/python3.13/ctypes/macholib/__init__.py +9 -0
  417. package/python/lib/python3.13/ctypes/macholib/dyld.py +165 -0
  418. package/python/lib/python3.13/ctypes/macholib/dylib.py +42 -0
  419. package/python/lib/python3.13/ctypes/macholib/fetch_macholib +2 -0
  420. package/python/lib/python3.13/ctypes/macholib/fetch_macholib.bat +1 -0
  421. package/python/lib/python3.13/ctypes/macholib/framework.py +42 -0
  422. package/python/lib/python3.13/ctypes/util.py +388 -0
  423. package/python/lib/python3.13/ctypes/wintypes.py +202 -0
  424. package/python/lib/python3.13/curses/__init__.py +101 -0
  425. package/python/lib/python3.13/curses/ascii.py +99 -0
  426. package/python/lib/python3.13/curses/has_key.py +192 -0
  427. package/python/lib/python3.13/curses/panel.py +6 -0
  428. package/python/lib/python3.13/curses/textpad.py +204 -0
  429. package/python/lib/python3.13/dataclasses.py +1630 -0
  430. package/python/lib/python3.13/datetime.py +9 -0
  431. package/python/lib/python3.13/dbm/__init__.py +194 -0
  432. package/python/lib/python3.13/dbm/dumb.py +319 -0
  433. package/python/lib/python3.13/dbm/gnu.py +3 -0
  434. package/python/lib/python3.13/dbm/ndbm.py +3 -0
  435. package/python/lib/python3.13/dbm/sqlite3.py +144 -0
  436. package/python/lib/python3.13/decimal.py +109 -0
  437. package/python/lib/python3.13/difflib.py +2056 -0
  438. package/python/lib/python3.13/dis.py +1075 -0
  439. package/python/lib/python3.13/doctest.py +2919 -0
  440. package/python/lib/python3.13/email/__init__.py +61 -0
  441. package/python/lib/python3.13/email/_encoded_words.py +233 -0
  442. package/python/lib/python3.13/email/_header_value_parser.py +3145 -0
  443. package/python/lib/python3.13/email/_parseaddr.py +563 -0
  444. package/python/lib/python3.13/email/_policybase.py +382 -0
  445. package/python/lib/python3.13/email/architecture.rst +216 -0
  446. package/python/lib/python3.13/email/base64mime.py +115 -0
  447. package/python/lib/python3.13/email/charset.py +398 -0
  448. package/python/lib/python3.13/email/contentmanager.py +253 -0
  449. package/python/lib/python3.13/email/encoders.py +65 -0
  450. package/python/lib/python3.13/email/errors.py +117 -0
  451. package/python/lib/python3.13/email/feedparser.py +536 -0
  452. package/python/lib/python3.13/email/generator.py +530 -0
  453. package/python/lib/python3.13/email/header.py +582 -0
  454. package/python/lib/python3.13/email/headerregistry.py +618 -0
  455. package/python/lib/python3.13/email/iterators.py +68 -0
  456. package/python/lib/python3.13/email/message.py +1217 -0
  457. package/python/lib/python3.13/email/mime/__init__.py +0 -0
  458. package/python/lib/python3.13/email/mime/application.py +37 -0
  459. package/python/lib/python3.13/email/mime/audio.py +97 -0
  460. package/python/lib/python3.13/email/mime/base.py +29 -0
  461. package/python/lib/python3.13/email/mime/image.py +152 -0
  462. package/python/lib/python3.13/email/mime/message.py +33 -0
  463. package/python/lib/python3.13/email/mime/multipart.py +47 -0
  464. package/python/lib/python3.13/email/mime/nonmultipart.py +21 -0
  465. package/python/lib/python3.13/email/mime/text.py +40 -0
  466. package/python/lib/python3.13/email/parser.py +127 -0
  467. package/python/lib/python3.13/email/policy.py +232 -0
  468. package/python/lib/python3.13/email/quoprimime.py +300 -0
  469. package/python/lib/python3.13/email/utils.py +494 -0
  470. package/python/lib/python3.13/encodings/__init__.py +174 -0
  471. package/python/lib/python3.13/encodings/aliases.py +552 -0
  472. package/python/lib/python3.13/encodings/ascii.py +50 -0
  473. package/python/lib/python3.13/encodings/base64_codec.py +55 -0
  474. package/python/lib/python3.13/encodings/big5.py +39 -0
  475. package/python/lib/python3.13/encodings/big5hkscs.py +39 -0
  476. package/python/lib/python3.13/encodings/bz2_codec.py +78 -0
  477. package/python/lib/python3.13/encodings/charmap.py +69 -0
  478. package/python/lib/python3.13/encodings/cp037.py +307 -0
  479. package/python/lib/python3.13/encodings/cp1006.py +307 -0
  480. package/python/lib/python3.13/encodings/cp1026.py +307 -0
  481. package/python/lib/python3.13/encodings/cp1125.py +698 -0
  482. package/python/lib/python3.13/encodings/cp1140.py +307 -0
  483. package/python/lib/python3.13/encodings/cp1250.py +307 -0
  484. package/python/lib/python3.13/encodings/cp1251.py +307 -0
  485. package/python/lib/python3.13/encodings/cp1252.py +307 -0
  486. package/python/lib/python3.13/encodings/cp1253.py +307 -0
  487. package/python/lib/python3.13/encodings/cp1254.py +307 -0
  488. package/python/lib/python3.13/encodings/cp1255.py +307 -0
  489. package/python/lib/python3.13/encodings/cp1256.py +307 -0
  490. package/python/lib/python3.13/encodings/cp1257.py +307 -0
  491. package/python/lib/python3.13/encodings/cp1258.py +307 -0
  492. package/python/lib/python3.13/encodings/cp273.py +307 -0
  493. package/python/lib/python3.13/encodings/cp424.py +307 -0
  494. package/python/lib/python3.13/encodings/cp437.py +698 -0
  495. package/python/lib/python3.13/encodings/cp500.py +307 -0
  496. package/python/lib/python3.13/encodings/cp720.py +309 -0
  497. package/python/lib/python3.13/encodings/cp737.py +698 -0
  498. package/python/lib/python3.13/encodings/cp775.py +697 -0
  499. package/python/lib/python3.13/encodings/cp850.py +698 -0
  500. package/python/lib/python3.13/encodings/cp852.py +698 -0
  501. package/python/lib/python3.13/encodings/cp855.py +698 -0
  502. package/python/lib/python3.13/encodings/cp856.py +307 -0
  503. package/python/lib/python3.13/encodings/cp857.py +694 -0
  504. package/python/lib/python3.13/encodings/cp858.py +698 -0
  505. package/python/lib/python3.13/encodings/cp860.py +698 -0
  506. package/python/lib/python3.13/encodings/cp861.py +698 -0
  507. package/python/lib/python3.13/encodings/cp862.py +698 -0
  508. package/python/lib/python3.13/encodings/cp863.py +698 -0
  509. package/python/lib/python3.13/encodings/cp864.py +690 -0
  510. package/python/lib/python3.13/encodings/cp865.py +698 -0
  511. package/python/lib/python3.13/encodings/cp866.py +698 -0
  512. package/python/lib/python3.13/encodings/cp869.py +689 -0
  513. package/python/lib/python3.13/encodings/cp874.py +307 -0
  514. package/python/lib/python3.13/encodings/cp875.py +307 -0
  515. package/python/lib/python3.13/encodings/cp932.py +39 -0
  516. package/python/lib/python3.13/encodings/cp949.py +39 -0
  517. package/python/lib/python3.13/encodings/cp950.py +39 -0
  518. package/python/lib/python3.13/encodings/euc_jis_2004.py +39 -0
  519. package/python/lib/python3.13/encodings/euc_jisx0213.py +39 -0
  520. package/python/lib/python3.13/encodings/euc_jp.py +39 -0
  521. package/python/lib/python3.13/encodings/euc_kr.py +39 -0
  522. package/python/lib/python3.13/encodings/gb18030.py +39 -0
  523. package/python/lib/python3.13/encodings/gb2312.py +39 -0
  524. package/python/lib/python3.13/encodings/gbk.py +39 -0
  525. package/python/lib/python3.13/encodings/hex_codec.py +55 -0
  526. package/python/lib/python3.13/encodings/hp_roman8.py +314 -0
  527. package/python/lib/python3.13/encodings/hz.py +39 -0
  528. package/python/lib/python3.13/encodings/idna.py +387 -0
  529. package/python/lib/python3.13/encodings/iso2022_jp.py +39 -0
  530. package/python/lib/python3.13/encodings/iso2022_jp_1.py +39 -0
  531. package/python/lib/python3.13/encodings/iso2022_jp_2.py +39 -0
  532. package/python/lib/python3.13/encodings/iso2022_jp_2004.py +39 -0
  533. package/python/lib/python3.13/encodings/iso2022_jp_3.py +39 -0
  534. package/python/lib/python3.13/encodings/iso2022_jp_ext.py +39 -0
  535. package/python/lib/python3.13/encodings/iso2022_kr.py +39 -0
  536. package/python/lib/python3.13/encodings/iso8859_1.py +307 -0
  537. package/python/lib/python3.13/encodings/iso8859_10.py +307 -0
  538. package/python/lib/python3.13/encodings/iso8859_11.py +307 -0
  539. package/python/lib/python3.13/encodings/iso8859_13.py +307 -0
  540. package/python/lib/python3.13/encodings/iso8859_14.py +307 -0
  541. package/python/lib/python3.13/encodings/iso8859_15.py +307 -0
  542. package/python/lib/python3.13/encodings/iso8859_16.py +307 -0
  543. package/python/lib/python3.13/encodings/iso8859_2.py +307 -0
  544. package/python/lib/python3.13/encodings/iso8859_3.py +307 -0
  545. package/python/lib/python3.13/encodings/iso8859_4.py +307 -0
  546. package/python/lib/python3.13/encodings/iso8859_5.py +307 -0
  547. package/python/lib/python3.13/encodings/iso8859_6.py +307 -0
  548. package/python/lib/python3.13/encodings/iso8859_7.py +307 -0
  549. package/python/lib/python3.13/encodings/iso8859_8.py +307 -0
  550. package/python/lib/python3.13/encodings/iso8859_9.py +307 -0
  551. package/python/lib/python3.13/encodings/johab.py +39 -0
  552. package/python/lib/python3.13/encodings/koi8_r.py +307 -0
  553. package/python/lib/python3.13/encodings/koi8_t.py +308 -0
  554. package/python/lib/python3.13/encodings/koi8_u.py +307 -0
  555. package/python/lib/python3.13/encodings/kz1048.py +307 -0
  556. package/python/lib/python3.13/encodings/latin_1.py +50 -0
  557. package/python/lib/python3.13/encodings/mac_arabic.py +698 -0
  558. package/python/lib/python3.13/encodings/mac_croatian.py +307 -0
  559. package/python/lib/python3.13/encodings/mac_cyrillic.py +307 -0
  560. package/python/lib/python3.13/encodings/mac_farsi.py +307 -0
  561. package/python/lib/python3.13/encodings/mac_greek.py +307 -0
  562. package/python/lib/python3.13/encodings/mac_iceland.py +307 -0
  563. package/python/lib/python3.13/encodings/mac_latin2.py +312 -0
  564. package/python/lib/python3.13/encodings/mac_roman.py +307 -0
  565. package/python/lib/python3.13/encodings/mac_romanian.py +307 -0
  566. package/python/lib/python3.13/encodings/mac_turkish.py +307 -0
  567. package/python/lib/python3.13/encodings/mbcs.py +47 -0
  568. package/python/lib/python3.13/encodings/oem.py +41 -0
  569. package/python/lib/python3.13/encodings/palmos.py +308 -0
  570. package/python/lib/python3.13/encodings/ptcp154.py +312 -0
  571. package/python/lib/python3.13/encodings/punycode.py +253 -0
  572. package/python/lib/python3.13/encodings/quopri_codec.py +56 -0
  573. package/python/lib/python3.13/encodings/raw_unicode_escape.py +46 -0
  574. package/python/lib/python3.13/encodings/rot_13.py +113 -0
  575. package/python/lib/python3.13/encodings/shift_jis.py +39 -0
  576. package/python/lib/python3.13/encodings/shift_jis_2004.py +39 -0
  577. package/python/lib/python3.13/encodings/shift_jisx0213.py +39 -0
  578. package/python/lib/python3.13/encodings/tis_620.py +307 -0
  579. package/python/lib/python3.13/encodings/undefined.py +49 -0
  580. package/python/lib/python3.13/encodings/unicode_escape.py +46 -0
  581. package/python/lib/python3.13/encodings/utf_16.py +155 -0
  582. package/python/lib/python3.13/encodings/utf_16_be.py +42 -0
  583. package/python/lib/python3.13/encodings/utf_16_le.py +42 -0
  584. package/python/lib/python3.13/encodings/utf_32.py +150 -0
  585. package/python/lib/python3.13/encodings/utf_32_be.py +37 -0
  586. package/python/lib/python3.13/encodings/utf_32_le.py +37 -0
  587. package/python/lib/python3.13/encodings/utf_7.py +38 -0
  588. package/python/lib/python3.13/encodings/utf_8.py +42 -0
  589. package/python/lib/python3.13/encodings/utf_8_sig.py +130 -0
  590. package/python/lib/python3.13/encodings/uu_codec.py +103 -0
  591. package/python/lib/python3.13/encodings/zlib_codec.py +77 -0
  592. package/python/lib/python3.13/ensurepip/__init__.py +264 -0
  593. package/python/lib/python3.13/ensurepip/__main__.py +5 -0
  594. package/python/lib/python3.13/ensurepip/_bundled/pip-25.3-py3-none-any.whl +0 -0
  595. package/python/lib/python3.13/ensurepip/_uninstall.py +31 -0
  596. package/python/lib/python3.13/enum.py +2182 -0
  597. package/python/lib/python3.13/filecmp.py +320 -0
  598. package/python/lib/python3.13/fileinput.py +442 -0
  599. package/python/lib/python3.13/fnmatch.py +192 -0
  600. package/python/lib/python3.13/fractions.py +1043 -0
  601. package/python/lib/python3.13/ftplib.py +966 -0
  602. package/python/lib/python3.13/functools.py +1036 -0
  603. package/python/lib/python3.13/genericpath.py +200 -0
  604. package/python/lib/python3.13/getopt.py +215 -0
  605. package/python/lib/python3.13/getpass.py +192 -0
  606. package/python/lib/python3.13/gettext.py +657 -0
  607. package/python/lib/python3.13/glob.py +551 -0
  608. package/python/lib/python3.13/graphlib.py +250 -0
  609. package/python/lib/python3.13/gzip.py +691 -0
  610. package/python/lib/python3.13/hashlib.py +255 -0
  611. package/python/lib/python3.13/heapq.py +603 -0
  612. package/python/lib/python3.13/hmac.py +220 -0
  613. package/python/lib/python3.13/html/__init__.py +132 -0
  614. package/python/lib/python3.13/html/entities.py +2513 -0
  615. package/python/lib/python3.13/html/parser.py +553 -0
  616. package/python/lib/python3.13/http/__init__.py +202 -0
  617. package/python/lib/python3.13/http/client.py +1570 -0
  618. package/python/lib/python3.13/http/cookiejar.py +2122 -0
  619. package/python/lib/python3.13/http/cookies.py +615 -0
  620. package/python/lib/python3.13/http/server.py +1351 -0
  621. package/python/lib/python3.13/idlelib/CREDITS.txt +48 -0
  622. package/python/lib/python3.13/idlelib/ChangeLog +1591 -0
  623. package/python/lib/python3.13/idlelib/HISTORY.txt +296 -0
  624. package/python/lib/python3.13/idlelib/Icons/README.txt +51 -0
  625. package/python/lib/python3.13/idlelib/Icons/folder.gif +0 -0
  626. package/python/lib/python3.13/idlelib/Icons/idle.ico +0 -0
  627. package/python/lib/python3.13/idlelib/Icons/idle_16.gif +0 -0
  628. package/python/lib/python3.13/idlelib/Icons/idle_16.png +0 -0
  629. package/python/lib/python3.13/idlelib/Icons/idle_256.png +0 -0
  630. package/python/lib/python3.13/idlelib/Icons/idle_32.gif +0 -0
  631. package/python/lib/python3.13/idlelib/Icons/idle_32.png +0 -0
  632. package/python/lib/python3.13/idlelib/Icons/idle_48.gif +0 -0
  633. package/python/lib/python3.13/idlelib/Icons/idle_48.png +0 -0
  634. package/python/lib/python3.13/idlelib/Icons/minusnode.gif +0 -0
  635. package/python/lib/python3.13/idlelib/Icons/openfolder.gif +0 -0
  636. package/python/lib/python3.13/idlelib/Icons/plusnode.gif +0 -0
  637. package/python/lib/python3.13/idlelib/Icons/python.gif +0 -0
  638. package/python/lib/python3.13/idlelib/Icons/tk.gif +0 -0
  639. package/python/lib/python3.13/idlelib/NEWS2x.txt +660 -0
  640. package/python/lib/python3.13/idlelib/News3.txt +1407 -0
  641. package/python/lib/python3.13/idlelib/README.txt +290 -0
  642. package/python/lib/python3.13/idlelib/TODO.txt +210 -0
  643. package/python/lib/python3.13/idlelib/__init__.py +10 -0
  644. package/python/lib/python3.13/idlelib/__main__.py +7 -0
  645. package/python/lib/python3.13/idlelib/autocomplete.py +228 -0
  646. package/python/lib/python3.13/idlelib/autocomplete_w.py +498 -0
  647. package/python/lib/python3.13/idlelib/autoexpand.py +96 -0
  648. package/python/lib/python3.13/idlelib/browser.py +260 -0
  649. package/python/lib/python3.13/idlelib/calltip.py +205 -0
  650. package/python/lib/python3.13/idlelib/calltip_w.py +202 -0
  651. package/python/lib/python3.13/idlelib/codecontext.py +270 -0
  652. package/python/lib/python3.13/idlelib/colorizer.py +384 -0
  653. package/python/lib/python3.13/idlelib/config-extensions.def +62 -0
  654. package/python/lib/python3.13/idlelib/config-highlight.def +105 -0
  655. package/python/lib/python3.13/idlelib/config-keys.def +309 -0
  656. package/python/lib/python3.13/idlelib/config-main.def +92 -0
  657. package/python/lib/python3.13/idlelib/config.py +917 -0
  658. package/python/lib/python3.13/idlelib/config_key.py +354 -0
  659. package/python/lib/python3.13/idlelib/configdialog.py +2408 -0
  660. package/python/lib/python3.13/idlelib/debugger.py +602 -0
  661. package/python/lib/python3.13/idlelib/debugger_r.py +390 -0
  662. package/python/lib/python3.13/idlelib/debugobj.py +146 -0
  663. package/python/lib/python3.13/idlelib/debugobj_r.py +41 -0
  664. package/python/lib/python3.13/idlelib/delegator.py +34 -0
  665. package/python/lib/python3.13/idlelib/dynoption.py +57 -0
  666. package/python/lib/python3.13/idlelib/editor.py +1721 -0
  667. package/python/lib/python3.13/idlelib/extend.txt +83 -0
  668. package/python/lib/python3.13/idlelib/filelist.py +132 -0
  669. package/python/lib/python3.13/idlelib/format.py +426 -0
  670. package/python/lib/python3.13/idlelib/grep.py +223 -0
  671. package/python/lib/python3.13/idlelib/help.html +865 -0
  672. package/python/lib/python3.13/idlelib/help.py +343 -0
  673. package/python/lib/python3.13/idlelib/help_about.py +211 -0
  674. package/python/lib/python3.13/idlelib/history.py +106 -0
  675. package/python/lib/python3.13/idlelib/hyperparser.py +312 -0
  676. package/python/lib/python3.13/idlelib/idle.bat +4 -0
  677. package/python/lib/python3.13/idlelib/idle.py +14 -0
  678. package/python/lib/python3.13/idlelib/idle.pyw +17 -0
  679. package/python/lib/python3.13/idlelib/iomenu.py +441 -0
  680. package/python/lib/python3.13/idlelib/macosx.py +278 -0
  681. package/python/lib/python3.13/idlelib/mainmenu.py +126 -0
  682. package/python/lib/python3.13/idlelib/multicall.py +451 -0
  683. package/python/lib/python3.13/idlelib/outwin.py +188 -0
  684. package/python/lib/python3.13/idlelib/parenmatch.py +183 -0
  685. package/python/lib/python3.13/idlelib/pathbrowser.py +107 -0
  686. package/python/lib/python3.13/idlelib/percolator.py +120 -0
  687. package/python/lib/python3.13/idlelib/pyparse.py +589 -0
  688. package/python/lib/python3.13/idlelib/pyshell.py +1699 -0
  689. package/python/lib/python3.13/idlelib/query.py +390 -0
  690. package/python/lib/python3.13/idlelib/redirector.py +174 -0
  691. package/python/lib/python3.13/idlelib/replace.py +299 -0
  692. package/python/lib/python3.13/idlelib/rpc.py +635 -0
  693. package/python/lib/python3.13/idlelib/run.py +653 -0
  694. package/python/lib/python3.13/idlelib/runscript.py +213 -0
  695. package/python/lib/python3.13/idlelib/scrolledlist.py +151 -0
  696. package/python/lib/python3.13/idlelib/search.py +165 -0
  697. package/python/lib/python3.13/idlelib/searchbase.py +210 -0
  698. package/python/lib/python3.13/idlelib/searchengine.py +234 -0
  699. package/python/lib/python3.13/idlelib/sidebar.py +543 -0
  700. package/python/lib/python3.13/idlelib/squeezer.py +345 -0
  701. package/python/lib/python3.13/idlelib/stackviewer.py +134 -0
  702. package/python/lib/python3.13/idlelib/statusbar.py +52 -0
  703. package/python/lib/python3.13/idlelib/textview.py +193 -0
  704. package/python/lib/python3.13/idlelib/tooltip.py +190 -0
  705. package/python/lib/python3.13/idlelib/tree.py +509 -0
  706. package/python/lib/python3.13/idlelib/undo.py +367 -0
  707. package/python/lib/python3.13/idlelib/util.py +37 -0
  708. package/python/lib/python3.13/idlelib/window.py +98 -0
  709. package/python/lib/python3.13/idlelib/zoomheight.py +124 -0
  710. package/python/lib/python3.13/idlelib/zzdummy.py +73 -0
  711. package/python/lib/python3.13/imaplib.py +1651 -0
  712. package/python/lib/python3.13/importlib/__init__.py +136 -0
  713. package/python/lib/python3.13/importlib/_abc.py +39 -0
  714. package/python/lib/python3.13/importlib/_bootstrap.py +1551 -0
  715. package/python/lib/python3.13/importlib/_bootstrap_external.py +1826 -0
  716. package/python/lib/python3.13/importlib/abc.py +243 -0
  717. package/python/lib/python3.13/importlib/machinery.py +21 -0
  718. package/python/lib/python3.13/importlib/metadata/__init__.py +1093 -0
  719. package/python/lib/python3.13/importlib/metadata/_adapters.py +89 -0
  720. package/python/lib/python3.13/importlib/metadata/_collections.py +30 -0
  721. package/python/lib/python3.13/importlib/metadata/_functools.py +104 -0
  722. package/python/lib/python3.13/importlib/metadata/_itertools.py +73 -0
  723. package/python/lib/python3.13/importlib/metadata/_meta.py +67 -0
  724. package/python/lib/python3.13/importlib/metadata/_text.py +99 -0
  725. package/python/lib/python3.13/importlib/metadata/diagnose.py +21 -0
  726. package/python/lib/python3.13/importlib/readers.py +12 -0
  727. package/python/lib/python3.13/importlib/resources/__init__.py +43 -0
  728. package/python/lib/python3.13/importlib/resources/_adapters.py +168 -0
  729. package/python/lib/python3.13/importlib/resources/_common.py +211 -0
  730. package/python/lib/python3.13/importlib/resources/_functional.py +81 -0
  731. package/python/lib/python3.13/importlib/resources/_itertools.py +38 -0
  732. package/python/lib/python3.13/importlib/resources/abc.py +173 -0
  733. package/python/lib/python3.13/importlib/resources/readers.py +203 -0
  734. package/python/lib/python3.13/importlib/resources/simple.py +106 -0
  735. package/python/lib/python3.13/importlib/simple.py +14 -0
  736. package/python/lib/python3.13/importlib/util.py +274 -0
  737. package/python/lib/python3.13/inspect.py +3471 -0
  738. package/python/lib/python3.13/io.py +99 -0
  739. package/python/lib/python3.13/ipaddress.py +2440 -0
  740. package/python/lib/python3.13/json/__init__.py +365 -0
  741. package/python/lib/python3.13/json/decoder.py +364 -0
  742. package/python/lib/python3.13/json/encoder.py +446 -0
  743. package/python/lib/python3.13/json/scanner.py +73 -0
  744. package/python/lib/python3.13/json/tool.py +89 -0
  745. package/python/lib/python3.13/keyword.py +64 -0
  746. package/python/lib/python3.13/lib-dynload/.empty +0 -0
  747. package/python/lib/python3.13/lib-dynload/_ctypes_test.cpython-313-darwin.so +0 -0
  748. package/python/lib/python3.13/lib-dynload/_dbm.cpython-313-darwin.so +0 -0
  749. package/python/lib/python3.13/lib-dynload/_tkinter.cpython-313-darwin.so +0 -0
  750. package/python/lib/python3.13/linecache.py +236 -0
  751. package/python/lib/python3.13/locale.py +1778 -0
  752. package/python/lib/python3.13/logging/__init__.py +2326 -0
  753. package/python/lib/python3.13/logging/config.py +1065 -0
  754. package/python/lib/python3.13/logging/handlers.py +1629 -0
  755. package/python/lib/python3.13/lzma.py +364 -0
  756. package/python/lib/python3.13/mailbox.py +2219 -0
  757. package/python/lib/python3.13/mimetypes.py +679 -0
  758. package/python/lib/python3.13/modulefinder.py +671 -0
  759. package/python/lib/python3.13/multiprocessing/__init__.py +37 -0
  760. package/python/lib/python3.13/multiprocessing/connection.py +1190 -0
  761. package/python/lib/python3.13/multiprocessing/context.py +377 -0
  762. package/python/lib/python3.13/multiprocessing/dummy/__init__.py +126 -0
  763. package/python/lib/python3.13/multiprocessing/dummy/connection.py +75 -0
  764. package/python/lib/python3.13/multiprocessing/forkserver.py +364 -0
  765. package/python/lib/python3.13/multiprocessing/heap.py +337 -0
  766. package/python/lib/python3.13/multiprocessing/managers.py +1397 -0
  767. package/python/lib/python3.13/multiprocessing/pool.py +957 -0
  768. package/python/lib/python3.13/multiprocessing/popen_fork.py +87 -0
  769. package/python/lib/python3.13/multiprocessing/popen_forkserver.py +74 -0
  770. package/python/lib/python3.13/multiprocessing/popen_spawn_posix.py +76 -0
  771. package/python/lib/python3.13/multiprocessing/popen_spawn_win32.py +147 -0
  772. package/python/lib/python3.13/multiprocessing/process.py +436 -0
  773. package/python/lib/python3.13/multiprocessing/queues.py +399 -0
  774. package/python/lib/python3.13/multiprocessing/reduction.py +281 -0
  775. package/python/lib/python3.13/multiprocessing/resource_sharer.py +154 -0
  776. package/python/lib/python3.13/multiprocessing/resource_tracker.py +420 -0
  777. package/python/lib/python3.13/multiprocessing/shared_memory.py +544 -0
  778. package/python/lib/python3.13/multiprocessing/sharedctypes.py +240 -0
  779. package/python/lib/python3.13/multiprocessing/spawn.py +307 -0
  780. package/python/lib/python3.13/multiprocessing/synchronize.py +404 -0
  781. package/python/lib/python3.13/multiprocessing/util.py +562 -0
  782. package/python/lib/python3.13/netrc.py +199 -0
  783. package/python/lib/python3.13/ntpath.py +870 -0
  784. package/python/lib/python3.13/nturl2path.py +69 -0
  785. package/python/lib/python3.13/numbers.py +427 -0
  786. package/python/lib/python3.13/opcode.py +115 -0
  787. package/python/lib/python3.13/operator.py +467 -0
  788. package/python/lib/python3.13/optparse.py +1681 -0
  789. package/python/lib/python3.13/os.py +1184 -0
  790. package/python/lib/python3.13/pathlib/__init__.py +12 -0
  791. package/python/lib/python3.13/pathlib/_abc.py +930 -0
  792. package/python/lib/python3.13/pathlib/_local.py +861 -0
  793. package/python/lib/python3.13/pdb.py +2550 -0
  794. package/python/lib/python3.13/pickle.py +1866 -0
  795. package/python/lib/python3.13/pickletools.py +2904 -0
  796. package/python/lib/python3.13/pkgutil.py +529 -0
  797. package/python/lib/python3.13/platform.py +1454 -0
  798. package/python/lib/python3.13/plistlib.py +948 -0
  799. package/python/lib/python3.13/poplib.py +477 -0
  800. package/python/lib/python3.13/posixpath.py +578 -0
  801. package/python/lib/python3.13/pprint.py +658 -0
  802. package/python/lib/python3.13/profile.py +616 -0
  803. package/python/lib/python3.13/pstats.py +778 -0
  804. package/python/lib/python3.13/pty.py +211 -0
  805. package/python/lib/python3.13/py_compile.py +212 -0
  806. package/python/lib/python3.13/pyclbr.py +314 -0
  807. package/python/lib/python3.13/pydoc.py +2859 -0
  808. package/python/lib/python3.13/pydoc_data/__init__.py +0 -0
  809. package/python/lib/python3.13/pydoc_data/_pydoc.css +112 -0
  810. package/python/lib/python3.13/pydoc_data/module_docs.py +314 -0
  811. package/python/lib/python3.13/pydoc_data/topics.py +13000 -0
  812. package/python/lib/python3.13/queue.py +383 -0
  813. package/python/lib/python3.13/quopri.py +237 -0
  814. package/python/lib/python3.13/random.py +1070 -0
  815. package/python/lib/python3.13/re/__init__.py +428 -0
  816. package/python/lib/python3.13/re/_casefix.py +106 -0
  817. package/python/lib/python3.13/re/_compiler.py +768 -0
  818. package/python/lib/python3.13/re/_constants.py +222 -0
  819. package/python/lib/python3.13/re/_parser.py +1081 -0
  820. package/python/lib/python3.13/reprlib.py +230 -0
  821. package/python/lib/python3.13/rlcompleter.py +221 -0
  822. package/python/lib/python3.13/runpy.py +319 -0
  823. package/python/lib/python3.13/sched.py +167 -0
  824. package/python/lib/python3.13/secrets.py +71 -0
  825. package/python/lib/python3.13/selectors.py +603 -0
  826. package/python/lib/python3.13/shelve.py +250 -0
  827. package/python/lib/python3.13/shlex.py +345 -0
  828. package/python/lib/python3.13/shutil.py +1583 -0
  829. package/python/lib/python3.13/signal.py +94 -0
  830. package/python/lib/python3.13/site-packages/README.txt +2 -0
  831. package/python/lib/python3.13/site-packages/pip/__init__.py +13 -0
  832. package/python/lib/python3.13/site-packages/pip/__main__.py +24 -0
  833. package/python/lib/python3.13/site-packages/pip/__pip-runner__.py +50 -0
  834. package/python/lib/python3.13/site-packages/pip/_internal/__init__.py +18 -0
  835. package/python/lib/python3.13/site-packages/pip/_internal/build_env.py +606 -0
  836. package/python/lib/python3.13/site-packages/pip/_internal/cache.py +291 -0
  837. package/python/lib/python3.13/site-packages/pip/_internal/cli/__init__.py +3 -0
  838. package/python/lib/python3.13/site-packages/pip/_internal/cli/autocompletion.py +184 -0
  839. package/python/lib/python3.13/site-packages/pip/_internal/cli/base_command.py +255 -0
  840. package/python/lib/python3.13/site-packages/pip/_internal/cli/cmdoptions.py +1267 -0
  841. package/python/lib/python3.13/site-packages/pip/_internal/cli/command_context.py +28 -0
  842. package/python/lib/python3.13/site-packages/pip/_internal/cli/index_command.py +195 -0
  843. package/python/lib/python3.13/site-packages/pip/_internal/cli/main.py +85 -0
  844. package/python/lib/python3.13/site-packages/pip/_internal/cli/main_parser.py +136 -0
  845. package/python/lib/python3.13/site-packages/pip/_internal/cli/parser.py +358 -0
  846. package/python/lib/python3.13/site-packages/pip/_internal/cli/progress_bars.py +153 -0
  847. package/python/lib/python3.13/site-packages/pip/_internal/cli/req_command.py +447 -0
  848. package/python/lib/python3.13/site-packages/pip/_internal/cli/spinners.py +235 -0
  849. package/python/lib/python3.13/site-packages/pip/_internal/cli/status_codes.py +6 -0
  850. package/python/lib/python3.13/site-packages/pip/_internal/commands/__init__.py +139 -0
  851. package/python/lib/python3.13/site-packages/pip/_internal/commands/cache.py +255 -0
  852. package/python/lib/python3.13/site-packages/pip/_internal/commands/check.py +66 -0
  853. package/python/lib/python3.13/site-packages/pip/_internal/commands/completion.py +136 -0
  854. package/python/lib/python3.13/site-packages/pip/_internal/commands/configuration.py +288 -0
  855. package/python/lib/python3.13/site-packages/pip/_internal/commands/debug.py +203 -0
  856. package/python/lib/python3.13/site-packages/pip/_internal/commands/download.py +146 -0
  857. package/python/lib/python3.13/site-packages/pip/_internal/commands/freeze.py +107 -0
  858. package/python/lib/python3.13/site-packages/pip/_internal/commands/hash.py +58 -0
  859. package/python/lib/python3.13/site-packages/pip/_internal/commands/help.py +40 -0
  860. package/python/lib/python3.13/site-packages/pip/_internal/commands/index.py +166 -0
  861. package/python/lib/python3.13/site-packages/pip/_internal/commands/inspect.py +92 -0
  862. package/python/lib/python3.13/site-packages/pip/_internal/commands/install.py +810 -0
  863. package/python/lib/python3.13/site-packages/pip/_internal/commands/list.py +398 -0
  864. package/python/lib/python3.13/site-packages/pip/_internal/commands/lock.py +175 -0
  865. package/python/lib/python3.13/site-packages/pip/_internal/commands/search.py +178 -0
  866. package/python/lib/python3.13/site-packages/pip/_internal/commands/show.py +231 -0
  867. package/python/lib/python3.13/site-packages/pip/_internal/commands/uninstall.py +113 -0
  868. package/python/lib/python3.13/site-packages/pip/_internal/commands/wheel.py +171 -0
  869. package/python/lib/python3.13/site-packages/pip/_internal/configuration.py +396 -0
  870. package/python/lib/python3.13/site-packages/pip/_internal/distributions/__init__.py +21 -0
  871. package/python/lib/python3.13/site-packages/pip/_internal/distributions/base.py +55 -0
  872. package/python/lib/python3.13/site-packages/pip/_internal/distributions/installed.py +33 -0
  873. package/python/lib/python3.13/site-packages/pip/_internal/distributions/sdist.py +164 -0
  874. package/python/lib/python3.13/site-packages/pip/_internal/distributions/wheel.py +44 -0
  875. package/python/lib/python3.13/site-packages/pip/_internal/exceptions.py +971 -0
  876. package/python/lib/python3.13/site-packages/pip/_internal/index/__init__.py +1 -0
  877. package/python/lib/python3.13/site-packages/pip/_internal/index/collector.py +488 -0
  878. package/python/lib/python3.13/site-packages/pip/_internal/index/package_finder.py +1125 -0
  879. package/python/lib/python3.13/site-packages/pip/_internal/index/sources.py +287 -0
  880. package/python/lib/python3.13/site-packages/pip/_internal/locations/__init__.py +440 -0
  881. package/python/lib/python3.13/site-packages/pip/_internal/locations/_distutils.py +173 -0
  882. package/python/lib/python3.13/site-packages/pip/_internal/locations/_sysconfig.py +218 -0
  883. package/python/lib/python3.13/site-packages/pip/_internal/locations/base.py +82 -0
  884. package/python/lib/python3.13/site-packages/pip/_internal/main.py +12 -0
  885. package/python/lib/python3.13/site-packages/pip/_internal/metadata/__init__.py +169 -0
  886. package/python/lib/python3.13/site-packages/pip/_internal/metadata/_json.py +87 -0
  887. package/python/lib/python3.13/site-packages/pip/_internal/metadata/base.py +685 -0
  888. package/python/lib/python3.13/site-packages/pip/_internal/metadata/importlib/__init__.py +6 -0
  889. package/python/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_compat.py +87 -0
  890. package/python/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_dists.py +229 -0
  891. package/python/lib/python3.13/site-packages/pip/_internal/metadata/importlib/_envs.py +143 -0
  892. package/python/lib/python3.13/site-packages/pip/_internal/metadata/pkg_resources.py +298 -0
  893. package/python/lib/python3.13/site-packages/pip/_internal/models/__init__.py +1 -0
  894. package/python/lib/python3.13/site-packages/pip/_internal/models/candidate.py +25 -0
  895. package/python/lib/python3.13/site-packages/pip/_internal/models/direct_url.py +227 -0
  896. package/python/lib/python3.13/site-packages/pip/_internal/models/format_control.py +78 -0
  897. package/python/lib/python3.13/site-packages/pip/_internal/models/index.py +28 -0
  898. package/python/lib/python3.13/site-packages/pip/_internal/models/installation_report.py +57 -0
  899. package/python/lib/python3.13/site-packages/pip/_internal/models/link.py +617 -0
  900. package/python/lib/python3.13/site-packages/pip/_internal/models/release_control.py +92 -0
  901. package/python/lib/python3.13/site-packages/pip/_internal/models/scheme.py +25 -0
  902. package/python/lib/python3.13/site-packages/pip/_internal/models/search_scope.py +126 -0
  903. package/python/lib/python3.13/site-packages/pip/_internal/models/selection_prefs.py +56 -0
  904. package/python/lib/python3.13/site-packages/pip/_internal/models/target_python.py +122 -0
  905. package/python/lib/python3.13/site-packages/pip/_internal/models/wheel.py +80 -0
  906. package/python/lib/python3.13/site-packages/pip/_internal/network/__init__.py +1 -0
  907. package/python/lib/python3.13/site-packages/pip/_internal/network/auth.py +568 -0
  908. package/python/lib/python3.13/site-packages/pip/_internal/network/cache.py +128 -0
  909. package/python/lib/python3.13/site-packages/pip/_internal/network/download.py +341 -0
  910. package/python/lib/python3.13/site-packages/pip/_internal/network/lazy_wheel.py +215 -0
  911. package/python/lib/python3.13/site-packages/pip/_internal/network/session.py +532 -0
  912. package/python/lib/python3.13/site-packages/pip/_internal/network/utils.py +98 -0
  913. package/python/lib/python3.13/site-packages/pip/_internal/network/xmlrpc.py +61 -0
  914. package/python/lib/python3.13/site-packages/pip/_internal/operations/__init__.py +0 -0
  915. package/python/lib/python3.13/site-packages/pip/_internal/operations/build/__init__.py +0 -0
  916. package/python/lib/python3.13/site-packages/pip/_internal/operations/build/build_tracker.py +140 -0
  917. package/python/lib/python3.13/site-packages/pip/_internal/operations/build/metadata.py +38 -0
  918. package/python/lib/python3.13/site-packages/pip/_internal/operations/build/metadata_editable.py +41 -0
  919. package/python/lib/python3.13/site-packages/pip/_internal/operations/build/wheel.py +38 -0
  920. package/python/lib/python3.13/site-packages/pip/_internal/operations/build/wheel_editable.py +47 -0
  921. package/python/lib/python3.13/site-packages/pip/_internal/operations/check.py +175 -0
  922. package/python/lib/python3.13/site-packages/pip/_internal/operations/freeze.py +259 -0
  923. package/python/lib/python3.13/site-packages/pip/_internal/operations/install/__init__.py +1 -0
  924. package/python/lib/python3.13/site-packages/pip/_internal/operations/install/wheel.py +745 -0
  925. package/python/lib/python3.13/site-packages/pip/_internal/operations/prepare.py +747 -0
  926. package/python/lib/python3.13/site-packages/pip/_internal/pyproject.py +123 -0
  927. package/python/lib/python3.13/site-packages/pip/_internal/req/__init__.py +103 -0
  928. package/python/lib/python3.13/site-packages/pip/_internal/req/constructors.py +568 -0
  929. package/python/lib/python3.13/site-packages/pip/_internal/req/pep723.py +41 -0
  930. package/python/lib/python3.13/site-packages/pip/_internal/req/req_dependency_group.py +75 -0
  931. package/python/lib/python3.13/site-packages/pip/_internal/req/req_file.py +631 -0
  932. package/python/lib/python3.13/site-packages/pip/_internal/req/req_install.py +828 -0
  933. package/python/lib/python3.13/site-packages/pip/_internal/req/req_set.py +81 -0
  934. package/python/lib/python3.13/site-packages/pip/_internal/req/req_uninstall.py +639 -0
  935. package/python/lib/python3.13/site-packages/pip/_internal/resolution/__init__.py +0 -0
  936. package/python/lib/python3.13/site-packages/pip/_internal/resolution/base.py +20 -0
  937. package/python/lib/python3.13/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
  938. package/python/lib/python3.13/site-packages/pip/_internal/resolution/legacy/resolver.py +598 -0
  939. package/python/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
  940. package/python/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/base.py +142 -0
  941. package/python/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/candidates.py +591 -0
  942. package/python/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/factory.py +856 -0
  943. package/python/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +166 -0
  944. package/python/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/provider.py +285 -0
  945. package/python/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/reporter.py +98 -0
  946. package/python/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/requirements.py +251 -0
  947. package/python/lib/python3.13/site-packages/pip/_internal/resolution/resolvelib/resolver.py +332 -0
  948. package/python/lib/python3.13/site-packages/pip/_internal/self_outdated_check.py +255 -0
  949. package/python/lib/python3.13/site-packages/pip/_internal/utils/__init__.py +0 -0
  950. package/python/lib/python3.13/site-packages/pip/_internal/utils/_jaraco_text.py +109 -0
  951. package/python/lib/python3.13/site-packages/pip/_internal/utils/_log.py +38 -0
  952. package/python/lib/python3.13/site-packages/pip/_internal/utils/appdirs.py +52 -0
  953. package/python/lib/python3.13/site-packages/pip/_internal/utils/compat.py +85 -0
  954. package/python/lib/python3.13/site-packages/pip/_internal/utils/compatibility_tags.py +201 -0
  955. package/python/lib/python3.13/site-packages/pip/_internal/utils/datetime.py +28 -0
  956. package/python/lib/python3.13/site-packages/pip/_internal/utils/deprecation.py +126 -0
  957. package/python/lib/python3.13/site-packages/pip/_internal/utils/direct_url_helpers.py +87 -0
  958. package/python/lib/python3.13/site-packages/pip/_internal/utils/egg_link.py +81 -0
  959. package/python/lib/python3.13/site-packages/pip/_internal/utils/entrypoints.py +88 -0
  960. package/python/lib/python3.13/site-packages/pip/_internal/utils/filesystem.py +203 -0
  961. package/python/lib/python3.13/site-packages/pip/_internal/utils/filetypes.py +24 -0
  962. package/python/lib/python3.13/site-packages/pip/_internal/utils/glibc.py +102 -0
  963. package/python/lib/python3.13/site-packages/pip/_internal/utils/hashes.py +150 -0
  964. package/python/lib/python3.13/site-packages/pip/_internal/utils/logging.py +396 -0
  965. package/python/lib/python3.13/site-packages/pip/_internal/utils/misc.py +771 -0
  966. package/python/lib/python3.13/site-packages/pip/_internal/utils/packaging.py +44 -0
  967. package/python/lib/python3.13/site-packages/pip/_internal/utils/pylock.py +116 -0
  968. package/python/lib/python3.13/site-packages/pip/_internal/utils/retry.py +45 -0
  969. package/python/lib/python3.13/site-packages/pip/_internal/utils/subprocess.py +248 -0
  970. package/python/lib/python3.13/site-packages/pip/_internal/utils/temp_dir.py +294 -0
  971. package/python/lib/python3.13/site-packages/pip/_internal/utils/unpacking.py +362 -0
  972. package/python/lib/python3.13/site-packages/pip/_internal/utils/urls.py +55 -0
  973. package/python/lib/python3.13/site-packages/pip/_internal/utils/virtualenv.py +105 -0
  974. package/python/lib/python3.13/site-packages/pip/_internal/utils/wheel.py +132 -0
  975. package/python/lib/python3.13/site-packages/pip/_internal/vcs/__init__.py +15 -0
  976. package/python/lib/python3.13/site-packages/pip/_internal/vcs/bazaar.py +130 -0
  977. package/python/lib/python3.13/site-packages/pip/_internal/vcs/git.py +571 -0
  978. package/python/lib/python3.13/site-packages/pip/_internal/vcs/mercurial.py +186 -0
  979. package/python/lib/python3.13/site-packages/pip/_internal/vcs/subversion.py +335 -0
  980. package/python/lib/python3.13/site-packages/pip/_internal/vcs/versioncontrol.py +695 -0
  981. package/python/lib/python3.13/site-packages/pip/_internal/wheel_builder.py +261 -0
  982. package/python/lib/python3.13/site-packages/pip/_vendor/README.rst +180 -0
  983. package/python/lib/python3.13/site-packages/pip/_vendor/__init__.py +117 -0
  984. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/LICENSE.txt +13 -0
  985. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/__init__.py +32 -0
  986. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/_cmd.py +70 -0
  987. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/adapter.py +167 -0
  988. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/cache.py +75 -0
  989. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +8 -0
  990. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +145 -0
  991. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +48 -0
  992. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/controller.py +511 -0
  993. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/filewrapper.py +121 -0
  994. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/heuristics.py +157 -0
  995. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
  996. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/serialize.py +146 -0
  997. package/python/lib/python3.13/site-packages/pip/_vendor/cachecontrol/wrapper.py +43 -0
  998. package/python/lib/python3.13/site-packages/pip/_vendor/certifi/LICENSE +20 -0
  999. package/python/lib/python3.13/site-packages/pip/_vendor/certifi/__init__.py +4 -0
  1000. package/python/lib/python3.13/site-packages/pip/_vendor/certifi/__main__.py +12 -0
  1001. package/python/lib/python3.13/site-packages/pip/_vendor/certifi/cacert.pem +4468 -0
  1002. package/python/lib/python3.13/site-packages/pip/_vendor/certifi/core.py +83 -0
  1003. package/python/lib/python3.13/site-packages/pip/_vendor/certifi/py.typed +0 -0
  1004. package/python/lib/python3.13/site-packages/pip/_vendor/dependency_groups/LICENSE.txt +9 -0
  1005. package/python/lib/python3.13/site-packages/pip/_vendor/dependency_groups/__init__.py +13 -0
  1006. package/python/lib/python3.13/site-packages/pip/_vendor/dependency_groups/__main__.py +65 -0
  1007. package/python/lib/python3.13/site-packages/pip/_vendor/dependency_groups/_implementation.py +209 -0
  1008. package/python/lib/python3.13/site-packages/pip/_vendor/dependency_groups/_lint_dependency_groups.py +59 -0
  1009. package/python/lib/python3.13/site-packages/pip/_vendor/dependency_groups/_pip_wrapper.py +62 -0
  1010. package/python/lib/python3.13/site-packages/pip/_vendor/dependency_groups/_toml_compat.py +9 -0
  1011. package/python/lib/python3.13/site-packages/pip/_vendor/dependency_groups/py.typed +0 -0
  1012. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/LICENSE.txt +284 -0
  1013. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/__init__.py +33 -0
  1014. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/compat.py +1137 -0
  1015. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/resources.py +358 -0
  1016. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/scripts.py +447 -0
  1017. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/t32.exe +0 -0
  1018. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/t64-arm.exe +0 -0
  1019. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/t64.exe +0 -0
  1020. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/util.py +1984 -0
  1021. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/w32.exe +0 -0
  1022. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/w64-arm.exe +0 -0
  1023. package/python/lib/python3.13/site-packages/pip/_vendor/distlib/w64.exe +0 -0
  1024. package/python/lib/python3.13/site-packages/pip/_vendor/distro/LICENSE +202 -0
  1025. package/python/lib/python3.13/site-packages/pip/_vendor/distro/__init__.py +54 -0
  1026. package/python/lib/python3.13/site-packages/pip/_vendor/distro/__main__.py +4 -0
  1027. package/python/lib/python3.13/site-packages/pip/_vendor/distro/distro.py +1403 -0
  1028. package/python/lib/python3.13/site-packages/pip/_vendor/distro/py.typed +0 -0
  1029. package/python/lib/python3.13/site-packages/pip/_vendor/idna/LICENSE.md +31 -0
  1030. package/python/lib/python3.13/site-packages/pip/_vendor/idna/__init__.py +45 -0
  1031. package/python/lib/python3.13/site-packages/pip/_vendor/idna/codec.py +122 -0
  1032. package/python/lib/python3.13/site-packages/pip/_vendor/idna/compat.py +15 -0
  1033. package/python/lib/python3.13/site-packages/pip/_vendor/idna/core.py +437 -0
  1034. package/python/lib/python3.13/site-packages/pip/_vendor/idna/idnadata.py +4309 -0
  1035. package/python/lib/python3.13/site-packages/pip/_vendor/idna/intranges.py +57 -0
  1036. package/python/lib/python3.13/site-packages/pip/_vendor/idna/package_data.py +1 -0
  1037. package/python/lib/python3.13/site-packages/pip/_vendor/idna/py.typed +0 -0
  1038. package/python/lib/python3.13/site-packages/pip/_vendor/idna/uts46data.py +8841 -0
  1039. package/python/lib/python3.13/site-packages/pip/_vendor/msgpack/COPYING +14 -0
  1040. package/python/lib/python3.13/site-packages/pip/_vendor/msgpack/__init__.py +55 -0
  1041. package/python/lib/python3.13/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
  1042. package/python/lib/python3.13/site-packages/pip/_vendor/msgpack/ext.py +170 -0
  1043. package/python/lib/python3.13/site-packages/pip/_vendor/msgpack/fallback.py +929 -0
  1044. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/LICENSE +3 -0
  1045. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/LICENSE.APACHE +177 -0
  1046. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/LICENSE.BSD +23 -0
  1047. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/__init__.py +15 -0
  1048. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/_elffile.py +108 -0
  1049. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/_manylinux.py +262 -0
  1050. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/_musllinux.py +85 -0
  1051. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/_parser.py +365 -0
  1052. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/_structures.py +69 -0
  1053. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/_tokenizer.py +193 -0
  1054. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/licenses/__init__.py +147 -0
  1055. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/licenses/_spdx.py +799 -0
  1056. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/markers.py +388 -0
  1057. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/metadata.py +978 -0
  1058. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/py.typed +0 -0
  1059. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/pylock.py +635 -0
  1060. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/requirements.py +86 -0
  1061. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/specifiers.py +1068 -0
  1062. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/tags.py +651 -0
  1063. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/utils.py +158 -0
  1064. package/python/lib/python3.13/site-packages/pip/_vendor/packaging/version.py +792 -0
  1065. package/python/lib/python3.13/site-packages/pip/_vendor/pkg_resources/LICENSE +17 -0
  1066. package/python/lib/python3.13/site-packages/pip/_vendor/pkg_resources/__init__.py +3676 -0
  1067. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/LICENSE +21 -0
  1068. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/__init__.py +631 -0
  1069. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/__main__.py +55 -0
  1070. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/android.py +249 -0
  1071. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/api.py +299 -0
  1072. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/macos.py +146 -0
  1073. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
  1074. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/unix.py +272 -0
  1075. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/version.py +34 -0
  1076. package/python/lib/python3.13/site-packages/pip/_vendor/platformdirs/windows.py +278 -0
  1077. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/LICENSE +25 -0
  1078. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/__init__.py +82 -0
  1079. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/__main__.py +17 -0
  1080. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/console.py +70 -0
  1081. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/filter.py +70 -0
  1082. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/filters/__init__.py +940 -0
  1083. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/formatter.py +129 -0
  1084. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/formatters/__init__.py +157 -0
  1085. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/formatters/_mapping.py +23 -0
  1086. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/lexer.py +963 -0
  1087. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/lexers/__init__.py +362 -0
  1088. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/lexers/_mapping.py +602 -0
  1089. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/lexers/python.py +1201 -0
  1090. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/modeline.py +43 -0
  1091. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/plugin.py +72 -0
  1092. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/regexopt.py +91 -0
  1093. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/scanner.py +104 -0
  1094. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/sphinxext.py +247 -0
  1095. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/style.py +203 -0
  1096. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/styles/__init__.py +61 -0
  1097. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/styles/_mapping.py +54 -0
  1098. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/token.py +214 -0
  1099. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/unistring.py +153 -0
  1100. package/python/lib/python3.13/site-packages/pip/_vendor/pygments/util.py +324 -0
  1101. package/python/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/LICENSE +21 -0
  1102. package/python/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/__init__.py +31 -0
  1103. package/python/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_impl.py +410 -0
  1104. package/python/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +21 -0
  1105. package/python/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +389 -0
  1106. package/python/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/py.typed +0 -0
  1107. package/python/lib/python3.13/site-packages/pip/_vendor/requests/LICENSE +175 -0
  1108. package/python/lib/python3.13/site-packages/pip/_vendor/requests/__init__.py +179 -0
  1109. package/python/lib/python3.13/site-packages/pip/_vendor/requests/__version__.py +14 -0
  1110. package/python/lib/python3.13/site-packages/pip/_vendor/requests/_internal_utils.py +50 -0
  1111. package/python/lib/python3.13/site-packages/pip/_vendor/requests/adapters.py +696 -0
  1112. package/python/lib/python3.13/site-packages/pip/_vendor/requests/api.py +157 -0
  1113. package/python/lib/python3.13/site-packages/pip/_vendor/requests/auth.py +314 -0
  1114. package/python/lib/python3.13/site-packages/pip/_vendor/requests/certs.py +17 -0
  1115. package/python/lib/python3.13/site-packages/pip/_vendor/requests/compat.py +90 -0
  1116. package/python/lib/python3.13/site-packages/pip/_vendor/requests/cookies.py +561 -0
  1117. package/python/lib/python3.13/site-packages/pip/_vendor/requests/exceptions.py +151 -0
  1118. package/python/lib/python3.13/site-packages/pip/_vendor/requests/help.py +127 -0
  1119. package/python/lib/python3.13/site-packages/pip/_vendor/requests/hooks.py +33 -0
  1120. package/python/lib/python3.13/site-packages/pip/_vendor/requests/models.py +1039 -0
  1121. package/python/lib/python3.13/site-packages/pip/_vendor/requests/packages.py +25 -0
  1122. package/python/lib/python3.13/site-packages/pip/_vendor/requests/sessions.py +831 -0
  1123. package/python/lib/python3.13/site-packages/pip/_vendor/requests/status_codes.py +128 -0
  1124. package/python/lib/python3.13/site-packages/pip/_vendor/requests/structures.py +99 -0
  1125. package/python/lib/python3.13/site-packages/pip/_vendor/requests/utils.py +1086 -0
  1126. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/LICENSE +13 -0
  1127. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/__init__.py +27 -0
  1128. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/providers.py +196 -0
  1129. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
  1130. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/reporters.py +55 -0
  1131. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py +27 -0
  1132. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py +47 -0
  1133. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py +48 -0
  1134. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py +57 -0
  1135. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py +627 -0
  1136. package/python/lib/python3.13/site-packages/pip/_vendor/resolvelib/structs.py +209 -0
  1137. package/python/lib/python3.13/site-packages/pip/_vendor/rich/LICENSE +19 -0
  1138. package/python/lib/python3.13/site-packages/pip/_vendor/rich/__init__.py +177 -0
  1139. package/python/lib/python3.13/site-packages/pip/_vendor/rich/__main__.py +245 -0
  1140. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_cell_widths.py +454 -0
  1141. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_emoji_codes.py +3610 -0
  1142. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_emoji_replace.py +32 -0
  1143. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_export_format.py +76 -0
  1144. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_extension.py +10 -0
  1145. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_fileno.py +24 -0
  1146. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_inspect.py +268 -0
  1147. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_log_render.py +94 -0
  1148. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_loop.py +43 -0
  1149. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_null_file.py +69 -0
  1150. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_palettes.py +309 -0
  1151. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_pick.py +17 -0
  1152. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_ratio.py +153 -0
  1153. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_spinners.py +482 -0
  1154. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_stack.py +16 -0
  1155. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_timer.py +19 -0
  1156. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_win32_console.py +661 -0
  1157. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_windows.py +71 -0
  1158. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_windows_renderer.py +56 -0
  1159. package/python/lib/python3.13/site-packages/pip/_vendor/rich/_wrap.py +93 -0
  1160. package/python/lib/python3.13/site-packages/pip/_vendor/rich/abc.py +33 -0
  1161. package/python/lib/python3.13/site-packages/pip/_vendor/rich/align.py +306 -0
  1162. package/python/lib/python3.13/site-packages/pip/_vendor/rich/ansi.py +241 -0
  1163. package/python/lib/python3.13/site-packages/pip/_vendor/rich/bar.py +93 -0
  1164. package/python/lib/python3.13/site-packages/pip/_vendor/rich/box.py +474 -0
  1165. package/python/lib/python3.13/site-packages/pip/_vendor/rich/cells.py +174 -0
  1166. package/python/lib/python3.13/site-packages/pip/_vendor/rich/color.py +621 -0
  1167. package/python/lib/python3.13/site-packages/pip/_vendor/rich/color_triplet.py +38 -0
  1168. package/python/lib/python3.13/site-packages/pip/_vendor/rich/columns.py +187 -0
  1169. package/python/lib/python3.13/site-packages/pip/_vendor/rich/console.py +2680 -0
  1170. package/python/lib/python3.13/site-packages/pip/_vendor/rich/constrain.py +37 -0
  1171. package/python/lib/python3.13/site-packages/pip/_vendor/rich/containers.py +167 -0
  1172. package/python/lib/python3.13/site-packages/pip/_vendor/rich/control.py +219 -0
  1173. package/python/lib/python3.13/site-packages/pip/_vendor/rich/default_styles.py +193 -0
  1174. package/python/lib/python3.13/site-packages/pip/_vendor/rich/diagnose.py +39 -0
  1175. package/python/lib/python3.13/site-packages/pip/_vendor/rich/emoji.py +91 -0
  1176. package/python/lib/python3.13/site-packages/pip/_vendor/rich/errors.py +34 -0
  1177. package/python/lib/python3.13/site-packages/pip/_vendor/rich/file_proxy.py +57 -0
  1178. package/python/lib/python3.13/site-packages/pip/_vendor/rich/filesize.py +88 -0
  1179. package/python/lib/python3.13/site-packages/pip/_vendor/rich/highlighter.py +232 -0
  1180. package/python/lib/python3.13/site-packages/pip/_vendor/rich/json.py +139 -0
  1181. package/python/lib/python3.13/site-packages/pip/_vendor/rich/jupyter.py +101 -0
  1182. package/python/lib/python3.13/site-packages/pip/_vendor/rich/layout.py +442 -0
  1183. package/python/lib/python3.13/site-packages/pip/_vendor/rich/live.py +400 -0
  1184. package/python/lib/python3.13/site-packages/pip/_vendor/rich/live_render.py +106 -0
  1185. package/python/lib/python3.13/site-packages/pip/_vendor/rich/logging.py +297 -0
  1186. package/python/lib/python3.13/site-packages/pip/_vendor/rich/markup.py +251 -0
  1187. package/python/lib/python3.13/site-packages/pip/_vendor/rich/measure.py +151 -0
  1188. package/python/lib/python3.13/site-packages/pip/_vendor/rich/padding.py +141 -0
  1189. package/python/lib/python3.13/site-packages/pip/_vendor/rich/pager.py +34 -0
  1190. package/python/lib/python3.13/site-packages/pip/_vendor/rich/palette.py +100 -0
  1191. package/python/lib/python3.13/site-packages/pip/_vendor/rich/panel.py +317 -0
  1192. package/python/lib/python3.13/site-packages/pip/_vendor/rich/pretty.py +1016 -0
  1193. package/python/lib/python3.13/site-packages/pip/_vendor/rich/progress.py +1715 -0
  1194. package/python/lib/python3.13/site-packages/pip/_vendor/rich/progress_bar.py +223 -0
  1195. package/python/lib/python3.13/site-packages/pip/_vendor/rich/prompt.py +400 -0
  1196. package/python/lib/python3.13/site-packages/pip/_vendor/rich/protocol.py +42 -0
  1197. package/python/lib/python3.13/site-packages/pip/_vendor/rich/py.typed +0 -0
  1198. package/python/lib/python3.13/site-packages/pip/_vendor/rich/region.py +10 -0
  1199. package/python/lib/python3.13/site-packages/pip/_vendor/rich/repr.py +149 -0
  1200. package/python/lib/python3.13/site-packages/pip/_vendor/rich/rule.py +130 -0
  1201. package/python/lib/python3.13/site-packages/pip/_vendor/rich/scope.py +86 -0
  1202. package/python/lib/python3.13/site-packages/pip/_vendor/rich/screen.py +54 -0
  1203. package/python/lib/python3.13/site-packages/pip/_vendor/rich/segment.py +752 -0
  1204. package/python/lib/python3.13/site-packages/pip/_vendor/rich/spinner.py +132 -0
  1205. package/python/lib/python3.13/site-packages/pip/_vendor/rich/status.py +131 -0
  1206. package/python/lib/python3.13/site-packages/pip/_vendor/rich/style.py +792 -0
  1207. package/python/lib/python3.13/site-packages/pip/_vendor/rich/styled.py +42 -0
  1208. package/python/lib/python3.13/site-packages/pip/_vendor/rich/syntax.py +985 -0
  1209. package/python/lib/python3.13/site-packages/pip/_vendor/rich/table.py +1006 -0
  1210. package/python/lib/python3.13/site-packages/pip/_vendor/rich/terminal_theme.py +153 -0
  1211. package/python/lib/python3.13/site-packages/pip/_vendor/rich/text.py +1361 -0
  1212. package/python/lib/python3.13/site-packages/pip/_vendor/rich/theme.py +115 -0
  1213. package/python/lib/python3.13/site-packages/pip/_vendor/rich/themes.py +5 -0
  1214. package/python/lib/python3.13/site-packages/pip/_vendor/rich/traceback.py +899 -0
  1215. package/python/lib/python3.13/site-packages/pip/_vendor/rich/tree.py +257 -0
  1216. package/python/lib/python3.13/site-packages/pip/_vendor/tomli/LICENSE +21 -0
  1217. package/python/lib/python3.13/site-packages/pip/_vendor/tomli/__init__.py +8 -0
  1218. package/python/lib/python3.13/site-packages/pip/_vendor/tomli/_parser.py +777 -0
  1219. package/python/lib/python3.13/site-packages/pip/_vendor/tomli/_re.py +115 -0
  1220. package/python/lib/python3.13/site-packages/pip/_vendor/tomli/_types.py +10 -0
  1221. package/python/lib/python3.13/site-packages/pip/_vendor/tomli/py.typed +1 -0
  1222. package/python/lib/python3.13/site-packages/pip/_vendor/tomli_w/LICENSE +21 -0
  1223. package/python/lib/python3.13/site-packages/pip/_vendor/tomli_w/__init__.py +4 -0
  1224. package/python/lib/python3.13/site-packages/pip/_vendor/tomli_w/_writer.py +229 -0
  1225. package/python/lib/python3.13/site-packages/pip/_vendor/tomli_w/py.typed +1 -0
  1226. package/python/lib/python3.13/site-packages/pip/_vendor/truststore/LICENSE +21 -0
  1227. package/python/lib/python3.13/site-packages/pip/_vendor/truststore/__init__.py +36 -0
  1228. package/python/lib/python3.13/site-packages/pip/_vendor/truststore/_api.py +341 -0
  1229. package/python/lib/python3.13/site-packages/pip/_vendor/truststore/_macos.py +571 -0
  1230. package/python/lib/python3.13/site-packages/pip/_vendor/truststore/_openssl.py +68 -0
  1231. package/python/lib/python3.13/site-packages/pip/_vendor/truststore/_ssl_constants.py +31 -0
  1232. package/python/lib/python3.13/site-packages/pip/_vendor/truststore/_windows.py +567 -0
  1233. package/python/lib/python3.13/site-packages/pip/_vendor/truststore/py.typed +0 -0
  1234. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/LICENSE.txt +21 -0
  1235. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/__init__.py +102 -0
  1236. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/_collections.py +355 -0
  1237. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/_version.py +2 -0
  1238. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/connection.py +572 -0
  1239. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/connectionpool.py +1140 -0
  1240. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
  1241. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +36 -0
  1242. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
  1243. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +519 -0
  1244. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +397 -0
  1245. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/appengine.py +314 -0
  1246. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +130 -0
  1247. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +518 -0
  1248. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +920 -0
  1249. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/contrib/socks.py +216 -0
  1250. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/exceptions.py +323 -0
  1251. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/fields.py +274 -0
  1252. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/filepost.py +98 -0
  1253. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/packages/__init__.py +0 -0
  1254. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
  1255. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +51 -0
  1256. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py +155 -0
  1257. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/packages/six.py +1076 -0
  1258. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/poolmanager.py +540 -0
  1259. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/request.py +191 -0
  1260. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/response.py +879 -0
  1261. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/__init__.py +49 -0
  1262. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/connection.py +149 -0
  1263. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/proxy.py +57 -0
  1264. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/queue.py +22 -0
  1265. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/request.py +137 -0
  1266. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/response.py +107 -0
  1267. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/retry.py +622 -0
  1268. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/ssl_.py +504 -0
  1269. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +159 -0
  1270. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/ssltransport.py +221 -0
  1271. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/timeout.py +271 -0
  1272. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/url.py +435 -0
  1273. package/python/lib/python3.13/site-packages/pip/_vendor/urllib3/util/wait.py +152 -0
  1274. package/python/lib/python3.13/site-packages/pip/_vendor/vendor.txt +19 -0
  1275. package/python/lib/python3.13/site-packages/pip/py.typed +4 -0
  1276. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/INSTALLER +1 -0
  1277. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/METADATA +111 -0
  1278. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/RECORD +879 -0
  1279. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/REQUESTED +0 -0
  1280. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/WHEEL +4 -0
  1281. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/direct_url.json +1 -0
  1282. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/entry_points.txt +4 -0
  1283. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/AUTHORS.txt +860 -0
  1284. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/LICENSE.txt +20 -0
  1285. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +13 -0
  1286. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/certifi/LICENSE +20 -0
  1287. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/dependency_groups/LICENSE.txt +9 -0
  1288. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distlib/LICENSE.txt +284 -0
  1289. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/distro/LICENSE +202 -0
  1290. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/idna/LICENSE.md +31 -0
  1291. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/msgpack/COPYING +14 -0
  1292. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE +3 -0
  1293. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +177 -0
  1294. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/packaging/LICENSE.BSD +23 -0
  1295. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pkg_resources/LICENSE +17 -0
  1296. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/platformdirs/LICENSE +21 -0
  1297. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pygments/LICENSE +25 -0
  1298. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +21 -0
  1299. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/requests/LICENSE +175 -0
  1300. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/resolvelib/LICENSE +13 -0
  1301. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/rich/LICENSE +19 -0
  1302. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli/LICENSE +21 -0
  1303. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/tomli_w/LICENSE +21 -0
  1304. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/truststore/LICENSE +21 -0
  1305. package/python/lib/python3.13/site-packages/pip-26.0.1.dist-info/licenses/src/pip/_vendor/urllib3/LICENSE.txt +21 -0
  1306. package/python/lib/python3.13/site.py +773 -0
  1307. package/python/lib/python3.13/smtplib.py +1123 -0
  1308. package/python/lib/python3.13/socket.py +982 -0
  1309. package/python/lib/python3.13/socketserver.py +863 -0
  1310. package/python/lib/python3.13/sqlite3/__init__.py +70 -0
  1311. package/python/lib/python3.13/sqlite3/__main__.py +139 -0
  1312. package/python/lib/python3.13/sqlite3/dbapi2.py +108 -0
  1313. package/python/lib/python3.13/sqlite3/dump.py +113 -0
  1314. package/python/lib/python3.13/sre_compile.py +7 -0
  1315. package/python/lib/python3.13/sre_constants.py +7 -0
  1316. package/python/lib/python3.13/sre_parse.py +7 -0
  1317. package/python/lib/python3.13/ssl.py +1529 -0
  1318. package/python/lib/python3.13/stat.py +212 -0
  1319. package/python/lib/python3.13/statistics.py +1817 -0
  1320. package/python/lib/python3.13/string.py +309 -0
  1321. package/python/lib/python3.13/stringprep.py +272 -0
  1322. package/python/lib/python3.13/struct.py +15 -0
  1323. package/python/lib/python3.13/subprocess.py +2258 -0
  1324. package/python/lib/python3.13/symtable.py +414 -0
  1325. package/python/lib/python3.13/sysconfig/__init__.py +726 -0
  1326. package/python/lib/python3.13/sysconfig/__main__.py +248 -0
  1327. package/python/lib/python3.13/tabnanny.py +340 -0
  1328. package/python/lib/python3.13/tarfile.py +3070 -0
  1329. package/python/lib/python3.13/tempfile.py +957 -0
  1330. package/python/lib/python3.13/textwrap.py +497 -0
  1331. package/python/lib/python3.13/this.py +28 -0
  1332. package/python/lib/python3.13/threading.py +1602 -0
  1333. package/python/lib/python3.13/timeit.py +381 -0
  1334. package/python/lib/python3.13/tkinter/__init__.py +5002 -0
  1335. package/python/lib/python3.13/tkinter/__main__.py +7 -0
  1336. package/python/lib/python3.13/tkinter/colorchooser.py +86 -0
  1337. package/python/lib/python3.13/tkinter/commondialog.py +53 -0
  1338. package/python/lib/python3.13/tkinter/constants.py +110 -0
  1339. package/python/lib/python3.13/tkinter/dialog.py +49 -0
  1340. package/python/lib/python3.13/tkinter/dnd.py +324 -0
  1341. package/python/lib/python3.13/tkinter/filedialog.py +492 -0
  1342. package/python/lib/python3.13/tkinter/font.py +239 -0
  1343. package/python/lib/python3.13/tkinter/messagebox.py +146 -0
  1344. package/python/lib/python3.13/tkinter/scrolledtext.py +56 -0
  1345. package/python/lib/python3.13/tkinter/simpledialog.py +441 -0
  1346. package/python/lib/python3.13/tkinter/ttk.py +1647 -0
  1347. package/python/lib/python3.13/token.py +141 -0
  1348. package/python/lib/python3.13/tokenize.py +592 -0
  1349. package/python/lib/python3.13/tomllib/__init__.py +10 -0
  1350. package/python/lib/python3.13/tomllib/_parser.py +691 -0
  1351. package/python/lib/python3.13/tomllib/_re.py +107 -0
  1352. package/python/lib/python3.13/tomllib/_types.py +10 -0
  1353. package/python/lib/python3.13/tomllib/mypy.ini +17 -0
  1354. package/python/lib/python3.13/trace.py +754 -0
  1355. package/python/lib/python3.13/traceback.py +1638 -0
  1356. package/python/lib/python3.13/tracemalloc.py +560 -0
  1357. package/python/lib/python3.13/tty.py +73 -0
  1358. package/python/lib/python3.13/turtle.py +4199 -0
  1359. package/python/lib/python3.13/turtledemo/__init__.py +14 -0
  1360. package/python/lib/python3.13/turtledemo/__main__.py +401 -0
  1361. package/python/lib/python3.13/turtledemo/bytedesign.py +161 -0
  1362. package/python/lib/python3.13/turtledemo/chaos.py +59 -0
  1363. package/python/lib/python3.13/turtledemo/clock.py +138 -0
  1364. package/python/lib/python3.13/turtledemo/colormixer.py +58 -0
  1365. package/python/lib/python3.13/turtledemo/forest.py +108 -0
  1366. package/python/lib/python3.13/turtledemo/fractalcurves.py +138 -0
  1367. package/python/lib/python3.13/turtledemo/lindenmayer.py +119 -0
  1368. package/python/lib/python3.13/turtledemo/minimal_hanoi.py +79 -0
  1369. package/python/lib/python3.13/turtledemo/nim.py +226 -0
  1370. package/python/lib/python3.13/turtledemo/paint.py +54 -0
  1371. package/python/lib/python3.13/turtledemo/peace.py +61 -0
  1372. package/python/lib/python3.13/turtledemo/penrose.py +175 -0
  1373. package/python/lib/python3.13/turtledemo/planet_and_moon.py +111 -0
  1374. package/python/lib/python3.13/turtledemo/rosette.py +65 -0
  1375. package/python/lib/python3.13/turtledemo/round_dance.py +86 -0
  1376. package/python/lib/python3.13/turtledemo/sorting_animate.py +204 -0
  1377. package/python/lib/python3.13/turtledemo/tree.py +62 -0
  1378. package/python/lib/python3.13/turtledemo/turtle.cfg +10 -0
  1379. package/python/lib/python3.13/turtledemo/two_canvases.py +54 -0
  1380. package/python/lib/python3.13/turtledemo/yinyang.py +49 -0
  1381. package/python/lib/python3.13/types.py +345 -0
  1382. package/python/lib/python3.13/typing.py +3831 -0
  1383. package/python/lib/python3.13/unittest/__init__.py +80 -0
  1384. package/python/lib/python3.13/unittest/__main__.py +18 -0
  1385. package/python/lib/python3.13/unittest/_log.py +86 -0
  1386. package/python/lib/python3.13/unittest/async_case.py +146 -0
  1387. package/python/lib/python3.13/unittest/case.py +1478 -0
  1388. package/python/lib/python3.13/unittest/loader.py +453 -0
  1389. package/python/lib/python3.13/unittest/main.py +280 -0
  1390. package/python/lib/python3.13/unittest/mock.py +3179 -0
  1391. package/python/lib/python3.13/unittest/result.py +256 -0
  1392. package/python/lib/python3.13/unittest/runner.py +292 -0
  1393. package/python/lib/python3.13/unittest/signals.py +71 -0
  1394. package/python/lib/python3.13/unittest/suite.py +379 -0
  1395. package/python/lib/python3.13/unittest/util.py +170 -0
  1396. package/python/lib/python3.13/urllib/__init__.py +0 -0
  1397. package/python/lib/python3.13/urllib/error.py +74 -0
  1398. package/python/lib/python3.13/urllib/parse.py +1262 -0
  1399. package/python/lib/python3.13/urllib/request.py +2797 -0
  1400. package/python/lib/python3.13/urllib/response.py +84 -0
  1401. package/python/lib/python3.13/urllib/robotparser.py +286 -0
  1402. package/python/lib/python3.13/uuid.py +784 -0
  1403. package/python/lib/python3.13/venv/__init__.py +687 -0
  1404. package/python/lib/python3.13/venv/__main__.py +10 -0
  1405. package/python/lib/python3.13/venv/scripts/common/Activate.ps1 +248 -0
  1406. package/python/lib/python3.13/venv/scripts/common/activate +76 -0
  1407. package/python/lib/python3.13/venv/scripts/common/activate.fish +69 -0
  1408. package/python/lib/python3.13/venv/scripts/posix/activate.csh +27 -0
  1409. package/python/lib/python3.13/warnings.py +735 -0
  1410. package/python/lib/python3.13/wave.py +665 -0
  1411. package/python/lib/python3.13/weakref.py +674 -0
  1412. package/python/lib/python3.13/webbrowser.py +710 -0
  1413. package/python/lib/python3.13/wsgiref/__init__.py +25 -0
  1414. package/python/lib/python3.13/wsgiref/handlers.py +573 -0
  1415. package/python/lib/python3.13/wsgiref/headers.py +187 -0
  1416. package/python/lib/python3.13/wsgiref/simple_server.py +161 -0
  1417. package/python/lib/python3.13/wsgiref/types.py +54 -0
  1418. package/python/lib/python3.13/wsgiref/util.py +159 -0
  1419. package/python/lib/python3.13/wsgiref/validate.py +438 -0
  1420. package/python/lib/python3.13/xml/__init__.py +20 -0
  1421. package/python/lib/python3.13/xml/dom/NodeFilter.py +27 -0
  1422. package/python/lib/python3.13/xml/dom/__init__.py +140 -0
  1423. package/python/lib/python3.13/xml/dom/domreg.py +99 -0
  1424. package/python/lib/python3.13/xml/dom/expatbuilder.py +962 -0
  1425. package/python/lib/python3.13/xml/dom/minicompat.py +109 -0
  1426. package/python/lib/python3.13/xml/dom/minidom.py +2024 -0
  1427. package/python/lib/python3.13/xml/dom/pulldom.py +336 -0
  1428. package/python/lib/python3.13/xml/dom/xmlbuilder.py +389 -0
  1429. package/python/lib/python3.13/xml/etree/ElementInclude.py +186 -0
  1430. package/python/lib/python3.13/xml/etree/ElementPath.py +423 -0
  1431. package/python/lib/python3.13/xml/etree/ElementTree.py +2098 -0
  1432. package/python/lib/python3.13/xml/etree/__init__.py +33 -0
  1433. package/python/lib/python3.13/xml/etree/cElementTree.py +3 -0
  1434. package/python/lib/python3.13/xml/parsers/__init__.py +8 -0
  1435. package/python/lib/python3.13/xml/parsers/expat.py +8 -0
  1436. package/python/lib/python3.13/xml/sax/__init__.py +94 -0
  1437. package/python/lib/python3.13/xml/sax/_exceptions.py +127 -0
  1438. package/python/lib/python3.13/xml/sax/expatreader.py +454 -0
  1439. package/python/lib/python3.13/xml/sax/handler.py +387 -0
  1440. package/python/lib/python3.13/xml/sax/saxutils.py +369 -0
  1441. package/python/lib/python3.13/xml/sax/xmlreader.py +378 -0
  1442. package/python/lib/python3.13/xmlrpc/__init__.py +1 -0
  1443. package/python/lib/python3.13/xmlrpc/client.py +1503 -0
  1444. package/python/lib/python3.13/xmlrpc/server.py +1002 -0
  1445. package/python/lib/python3.13/zipapp.py +229 -0
  1446. package/python/lib/python3.13/zipfile/__init__.py +2375 -0
  1447. package/python/lib/python3.13/zipfile/__main__.py +4 -0
  1448. package/python/lib/python3.13/zipfile/_path/__init__.py +452 -0
  1449. package/python/lib/python3.13/zipfile/_path/glob.py +113 -0
  1450. package/python/lib/python3.13/zipimport.py +803 -0
  1451. package/python/lib/python3.13/zoneinfo/__init__.py +34 -0
  1452. package/python/lib/python3.13/zoneinfo/_common.py +168 -0
  1453. package/python/lib/python3.13/zoneinfo/_tzpath.py +189 -0
  1454. package/python/lib/python3.13/zoneinfo/_zoneinfo.py +772 -0
  1455. package/python/lib/tcl9/9.0/http-2.10.1.tm +5475 -0
  1456. package/python/lib/tcl9/9.0/msgcat-1.7.1.tm +1349 -0
  1457. package/python/lib/tcl9/9.0/platform/shell-1.1.4.tm +241 -0
  1458. package/python/lib/tcl9/9.0/platform-1.1.0.tm +443 -0
  1459. package/python/lib/tcl9/9.0/tcltest-2.5.10.tm +3588 -0
  1460. package/python/lib/tcl9.0/auto.tcl +711 -0
  1461. package/python/lib/tcl9.0/clock.tcl +2110 -0
  1462. package/python/lib/tcl9.0/cookiejar0.2/cookiejar.tcl +746 -0
  1463. package/python/lib/tcl9.0/cookiejar0.2/idna.tcl +292 -0
  1464. package/python/lib/tcl9.0/cookiejar0.2/pkgIndex.tcl +3 -0
  1465. package/python/lib/tcl9.0/cookiejar0.2/public_suffix_list.dat.gz +0 -0
  1466. package/python/lib/tcl9.0/encoding/ascii.enc +20 -0
  1467. package/python/lib/tcl9.0/encoding/big5.enc +1516 -0
  1468. package/python/lib/tcl9.0/encoding/cns11643.enc +1584 -0
  1469. package/python/lib/tcl9.0/encoding/cp1250.enc +20 -0
  1470. package/python/lib/tcl9.0/encoding/cp1251.enc +20 -0
  1471. package/python/lib/tcl9.0/encoding/cp1252.enc +20 -0
  1472. package/python/lib/tcl9.0/encoding/cp1253.enc +20 -0
  1473. package/python/lib/tcl9.0/encoding/cp1254.enc +20 -0
  1474. package/python/lib/tcl9.0/encoding/cp1255.enc +20 -0
  1475. package/python/lib/tcl9.0/encoding/cp1256.enc +20 -0
  1476. package/python/lib/tcl9.0/encoding/cp1257.enc +20 -0
  1477. package/python/lib/tcl9.0/encoding/cp1258.enc +20 -0
  1478. package/python/lib/tcl9.0/encoding/cp165.enc +20 -0
  1479. package/python/lib/tcl9.0/encoding/cp437.enc +20 -0
  1480. package/python/lib/tcl9.0/encoding/cp737.enc +20 -0
  1481. package/python/lib/tcl9.0/encoding/cp775.enc +20 -0
  1482. package/python/lib/tcl9.0/encoding/cp850.enc +20 -0
  1483. package/python/lib/tcl9.0/encoding/cp852.enc +20 -0
  1484. package/python/lib/tcl9.0/encoding/cp855.enc +20 -0
  1485. package/python/lib/tcl9.0/encoding/cp857.enc +20 -0
  1486. package/python/lib/tcl9.0/encoding/cp860.enc +20 -0
  1487. package/python/lib/tcl9.0/encoding/cp861.enc +20 -0
  1488. package/python/lib/tcl9.0/encoding/cp862.enc +20 -0
  1489. package/python/lib/tcl9.0/encoding/cp863.enc +20 -0
  1490. package/python/lib/tcl9.0/encoding/cp864.enc +20 -0
  1491. package/python/lib/tcl9.0/encoding/cp865.enc +20 -0
  1492. package/python/lib/tcl9.0/encoding/cp866.enc +20 -0
  1493. package/python/lib/tcl9.0/encoding/cp869.enc +20 -0
  1494. package/python/lib/tcl9.0/encoding/cp874.enc +20 -0
  1495. package/python/lib/tcl9.0/encoding/cp932.enc +801 -0
  1496. package/python/lib/tcl9.0/encoding/cp936.enc +2162 -0
  1497. package/python/lib/tcl9.0/encoding/cp949.enc +2128 -0
  1498. package/python/lib/tcl9.0/encoding/cp950.enc +1499 -0
  1499. package/python/lib/tcl9.0/encoding/dingbats.enc +20 -0
  1500. package/python/lib/tcl9.0/encoding/ebcdic.enc +20 -0
  1501. package/python/lib/tcl9.0/encoding/euc-cn.enc +1397 -0
  1502. package/python/lib/tcl9.0/encoding/euc-jp.enc +1353 -0
  1503. package/python/lib/tcl9.0/encoding/euc-kr.enc +1533 -0
  1504. package/python/lib/tcl9.0/encoding/gb12345.enc +1414 -0
  1505. package/python/lib/tcl9.0/encoding/gb1988.enc +20 -0
  1506. package/python/lib/tcl9.0/encoding/gb2312-raw.enc +1380 -0
  1507. package/python/lib/tcl9.0/encoding/gb2312.enc +1397 -0
  1508. package/python/lib/tcl9.0/encoding/iso2022-jp.enc +12 -0
  1509. package/python/lib/tcl9.0/encoding/iso2022-kr.enc +7 -0
  1510. package/python/lib/tcl9.0/encoding/iso2022.enc +14 -0
  1511. package/python/lib/tcl9.0/encoding/iso8859-1.enc +20 -0
  1512. package/python/lib/tcl9.0/encoding/iso8859-10.enc +20 -0
  1513. package/python/lib/tcl9.0/encoding/iso8859-11.enc +20 -0
  1514. package/python/lib/tcl9.0/encoding/iso8859-13.enc +20 -0
  1515. package/python/lib/tcl9.0/encoding/iso8859-14.enc +20 -0
  1516. package/python/lib/tcl9.0/encoding/iso8859-15.enc +20 -0
  1517. package/python/lib/tcl9.0/encoding/iso8859-16.enc +20 -0
  1518. package/python/lib/tcl9.0/encoding/iso8859-2.enc +20 -0
  1519. package/python/lib/tcl9.0/encoding/iso8859-3.enc +20 -0
  1520. package/python/lib/tcl9.0/encoding/iso8859-4.enc +20 -0
  1521. package/python/lib/tcl9.0/encoding/iso8859-5.enc +20 -0
  1522. package/python/lib/tcl9.0/encoding/iso8859-6.enc +20 -0
  1523. package/python/lib/tcl9.0/encoding/iso8859-7.enc +20 -0
  1524. package/python/lib/tcl9.0/encoding/iso8859-8.enc +20 -0
  1525. package/python/lib/tcl9.0/encoding/iso8859-9.enc +20 -0
  1526. package/python/lib/tcl9.0/encoding/jis0201.enc +20 -0
  1527. package/python/lib/tcl9.0/encoding/jis0208.enc +1319 -0
  1528. package/python/lib/tcl9.0/encoding/jis0212.enc +1159 -0
  1529. package/python/lib/tcl9.0/encoding/koi8-r.enc +20 -0
  1530. package/python/lib/tcl9.0/encoding/koi8-ru.enc +20 -0
  1531. package/python/lib/tcl9.0/encoding/koi8-t.enc +20 -0
  1532. package/python/lib/tcl9.0/encoding/koi8-u.enc +20 -0
  1533. package/python/lib/tcl9.0/encoding/ksc5601.enc +1516 -0
  1534. package/python/lib/tcl9.0/encoding/macCentEuro.enc +20 -0
  1535. package/python/lib/tcl9.0/encoding/macCroatian.enc +20 -0
  1536. package/python/lib/tcl9.0/encoding/macCyrillic.enc +20 -0
  1537. package/python/lib/tcl9.0/encoding/macDingbats.enc +20 -0
  1538. package/python/lib/tcl9.0/encoding/macGreek.enc +20 -0
  1539. package/python/lib/tcl9.0/encoding/macIceland.enc +20 -0
  1540. package/python/lib/tcl9.0/encoding/macJapan.enc +785 -0
  1541. package/python/lib/tcl9.0/encoding/macRoman.enc +20 -0
  1542. package/python/lib/tcl9.0/encoding/macRomania.enc +20 -0
  1543. package/python/lib/tcl9.0/encoding/macThai.enc +20 -0
  1544. package/python/lib/tcl9.0/encoding/macTurkish.enc +20 -0
  1545. package/python/lib/tcl9.0/encoding/macUkraine.enc +20 -0
  1546. package/python/lib/tcl9.0/encoding/shiftjis.enc +690 -0
  1547. package/python/lib/tcl9.0/encoding/symbol.enc +20 -0
  1548. package/python/lib/tcl9.0/encoding/tis-620.enc +20 -0
  1549. package/python/lib/tcl9.0/foreachline.tcl +25 -0
  1550. package/python/lib/tcl9.0/history.tcl +335 -0
  1551. package/python/lib/tcl9.0/icu.tcl +145 -0
  1552. package/python/lib/tcl9.0/init.tcl +773 -0
  1553. package/python/lib/tcl9.0/install.tcl +275 -0
  1554. package/python/lib/tcl9.0/msgs/af.msg +49 -0
  1555. package/python/lib/tcl9.0/msgs/af_za.msg +6 -0
  1556. package/python/lib/tcl9.0/msgs/ar.msg +54 -0
  1557. package/python/lib/tcl9.0/msgs/ar_in.msg +6 -0
  1558. package/python/lib/tcl9.0/msgs/ar_jo.msg +39 -0
  1559. package/python/lib/tcl9.0/msgs/ar_lb.msg +39 -0
  1560. package/python/lib/tcl9.0/msgs/ar_sy.msg +39 -0
  1561. package/python/lib/tcl9.0/msgs/be.msg +52 -0
  1562. package/python/lib/tcl9.0/msgs/bg.msg +52 -0
  1563. package/python/lib/tcl9.0/msgs/bn.msg +49 -0
  1564. package/python/lib/tcl9.0/msgs/bn_in.msg +6 -0
  1565. package/python/lib/tcl9.0/msgs/ca.msg +50 -0
  1566. package/python/lib/tcl9.0/msgs/cs.msg +54 -0
  1567. package/python/lib/tcl9.0/msgs/da.msg +52 -0
  1568. package/python/lib/tcl9.0/msgs/de.msg +54 -0
  1569. package/python/lib/tcl9.0/msgs/de_at.msg +35 -0
  1570. package/python/lib/tcl9.0/msgs/de_be.msg +53 -0
  1571. package/python/lib/tcl9.0/msgs/el.msg +52 -0
  1572. package/python/lib/tcl9.0/msgs/en_au.msg +7 -0
  1573. package/python/lib/tcl9.0/msgs/en_be.msg +7 -0
  1574. package/python/lib/tcl9.0/msgs/en_bw.msg +6 -0
  1575. package/python/lib/tcl9.0/msgs/en_ca.msg +7 -0
  1576. package/python/lib/tcl9.0/msgs/en_gb.msg +7 -0
  1577. package/python/lib/tcl9.0/msgs/en_hk.msg +8 -0
  1578. package/python/lib/tcl9.0/msgs/en_ie.msg +7 -0
  1579. package/python/lib/tcl9.0/msgs/en_in.msg +8 -0
  1580. package/python/lib/tcl9.0/msgs/en_nz.msg +7 -0
  1581. package/python/lib/tcl9.0/msgs/en_ph.msg +8 -0
  1582. package/python/lib/tcl9.0/msgs/en_sg.msg +6 -0
  1583. package/python/lib/tcl9.0/msgs/en_za.msg +6 -0
  1584. package/python/lib/tcl9.0/msgs/en_zw.msg +6 -0
  1585. package/python/lib/tcl9.0/msgs/eo.msg +54 -0
  1586. package/python/lib/tcl9.0/msgs/es.msg +52 -0
  1587. package/python/lib/tcl9.0/msgs/es_ar.msg +6 -0
  1588. package/python/lib/tcl9.0/msgs/es_bo.msg +6 -0
  1589. package/python/lib/tcl9.0/msgs/es_cl.msg +6 -0
  1590. package/python/lib/tcl9.0/msgs/es_co.msg +6 -0
  1591. package/python/lib/tcl9.0/msgs/es_cr.msg +6 -0
  1592. package/python/lib/tcl9.0/msgs/es_do.msg +6 -0
  1593. package/python/lib/tcl9.0/msgs/es_ec.msg +6 -0
  1594. package/python/lib/tcl9.0/msgs/es_gt.msg +6 -0
  1595. package/python/lib/tcl9.0/msgs/es_hn.msg +6 -0
  1596. package/python/lib/tcl9.0/msgs/es_mx.msg +6 -0
  1597. package/python/lib/tcl9.0/msgs/es_ni.msg +6 -0
  1598. package/python/lib/tcl9.0/msgs/es_pa.msg +6 -0
  1599. package/python/lib/tcl9.0/msgs/es_pe.msg +6 -0
  1600. package/python/lib/tcl9.0/msgs/es_pr.msg +6 -0
  1601. package/python/lib/tcl9.0/msgs/es_py.msg +6 -0
  1602. package/python/lib/tcl9.0/msgs/es_sv.msg +6 -0
  1603. package/python/lib/tcl9.0/msgs/es_uy.msg +6 -0
  1604. package/python/lib/tcl9.0/msgs/es_ve.msg +6 -0
  1605. package/python/lib/tcl9.0/msgs/et.msg +52 -0
  1606. package/python/lib/tcl9.0/msgs/eu.msg +47 -0
  1607. package/python/lib/tcl9.0/msgs/eu_es.msg +7 -0
  1608. package/python/lib/tcl9.0/msgs/fa.msg +47 -0
  1609. package/python/lib/tcl9.0/msgs/fa_in.msg +52 -0
  1610. package/python/lib/tcl9.0/msgs/fa_ir.msg +9 -0
  1611. package/python/lib/tcl9.0/msgs/fi.msg +50 -0
  1612. package/python/lib/tcl9.0/msgs/fo.msg +47 -0
  1613. package/python/lib/tcl9.0/msgs/fo_fo.msg +7 -0
  1614. package/python/lib/tcl9.0/msgs/fr.msg +52 -0
  1615. package/python/lib/tcl9.0/msgs/fr_be.msg +7 -0
  1616. package/python/lib/tcl9.0/msgs/fr_ca.msg +7 -0
  1617. package/python/lib/tcl9.0/msgs/fr_ch.msg +7 -0
  1618. package/python/lib/tcl9.0/msgs/ga.msg +47 -0
  1619. package/python/lib/tcl9.0/msgs/ga_ie.msg +7 -0
  1620. package/python/lib/tcl9.0/msgs/gl.msg +47 -0
  1621. package/python/lib/tcl9.0/msgs/gl_es.msg +6 -0
  1622. package/python/lib/tcl9.0/msgs/gv.msg +47 -0
  1623. package/python/lib/tcl9.0/msgs/gv_gb.msg +6 -0
  1624. package/python/lib/tcl9.0/msgs/he.msg +52 -0
  1625. package/python/lib/tcl9.0/msgs/hi.msg +39 -0
  1626. package/python/lib/tcl9.0/msgs/hi_in.msg +6 -0
  1627. package/python/lib/tcl9.0/msgs/hr.msg +50 -0
  1628. package/python/lib/tcl9.0/msgs/hu.msg +54 -0
  1629. package/python/lib/tcl9.0/msgs/id.msg +47 -0
  1630. package/python/lib/tcl9.0/msgs/id_id.msg +6 -0
  1631. package/python/lib/tcl9.0/msgs/is.msg +50 -0
  1632. package/python/lib/tcl9.0/msgs/it.msg +54 -0
  1633. package/python/lib/tcl9.0/msgs/it_ch.msg +6 -0
  1634. package/python/lib/tcl9.0/msgs/ja.msg +44 -0
  1635. package/python/lib/tcl9.0/msgs/kl.msg +47 -0
  1636. package/python/lib/tcl9.0/msgs/kl_gl.msg +7 -0
  1637. package/python/lib/tcl9.0/msgs/ko.msg +55 -0
  1638. package/python/lib/tcl9.0/msgs/ko_kr.msg +8 -0
  1639. package/python/lib/tcl9.0/msgs/kok.msg +39 -0
  1640. package/python/lib/tcl9.0/msgs/kok_in.msg +6 -0
  1641. package/python/lib/tcl9.0/msgs/kw.msg +47 -0
  1642. package/python/lib/tcl9.0/msgs/kw_gb.msg +6 -0
  1643. package/python/lib/tcl9.0/msgs/lt.msg +52 -0
  1644. package/python/lib/tcl9.0/msgs/lv.msg +52 -0
  1645. package/python/lib/tcl9.0/msgs/mk.msg +52 -0
  1646. package/python/lib/tcl9.0/msgs/mr.msg +39 -0
  1647. package/python/lib/tcl9.0/msgs/mr_in.msg +6 -0
  1648. package/python/lib/tcl9.0/msgs/ms.msg +47 -0
  1649. package/python/lib/tcl9.0/msgs/ms_my.msg +6 -0
  1650. package/python/lib/tcl9.0/msgs/mt.msg +27 -0
  1651. package/python/lib/tcl9.0/msgs/nb.msg +52 -0
  1652. package/python/lib/tcl9.0/msgs/nl.msg +50 -0
  1653. package/python/lib/tcl9.0/msgs/nl_be.msg +7 -0
  1654. package/python/lib/tcl9.0/msgs/nn.msg +52 -0
  1655. package/python/lib/tcl9.0/msgs/pl.msg +52 -0
  1656. package/python/lib/tcl9.0/msgs/pt.msg +50 -0
  1657. package/python/lib/tcl9.0/msgs/pt_br.msg +7 -0
  1658. package/python/lib/tcl9.0/msgs/ro.msg +52 -0
  1659. package/python/lib/tcl9.0/msgs/ru.msg +52 -0
  1660. package/python/lib/tcl9.0/msgs/ru_ua.msg +6 -0
  1661. package/python/lib/tcl9.0/msgs/sh.msg +52 -0
  1662. package/python/lib/tcl9.0/msgs/sk.msg +52 -0
  1663. package/python/lib/tcl9.0/msgs/sl.msg +52 -0
  1664. package/python/lib/tcl9.0/msgs/sq.msg +54 -0
  1665. package/python/lib/tcl9.0/msgs/sr.msg +52 -0
  1666. package/python/lib/tcl9.0/msgs/sv.msg +52 -0
  1667. package/python/lib/tcl9.0/msgs/sw.msg +49 -0
  1668. package/python/lib/tcl9.0/msgs/ta.msg +39 -0
  1669. package/python/lib/tcl9.0/msgs/ta_in.msg +6 -0
  1670. package/python/lib/tcl9.0/msgs/te.msg +47 -0
  1671. package/python/lib/tcl9.0/msgs/te_in.msg +8 -0
  1672. package/python/lib/tcl9.0/msgs/th.msg +54 -0
  1673. package/python/lib/tcl9.0/msgs/tr.msg +50 -0
  1674. package/python/lib/tcl9.0/msgs/uk.msg +52 -0
  1675. package/python/lib/tcl9.0/msgs/vi.msg +50 -0
  1676. package/python/lib/tcl9.0/msgs/zh.msg +55 -0
  1677. package/python/lib/tcl9.0/msgs/zh_cn.msg +7 -0
  1678. package/python/lib/tcl9.0/msgs/zh_hk.msg +28 -0
  1679. package/python/lib/tcl9.0/msgs/zh_sg.msg +8 -0
  1680. package/python/lib/tcl9.0/msgs/zh_tw.msg +8 -0
  1681. package/python/lib/tcl9.0/opt0.4/optparse.tcl +1069 -0
  1682. package/python/lib/tcl9.0/opt0.4/pkgIndex.tcl +12 -0
  1683. package/python/lib/tcl9.0/package.tcl +767 -0
  1684. package/python/lib/tcl9.0/parray.tcl +28 -0
  1685. package/python/lib/tcl9.0/readfile.tcl +23 -0
  1686. package/python/lib/tcl9.0/safe.tcl +1461 -0
  1687. package/python/lib/tcl9.0/tclAppInit.c +183 -0
  1688. package/python/lib/tcl9.0/tclIndex +112 -0
  1689. package/python/lib/tcl9.0/tm.tcl +378 -0
  1690. package/python/lib/tcl9.0/word.tcl +155 -0
  1691. package/python/lib/tcl9.0/writefile.tcl +37 -0
  1692. package/python/lib/thread3.0.4/libtcl9thread3.0.4.dylib +0 -0
  1693. package/python/lib/thread3.0.4/libthread3.0.4.dylib +0 -0
  1694. package/python/lib/thread3.0.4/pkgIndex.tcl +52 -0
  1695. package/python/lib/thread3.0.4/ttrace.tcl +943 -0
  1696. package/python/lib/tk9.0/bgerror.tcl +282 -0
  1697. package/python/lib/tk9.0/button.tcl +782 -0
  1698. package/python/lib/tk9.0/choosedir.tcl +310 -0
  1699. package/python/lib/tk9.0/clrpick.tcl +696 -0
  1700. package/python/lib/tk9.0/comdlg.tcl +322 -0
  1701. package/python/lib/tk9.0/console.tcl +1148 -0
  1702. package/python/lib/tk9.0/demos/README +44 -0
  1703. package/python/lib/tk9.0/demos/anilabel.tcl +168 -0
  1704. package/python/lib/tk9.0/demos/aniwave.tcl +107 -0
  1705. package/python/lib/tk9.0/demos/arrow.tcl +260 -0
  1706. package/python/lib/tk9.0/demos/bind.tcl +78 -0
  1707. package/python/lib/tk9.0/demos/bitmap.tcl +52 -0
  1708. package/python/lib/tk9.0/demos/browse +66 -0
  1709. package/python/lib/tk9.0/demos/button.tcl +47 -0
  1710. package/python/lib/tk9.0/demos/check.tcl +71 -0
  1711. package/python/lib/tk9.0/demos/clrpick.tcl +54 -0
  1712. package/python/lib/tk9.0/demos/colors.tcl +99 -0
  1713. package/python/lib/tk9.0/demos/combo.tcl +62 -0
  1714. package/python/lib/tk9.0/demos/cscroll.tcl +134 -0
  1715. package/python/lib/tk9.0/demos/ctext.tcl +172 -0
  1716. package/python/lib/tk9.0/demos/dialog1.tcl +25 -0
  1717. package/python/lib/tk9.0/demos/dialog2.tcl +18 -0
  1718. package/python/lib/tk9.0/demos/en.msg +103 -0
  1719. package/python/lib/tk9.0/demos/entry1.tcl +34 -0
  1720. package/python/lib/tk9.0/demos/entry2.tcl +47 -0
  1721. package/python/lib/tk9.0/demos/entry3.tcl +185 -0
  1722. package/python/lib/tk9.0/demos/filebox.tcl +82 -0
  1723. package/python/lib/tk9.0/demos/floor.tcl +1379 -0
  1724. package/python/lib/tk9.0/demos/fontchoose.tcl +67 -0
  1725. package/python/lib/tk9.0/demos/form.tcl +38 -0
  1726. package/python/lib/tk9.0/demos/goldberg.tcl +1970 -0
  1727. package/python/lib/tk9.0/demos/hello +22 -0
  1728. package/python/lib/tk9.0/demos/hscale.tcl +49 -0
  1729. package/python/lib/tk9.0/demos/icon.tcl +51 -0
  1730. package/python/lib/tk9.0/demos/image1.tcl +44 -0
  1731. package/python/lib/tk9.0/demos/image2.tcl +114 -0
  1732. package/python/lib/tk9.0/demos/images/Tcl.svg +75 -0
  1733. package/python/lib/tk9.0/demos/images/Tk_feather.png +0 -0
  1734. package/python/lib/tk9.0/demos/images/earth.gif +0 -0
  1735. package/python/lib/tk9.0/demos/images/earthmenu.png +0 -0
  1736. package/python/lib/tk9.0/demos/images/earthris.gif +0 -0
  1737. package/python/lib/tk9.0/demos/images/flagdown.xbm +27 -0
  1738. package/python/lib/tk9.0/demos/images/flagup.xbm +27 -0
  1739. package/python/lib/tk9.0/demos/images/gray25.xbm +6 -0
  1740. package/python/lib/tk9.0/demos/images/letters.xbm +27 -0
  1741. package/python/lib/tk9.0/demos/images/noletter.xbm +27 -0
  1742. package/python/lib/tk9.0/demos/images/ouster.png +0 -0
  1743. package/python/lib/tk9.0/demos/images/pattern.xbm +6 -0
  1744. package/python/lib/tk9.0/demos/images/plowed_field.png +0 -0
  1745. package/python/lib/tk9.0/demos/images/starry_night.png +0 -0
  1746. package/python/lib/tk9.0/demos/images/tcllogo.gif +0 -0
  1747. package/python/lib/tk9.0/demos/images/teapot.ppm +31 -0
  1748. package/python/lib/tk9.0/demos/items.tcl +307 -0
  1749. package/python/lib/tk9.0/demos/ixset +328 -0
  1750. package/python/lib/tk9.0/demos/knightstour.tcl +274 -0
  1751. package/python/lib/tk9.0/demos/label.tcl +47 -0
  1752. package/python/lib/tk9.0/demos/labelframe.tcl +76 -0
  1753. package/python/lib/tk9.0/demos/license.terms +40 -0
  1754. package/python/lib/tk9.0/demos/mac_styles.tcl +266 -0
  1755. package/python/lib/tk9.0/demos/mac_tabs.tcl +76 -0
  1756. package/python/lib/tk9.0/demos/mac_wm.tcl +227 -0
  1757. package/python/lib/tk9.0/demos/mclist.tcl +170 -0
  1758. package/python/lib/tk9.0/demos/menu.tcl +184 -0
  1759. package/python/lib/tk9.0/demos/menubu.tcl +90 -0
  1760. package/python/lib/tk9.0/demos/msgbox.tcl +62 -0
  1761. package/python/lib/tk9.0/demos/nl.msg +132 -0
  1762. package/python/lib/tk9.0/demos/paned1.tcl +32 -0
  1763. package/python/lib/tk9.0/demos/paned2.tcl +74 -0
  1764. package/python/lib/tk9.0/demos/pendulum.tcl +206 -0
  1765. package/python/lib/tk9.0/demos/plot.tcl +97 -0
  1766. package/python/lib/tk9.0/demos/print.tcl +91 -0
  1767. package/python/lib/tk9.0/demos/puzzle.tcl +82 -0
  1768. package/python/lib/tk9.0/demos/radio.tcl +66 -0
  1769. package/python/lib/tk9.0/demos/rmt +210 -0
  1770. package/python/lib/tk9.0/demos/rolodex +204 -0
  1771. package/python/lib/tk9.0/demos/ruler.tcl +175 -0
  1772. package/python/lib/tk9.0/demos/sayings.tcl +44 -0
  1773. package/python/lib/tk9.0/demos/search.tcl +139 -0
  1774. package/python/lib/tk9.0/demos/spin.tcl +45 -0
  1775. package/python/lib/tk9.0/demos/states.tcl +54 -0
  1776. package/python/lib/tk9.0/demos/style.tcl +155 -0
  1777. package/python/lib/tk9.0/demos/systray.tcl +89 -0
  1778. package/python/lib/tk9.0/demos/tclIndex +70 -0
  1779. package/python/lib/tk9.0/demos/tcolor +358 -0
  1780. package/python/lib/tk9.0/demos/text.tcl +113 -0
  1781. package/python/lib/tk9.0/demos/textpeer.tcl +62 -0
  1782. package/python/lib/tk9.0/demos/timer +47 -0
  1783. package/python/lib/tk9.0/demos/toolbar.tcl +92 -0
  1784. package/python/lib/tk9.0/demos/tree.tcl +89 -0
  1785. package/python/lib/tk9.0/demos/ttkbut.tcl +84 -0
  1786. package/python/lib/tk9.0/demos/ttkmenu.tcl +53 -0
  1787. package/python/lib/tk9.0/demos/ttknote.tcl +57 -0
  1788. package/python/lib/tk9.0/demos/ttkpane.tcl +112 -0
  1789. package/python/lib/tk9.0/demos/ttkprogress.tcl +46 -0
  1790. package/python/lib/tk9.0/demos/ttkscale.tcl +39 -0
  1791. package/python/lib/tk9.0/demos/ttkspin.tcl +49 -0
  1792. package/python/lib/tk9.0/demos/twind.tcl +358 -0
  1793. package/python/lib/tk9.0/demos/unicodeout.tcl +126 -0
  1794. package/python/lib/tk9.0/demos/vscale.tcl +50 -0
  1795. package/python/lib/tk9.0/demos/widget +713 -0
  1796. package/python/lib/tk9.0/demos/windowicons.tcl +108 -0
  1797. package/python/lib/tk9.0/dialog.tcl +175 -0
  1798. package/python/lib/tk9.0/entry.tcl +720 -0
  1799. package/python/lib/tk9.0/focus.tcl +178 -0
  1800. package/python/lib/tk9.0/fontchooser.tcl +512 -0
  1801. package/python/lib/tk9.0/iconbadges.tcl +253 -0
  1802. package/python/lib/tk9.0/iconlist.tcl +705 -0
  1803. package/python/lib/tk9.0/icons.tcl +54 -0
  1804. package/python/lib/tk9.0/images/README +7 -0
  1805. package/python/lib/tk9.0/images/logo.eps +2091 -0
  1806. package/python/lib/tk9.0/images/logo100.gif +0 -0
  1807. package/python/lib/tk9.0/images/logo64.gif +0 -0
  1808. package/python/lib/tk9.0/images/logoLarge.gif +0 -0
  1809. package/python/lib/tk9.0/images/logoMed.gif +0 -0
  1810. package/python/lib/tk9.0/images/pwrdLogo.eps +1897 -0
  1811. package/python/lib/tk9.0/images/pwrdLogo100.gif +0 -0
  1812. package/python/lib/tk9.0/images/pwrdLogo150.gif +0 -0
  1813. package/python/lib/tk9.0/images/pwrdLogo175.gif +0 -0
  1814. package/python/lib/tk9.0/images/pwrdLogo200.gif +0 -0
  1815. package/python/lib/tk9.0/images/pwrdLogo75.gif +0 -0
  1816. package/python/lib/tk9.0/images/tai-ku.gif +0 -0
  1817. package/python/lib/tk9.0/listbox.tcl +522 -0
  1818. package/python/lib/tk9.0/megawidget.tcl +297 -0
  1819. package/python/lib/tk9.0/menu.tcl +1376 -0
  1820. package/python/lib/tk9.0/mkpsenc.tcl +1488 -0
  1821. package/python/lib/tk9.0/msgbox.tcl +454 -0
  1822. package/python/lib/tk9.0/msgs/cs.msg +95 -0
  1823. package/python/lib/tk9.0/msgs/da.msg +96 -0
  1824. package/python/lib/tk9.0/msgs/de.msg +109 -0
  1825. package/python/lib/tk9.0/msgs/el.msg +104 -0
  1826. package/python/lib/tk9.0/msgs/en.msg +110 -0
  1827. package/python/lib/tk9.0/msgs/en_gb.msg +3 -0
  1828. package/python/lib/tk9.0/msgs/eo.msg +93 -0
  1829. package/python/lib/tk9.0/msgs/es.msg +94 -0
  1830. package/python/lib/tk9.0/msgs/fi.msg +114 -0
  1831. package/python/lib/tk9.0/msgs/fr.msg +90 -0
  1832. package/python/lib/tk9.0/msgs/hu.msg +96 -0
  1833. package/python/lib/tk9.0/msgs/it.msg +91 -0
  1834. package/python/lib/tk9.0/msgs/nl.msg +109 -0
  1835. package/python/lib/tk9.0/msgs/pl.msg +109 -0
  1836. package/python/lib/tk9.0/msgs/pt.msg +92 -0
  1837. package/python/lib/tk9.0/msgs/ru.msg +112 -0
  1838. package/python/lib/tk9.0/msgs/sv.msg +94 -0
  1839. package/python/lib/tk9.0/msgs/zh_cn.msg +111 -0
  1840. package/python/lib/tk9.0/optMenu.tcl +43 -0
  1841. package/python/lib/tk9.0/palette.tcl +283 -0
  1842. package/python/lib/tk9.0/panedwindow.tcl +194 -0
  1843. package/python/lib/tk9.0/pkgIndex.tcl +3 -0
  1844. package/python/lib/tk9.0/print.tcl +1460 -0
  1845. package/python/lib/tk9.0/safetk.tcl +262 -0
  1846. package/python/lib/tk9.0/scale.tcl +299 -0
  1847. package/python/lib/tk9.0/scaling.tcl +232 -0
  1848. package/python/lib/tk9.0/scrlbar.tcl +500 -0
  1849. package/python/lib/tk9.0/spinbox.tcl +580 -0
  1850. package/python/lib/tk9.0/systray.tcl +483 -0
  1851. package/python/lib/tk9.0/tclIndex +252 -0
  1852. package/python/lib/tk9.0/tearoff.tcl +155 -0
  1853. package/python/lib/tk9.0/text.tcl +1295 -0
  1854. package/python/lib/tk9.0/tk.tcl +853 -0
  1855. package/python/lib/tk9.0/tkAppInit.c +200 -0
  1856. package/python/lib/tk9.0/tkfbox.tcl +1251 -0
  1857. package/python/lib/tk9.0/ttk/altTheme.tcl +153 -0
  1858. package/python/lib/tk9.0/ttk/aquaTheme.tcl +178 -0
  1859. package/python/lib/tk9.0/ttk/button.tcl +83 -0
  1860. package/python/lib/tk9.0/ttk/clamTheme.tcl +196 -0
  1861. package/python/lib/tk9.0/ttk/classicTheme.tcl +145 -0
  1862. package/python/lib/tk9.0/ttk/combobox.tcl +555 -0
  1863. package/python/lib/tk9.0/ttk/cursors.tcl +205 -0
  1864. package/python/lib/tk9.0/ttk/defaults.tcl +231 -0
  1865. package/python/lib/tk9.0/ttk/entry.tcl +678 -0
  1866. package/python/lib/tk9.0/ttk/fonts.tcl +152 -0
  1867. package/python/lib/tk9.0/ttk/menubutton.tcl +237 -0
  1868. package/python/lib/tk9.0/ttk/notebook.tcl +255 -0
  1869. package/python/lib/tk9.0/ttk/panedwindow.tcl +89 -0
  1870. package/python/lib/tk9.0/ttk/progress.tcl +55 -0
  1871. package/python/lib/tk9.0/ttk/scale.tcl +94 -0
  1872. package/python/lib/tk9.0/ttk/scrollbar.tcl +119 -0
  1873. package/python/lib/tk9.0/ttk/sizegrip.tcl +102 -0
  1874. package/python/lib/tk9.0/ttk/spinbox.tcl +204 -0
  1875. package/python/lib/tk9.0/ttk/treeview.tcl +464 -0
  1876. package/python/lib/tk9.0/ttk/ttk.tcl +223 -0
  1877. package/python/lib/tk9.0/ttk/utils.tcl +317 -0
  1878. package/python/lib/tk9.0/ttk/vistaTheme.tcl +259 -0
  1879. package/python/lib/tk9.0/ttk/winTheme.tcl +119 -0
  1880. package/python/lib/tk9.0/ttk/xpTheme.tcl +95 -0
  1881. package/python/lib/tk9.0/xmfbox.tcl +982 -0
  1882. package/python/share/man/man1/python3.13.1 +740 -0
  1883. package/runtime-manifest.json +7 -0
@@ -0,0 +1,2859 @@
1
+ #!/usr/bin/env python3
2
+ """Generate Python documentation in HTML or text for interactive use.
3
+
4
+ At the Python interactive prompt, calling help(thing) on a Python object
5
+ documents the object, and calling help() starts up an interactive
6
+ help session.
7
+
8
+ Or, at the shell command line outside of Python:
9
+
10
+ Run "pydoc <name>" to show documentation on something. <name> may be
11
+ the name of a function, module, package, or a dotted reference to a
12
+ class or function within a module or module in a package. If the
13
+ argument contains a path segment delimiter (e.g. slash on Unix,
14
+ backslash on Windows) it is treated as the path to a Python source file.
15
+
16
+ Run "pydoc -k <keyword>" to search for a keyword in the synopsis lines
17
+ of all available modules.
18
+
19
+ Run "pydoc -n <hostname>" to start an HTTP server with the given
20
+ hostname (default: localhost) on the local machine.
21
+
22
+ Run "pydoc -p <port>" to start an HTTP server on the given port on the
23
+ local machine. Port number 0 can be used to get an arbitrary unused port.
24
+
25
+ Run "pydoc -b" to start an HTTP server on an arbitrary unused port and
26
+ open a web browser to interactively browse documentation. Combine with
27
+ the -n and -p options to control the hostname and port used.
28
+
29
+ Run "pydoc -w <name>" to write out the HTML documentation for a module
30
+ to a file named "<name>.html".
31
+
32
+ Module docs for core modules are assumed to be in
33
+
34
+ https://docs.python.org/X.Y/library/
35
+
36
+ This can be overridden by setting the PYTHONDOCS environment variable
37
+ to a different URL or to a local directory containing the Library
38
+ Reference Manual pages.
39
+ """
40
+ __all__ = ['help']
41
+ __author__ = "Ka-Ping Yee <ping@lfw.org>"
42
+ __date__ = "26 February 2001"
43
+
44
+ __credits__ = """Guido van Rossum, for an excellent programming language.
45
+ Tommy Burnette, the original creator of manpy.
46
+ Paul Prescod, for all his work on onlinehelp.
47
+ Richard Chamberlain, for the first implementation of textdoc.
48
+ """
49
+
50
+ # Known bugs that can't be fixed here:
51
+ # - synopsis() cannot be prevented from clobbering existing
52
+ # loaded modules.
53
+ # - If the __file__ attribute on a module is a relative path and
54
+ # the current directory is changed with os.chdir(), an incorrect
55
+ # path will be displayed.
56
+
57
+ import ast
58
+ import __future__
59
+ import builtins
60
+ import importlib._bootstrap
61
+ import importlib._bootstrap_external
62
+ import importlib.machinery
63
+ import importlib.util
64
+ import inspect
65
+ import io
66
+ import os
67
+ import pkgutil
68
+ import platform
69
+ import re
70
+ import sys
71
+ import sysconfig
72
+ import time
73
+ import tokenize
74
+ import urllib.parse
75
+ import warnings
76
+ from collections import deque
77
+ from reprlib import Repr
78
+ from traceback import format_exception_only
79
+
80
+ from _pyrepl.pager import (get_pager, plain, pipe_pager,
81
+ plain_pager, tempfile_pager, tty_pager)
82
+
83
+
84
+ # --------------------------------------------------------- old names
85
+
86
+ getpager = get_pager
87
+ pipepager = pipe_pager
88
+ plainpager = plain_pager
89
+ tempfilepager = tempfile_pager
90
+ ttypager = tty_pager
91
+
92
+
93
+ # --------------------------------------------------------- common routines
94
+
95
+ def pathdirs():
96
+ """Convert sys.path into a list of absolute, existing, unique paths."""
97
+ dirs = []
98
+ normdirs = []
99
+ for dir in sys.path:
100
+ dir = os.path.abspath(dir or '.')
101
+ normdir = os.path.normcase(dir)
102
+ if normdir not in normdirs and os.path.isdir(dir):
103
+ dirs.append(dir)
104
+ normdirs.append(normdir)
105
+ return dirs
106
+
107
+ def _findclass(func):
108
+ cls = sys.modules.get(func.__module__)
109
+ if cls is None:
110
+ return None
111
+ for name in func.__qualname__.split('.')[:-1]:
112
+ cls = getattr(cls, name)
113
+ if not inspect.isclass(cls):
114
+ return None
115
+ return cls
116
+
117
+ def _finddoc(obj):
118
+ if inspect.ismethod(obj):
119
+ name = obj.__func__.__name__
120
+ self = obj.__self__
121
+ if (inspect.isclass(self) and
122
+ getattr(getattr(self, name, None), '__func__') is obj.__func__):
123
+ # classmethod
124
+ cls = self
125
+ else:
126
+ cls = self.__class__
127
+ elif inspect.isfunction(obj):
128
+ name = obj.__name__
129
+ cls = _findclass(obj)
130
+ if cls is None or getattr(cls, name) is not obj:
131
+ return None
132
+ elif inspect.isbuiltin(obj):
133
+ name = obj.__name__
134
+ self = obj.__self__
135
+ if (inspect.isclass(self) and
136
+ self.__qualname__ + '.' + name == obj.__qualname__):
137
+ # classmethod
138
+ cls = self
139
+ else:
140
+ cls = self.__class__
141
+ # Should be tested before isdatadescriptor().
142
+ elif isinstance(obj, property):
143
+ name = obj.__name__
144
+ cls = _findclass(obj.fget)
145
+ if cls is None or getattr(cls, name) is not obj:
146
+ return None
147
+ elif inspect.ismethoddescriptor(obj) or inspect.isdatadescriptor(obj):
148
+ name = obj.__name__
149
+ cls = obj.__objclass__
150
+ if getattr(cls, name) is not obj:
151
+ return None
152
+ if inspect.ismemberdescriptor(obj):
153
+ slots = getattr(cls, '__slots__', None)
154
+ if isinstance(slots, dict) and name in slots:
155
+ return slots[name]
156
+ else:
157
+ return None
158
+ for base in cls.__mro__:
159
+ try:
160
+ doc = _getowndoc(getattr(base, name))
161
+ except AttributeError:
162
+ continue
163
+ if doc is not None:
164
+ return doc
165
+ return None
166
+
167
+ def _getowndoc(obj):
168
+ """Get the documentation string for an object if it is not
169
+ inherited from its class."""
170
+ try:
171
+ doc = object.__getattribute__(obj, '__doc__')
172
+ if doc is None:
173
+ return None
174
+ if obj is not type:
175
+ typedoc = type(obj).__doc__
176
+ if isinstance(typedoc, str) and typedoc == doc:
177
+ return None
178
+ return doc
179
+ except AttributeError:
180
+ return None
181
+
182
+ def _getdoc(object):
183
+ """Get the documentation string for an object.
184
+
185
+ All tabs are expanded to spaces. To clean up docstrings that are
186
+ indented to line up with blocks of code, any whitespace than can be
187
+ uniformly removed from the second line onwards is removed."""
188
+ doc = _getowndoc(object)
189
+ if doc is None:
190
+ try:
191
+ doc = _finddoc(object)
192
+ except (AttributeError, TypeError):
193
+ return None
194
+ if not isinstance(doc, str):
195
+ return None
196
+ return inspect.cleandoc(doc)
197
+
198
+ def getdoc(object):
199
+ """Get the doc string or comments for an object."""
200
+ result = _getdoc(object) or inspect.getcomments(object)
201
+ return result and re.sub('^ *\n', '', result.rstrip()) or ''
202
+
203
+ def splitdoc(doc):
204
+ """Split a doc string into a synopsis line (if any) and the rest."""
205
+ lines = doc.strip().split('\n')
206
+ if len(lines) == 1:
207
+ return lines[0], ''
208
+ elif len(lines) >= 2 and not lines[1].rstrip():
209
+ return lines[0], '\n'.join(lines[2:])
210
+ return '', '\n'.join(lines)
211
+
212
+ def _getargspec(object):
213
+ try:
214
+ signature = inspect.signature(object)
215
+ if signature:
216
+ name = getattr(object, '__name__', '')
217
+ # <lambda> function are always single-line and should not be formatted
218
+ max_width = (80 - len(name)) if name != '<lambda>' else None
219
+ return signature.format(max_width=max_width)
220
+ except (ValueError, TypeError):
221
+ argspec = getattr(object, '__text_signature__', None)
222
+ if argspec:
223
+ if argspec[:2] == '($':
224
+ argspec = '(' + argspec[2:]
225
+ if getattr(object, '__self__', None) is not None:
226
+ # Strip the bound argument.
227
+ m = re.match(r'\(\w+(?:(?=\))|,\s*(?:/(?:(?=\))|,\s*))?)', argspec)
228
+ if m:
229
+ argspec = '(' + argspec[m.end():]
230
+ return argspec
231
+ return None
232
+
233
+ def classname(object, modname):
234
+ """Get a class name and qualify it with a module name if necessary."""
235
+ name = object.__name__
236
+ if object.__module__ != modname:
237
+ name = object.__module__ + '.' + name
238
+ return name
239
+
240
+ def parentname(object, modname):
241
+ """Get a name of the enclosing class (qualified it with a module name
242
+ if necessary) or module."""
243
+ if '.' in object.__qualname__:
244
+ name = object.__qualname__.rpartition('.')[0]
245
+ if object.__module__ != modname and object.__module__ is not None:
246
+ return object.__module__ + '.' + name
247
+ else:
248
+ return name
249
+ else:
250
+ if object.__module__ != modname:
251
+ return object.__module__
252
+
253
+ def isdata(object):
254
+ """Check if an object is of a type that probably means it's data."""
255
+ return not (inspect.ismodule(object) or inspect.isclass(object) or
256
+ inspect.isroutine(object) or inspect.isframe(object) or
257
+ inspect.istraceback(object) or inspect.iscode(object))
258
+
259
+ def replace(text, *pairs):
260
+ """Do a series of global replacements on a string."""
261
+ while pairs:
262
+ text = pairs[1].join(text.split(pairs[0]))
263
+ pairs = pairs[2:]
264
+ return text
265
+
266
+ def cram(text, maxlen):
267
+ """Omit part of a string if needed to make it fit in a maximum length."""
268
+ if len(text) > maxlen:
269
+ pre = max(0, (maxlen-3)//2)
270
+ post = max(0, maxlen-3-pre)
271
+ return text[:pre] + '...' + text[len(text)-post:]
272
+ return text
273
+
274
+ _re_stripid = re.compile(r' at 0x[0-9a-f]{6,16}(>+)$', re.IGNORECASE)
275
+ def stripid(text):
276
+ """Remove the hexadecimal id from a Python object representation."""
277
+ # The behaviour of %p is implementation-dependent in terms of case.
278
+ return _re_stripid.sub(r'\1', text)
279
+
280
+ def _is_bound_method(fn):
281
+ """
282
+ Returns True if fn is a bound method, regardless of whether
283
+ fn was implemented in Python or in C.
284
+ """
285
+ if inspect.ismethod(fn):
286
+ return True
287
+ if inspect.isbuiltin(fn):
288
+ self = getattr(fn, '__self__', None)
289
+ return not (inspect.ismodule(self) or (self is None))
290
+ return False
291
+
292
+
293
+ def allmethods(cl):
294
+ methods = {}
295
+ for key, value in inspect.getmembers(cl, inspect.isroutine):
296
+ methods[key] = 1
297
+ for base in cl.__bases__:
298
+ methods.update(allmethods(base)) # all your base are belong to us
299
+ for key in methods.keys():
300
+ methods[key] = getattr(cl, key)
301
+ return methods
302
+
303
+ def _split_list(s, predicate):
304
+ """Split sequence s via predicate, and return pair ([true], [false]).
305
+
306
+ The return value is a 2-tuple of lists,
307
+ ([x for x in s if predicate(x)],
308
+ [x for x in s if not predicate(x)])
309
+ """
310
+
311
+ yes = []
312
+ no = []
313
+ for x in s:
314
+ if predicate(x):
315
+ yes.append(x)
316
+ else:
317
+ no.append(x)
318
+ return yes, no
319
+
320
+ _future_feature_names = set(__future__.all_feature_names)
321
+
322
+ def visiblename(name, all=None, obj=None):
323
+ """Decide whether to show documentation on a variable."""
324
+ # Certain special names are redundant or internal.
325
+ # XXX Remove __initializing__?
326
+ if name in {'__author__', '__builtins__', '__cached__', '__credits__',
327
+ '__date__', '__doc__', '__file__', '__spec__',
328
+ '__loader__', '__module__', '__name__', '__package__',
329
+ '__path__', '__qualname__', '__slots__', '__version__',
330
+ '__static_attributes__', '__firstlineno__'}:
331
+ return 0
332
+ # Private names are hidden, but special names are displayed.
333
+ if name.startswith('__') and name.endswith('__'): return 1
334
+ # Namedtuples have public fields and methods with a single leading underscore
335
+ if name.startswith('_') and hasattr(obj, '_fields'):
336
+ return True
337
+ # Ignore __future__ imports.
338
+ if obj is not __future__ and name in _future_feature_names:
339
+ if isinstance(getattr(obj, name, None), __future__._Feature):
340
+ return False
341
+ if all is not None:
342
+ # only document that which the programmer exported in __all__
343
+ return name in all
344
+ else:
345
+ return not name.startswith('_')
346
+
347
+ def classify_class_attrs(object):
348
+ """Wrap inspect.classify_class_attrs, with fixup for data descriptors and bound methods."""
349
+ results = []
350
+ for (name, kind, cls, value) in inspect.classify_class_attrs(object):
351
+ if inspect.isdatadescriptor(value):
352
+ kind = 'data descriptor'
353
+ if isinstance(value, property) and value.fset is None:
354
+ kind = 'readonly property'
355
+ elif kind == 'method' and _is_bound_method(value):
356
+ kind = 'static method'
357
+ results.append((name, kind, cls, value))
358
+ return results
359
+
360
+ def sort_attributes(attrs, object):
361
+ 'Sort the attrs list in-place by _fields and then alphabetically by name'
362
+ # This allows data descriptors to be ordered according
363
+ # to a _fields attribute if present.
364
+ fields = getattr(object, '_fields', [])
365
+ try:
366
+ field_order = {name : i-len(fields) for (i, name) in enumerate(fields)}
367
+ except TypeError:
368
+ field_order = {}
369
+ keyfunc = lambda attr: (field_order.get(attr[0], 0), attr[0])
370
+ attrs.sort(key=keyfunc)
371
+
372
+ # ----------------------------------------------------- module manipulation
373
+
374
+ def ispackage(path):
375
+ """Guess whether a path refers to a package directory."""
376
+ warnings.warn('The pydoc.ispackage() function is deprecated',
377
+ DeprecationWarning, stacklevel=2)
378
+ if os.path.isdir(path):
379
+ for ext in ('.py', '.pyc'):
380
+ if os.path.isfile(os.path.join(path, '__init__' + ext)):
381
+ return True
382
+ return False
383
+
384
+ def source_synopsis(file):
385
+ """Return the one-line summary of a file object, if present"""
386
+
387
+ string = ''
388
+ try:
389
+ tokens = tokenize.generate_tokens(file.readline)
390
+ for tok_type, tok_string, _, _, _ in tokens:
391
+ if tok_type == tokenize.STRING:
392
+ string += tok_string
393
+ elif tok_type == tokenize.NEWLINE:
394
+ with warnings.catch_warnings():
395
+ # Ignore the "invalid escape sequence" warning.
396
+ warnings.simplefilter("ignore", SyntaxWarning)
397
+ docstring = ast.literal_eval(string)
398
+ if not isinstance(docstring, str):
399
+ return None
400
+ return docstring.strip().split('\n')[0].strip()
401
+ elif tok_type == tokenize.OP and tok_string in ('(', ')'):
402
+ string += tok_string
403
+ elif tok_type not in (tokenize.COMMENT, tokenize.NL, tokenize.ENCODING):
404
+ return None
405
+ except (tokenize.TokenError, UnicodeDecodeError, SyntaxError):
406
+ return None
407
+ return None
408
+
409
+ def synopsis(filename, cache={}):
410
+ """Get the one-line summary out of a module file."""
411
+ mtime = os.stat(filename).st_mtime
412
+ lastupdate, result = cache.get(filename, (None, None))
413
+ if lastupdate is None or lastupdate < mtime:
414
+ # Look for binary suffixes first, falling back to source.
415
+ if filename.endswith(tuple(importlib.machinery.BYTECODE_SUFFIXES)):
416
+ loader_cls = importlib.machinery.SourcelessFileLoader
417
+ elif filename.endswith(tuple(importlib.machinery.EXTENSION_SUFFIXES)):
418
+ loader_cls = importlib.machinery.ExtensionFileLoader
419
+ else:
420
+ loader_cls = None
421
+ # Now handle the choice.
422
+ if loader_cls is None:
423
+ # Must be a source file.
424
+ try:
425
+ file = tokenize.open(filename)
426
+ except OSError:
427
+ # module can't be opened, so skip it
428
+ return None
429
+ # text modules can be directly examined
430
+ with file:
431
+ result = source_synopsis(file)
432
+ else:
433
+ # Must be a binary module, which has to be imported.
434
+ loader = loader_cls('__temp__', filename)
435
+ # XXX We probably don't need to pass in the loader here.
436
+ spec = importlib.util.spec_from_file_location('__temp__', filename,
437
+ loader=loader)
438
+ try:
439
+ module = importlib._bootstrap._load(spec)
440
+ except:
441
+ return None
442
+ del sys.modules['__temp__']
443
+ result = module.__doc__.splitlines()[0] if module.__doc__ else None
444
+ # Cache the result.
445
+ cache[filename] = (mtime, result)
446
+ return result
447
+
448
+ class ErrorDuringImport(Exception):
449
+ """Errors that occurred while trying to import something to document it."""
450
+ def __init__(self, filename, exc_info):
451
+ if not isinstance(exc_info, tuple):
452
+ assert isinstance(exc_info, BaseException)
453
+ self.exc = type(exc_info)
454
+ self.value = exc_info
455
+ self.tb = exc_info.__traceback__
456
+ else:
457
+ warnings.warn("A tuple value for exc_info is deprecated, use an exception instance",
458
+ DeprecationWarning)
459
+
460
+ self.exc, self.value, self.tb = exc_info
461
+ self.filename = filename
462
+
463
+ def __str__(self):
464
+ exc = self.exc.__name__
465
+ return 'problem in %s - %s: %s' % (self.filename, exc, self.value)
466
+
467
+ def importfile(path):
468
+ """Import a Python source file or compiled file given its path."""
469
+ magic = importlib.util.MAGIC_NUMBER
470
+ with open(path, 'rb') as file:
471
+ is_bytecode = magic == file.read(len(magic))
472
+ filename = os.path.basename(path)
473
+ name, ext = os.path.splitext(filename)
474
+ if is_bytecode:
475
+ loader = importlib._bootstrap_external.SourcelessFileLoader(name, path)
476
+ else:
477
+ loader = importlib._bootstrap_external.SourceFileLoader(name, path)
478
+ # XXX We probably don't need to pass in the loader here.
479
+ spec = importlib.util.spec_from_file_location(name, path, loader=loader)
480
+ try:
481
+ return importlib._bootstrap._load(spec)
482
+ except BaseException as err:
483
+ raise ErrorDuringImport(path, err)
484
+
485
+ def safeimport(path, forceload=0, cache={}):
486
+ """Import a module; handle errors; return None if the module isn't found.
487
+
488
+ If the module *is* found but an exception occurs, it's wrapped in an
489
+ ErrorDuringImport exception and reraised. Unlike __import__, if a
490
+ package path is specified, the module at the end of the path is returned,
491
+ not the package at the beginning. If the optional 'forceload' argument
492
+ is 1, we reload the module from disk (unless it's a dynamic extension)."""
493
+ try:
494
+ # If forceload is 1 and the module has been previously loaded from
495
+ # disk, we always have to reload the module. Checking the file's
496
+ # mtime isn't good enough (e.g. the module could contain a class
497
+ # that inherits from another module that has changed).
498
+ if forceload and path in sys.modules:
499
+ if path not in sys.builtin_module_names:
500
+ # Remove the module from sys.modules and re-import to try
501
+ # and avoid problems with partially loaded modules.
502
+ # Also remove any submodules because they won't appear
503
+ # in the newly loaded module's namespace if they're already
504
+ # in sys.modules.
505
+ subs = [m for m in sys.modules if m.startswith(path + '.')]
506
+ for key in [path] + subs:
507
+ # Prevent garbage collection.
508
+ cache[key] = sys.modules[key]
509
+ del sys.modules[key]
510
+ module = importlib.import_module(path)
511
+ except BaseException as err:
512
+ # Did the error occur before or after the module was found?
513
+ if path in sys.modules:
514
+ # An error occurred while executing the imported module.
515
+ raise ErrorDuringImport(sys.modules[path].__file__, err)
516
+ elif type(err) is SyntaxError:
517
+ # A SyntaxError occurred before we could execute the module.
518
+ raise ErrorDuringImport(err.filename, err)
519
+ elif isinstance(err, ImportError) and err.name == path:
520
+ # No such module in the path.
521
+ return None
522
+ else:
523
+ # Some other error occurred during the importing process.
524
+ raise ErrorDuringImport(path, err)
525
+ return module
526
+
527
+ # ---------------------------------------------------- formatter base class
528
+
529
+ class Doc:
530
+
531
+ PYTHONDOCS = os.environ.get("PYTHONDOCS",
532
+ "https://docs.python.org/%d.%d/library"
533
+ % sys.version_info[:2])
534
+
535
+ def document(self, object, name=None, *args):
536
+ """Generate documentation for an object."""
537
+ args = (object, name) + args
538
+ # 'try' clause is to attempt to handle the possibility that inspect
539
+ # identifies something in a way that pydoc itself has issues handling;
540
+ # think 'super' and how it is a descriptor (which raises the exception
541
+ # by lacking a __name__ attribute) and an instance.
542
+ try:
543
+ if inspect.ismodule(object): return self.docmodule(*args)
544
+ if inspect.isclass(object): return self.docclass(*args)
545
+ if inspect.isroutine(object): return self.docroutine(*args)
546
+ except AttributeError:
547
+ pass
548
+ if inspect.isdatadescriptor(object): return self.docdata(*args)
549
+ return self.docother(*args)
550
+
551
+ def fail(self, object, name=None, *args):
552
+ """Raise an exception for unimplemented types."""
553
+ message = "don't know how to document object%s of type %s" % (
554
+ name and ' ' + repr(name), type(object).__name__)
555
+ raise TypeError(message)
556
+
557
+ docmodule = docclass = docroutine = docother = docproperty = docdata = fail
558
+
559
+ def getdocloc(self, object, basedir=sysconfig.get_path('stdlib')):
560
+ """Return the location of module docs or None"""
561
+
562
+ try:
563
+ file = inspect.getabsfile(object)
564
+ except TypeError:
565
+ file = '(built-in)'
566
+
567
+ docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
568
+
569
+ basedir = os.path.normcase(basedir)
570
+ if (isinstance(object, type(os)) and
571
+ (object.__name__ in ('errno', 'exceptions', 'gc',
572
+ 'marshal', 'posix', 'signal', 'sys',
573
+ '_thread', 'zipimport') or
574
+ (file.startswith(basedir) and
575
+ not file.startswith(os.path.join(basedir, 'site-packages')))) and
576
+ object.__name__ not in ('xml.etree', 'test.test_pydoc.pydoc_mod')):
577
+
578
+ try:
579
+ from pydoc_data import module_docs
580
+ except ImportError:
581
+ module_docs = None
582
+
583
+ if module_docs and object.__name__ in module_docs.module_docs:
584
+ doc_name = module_docs.module_docs[object.__name__]
585
+ if docloc.startswith(("http://", "https://")):
586
+ docloc = "{}/{}".format(docloc.rstrip("/"), doc_name)
587
+ else:
588
+ docloc = os.path.join(docloc, doc_name)
589
+ else:
590
+ docloc = None
591
+ else:
592
+ docloc = None
593
+ return docloc
594
+
595
+ # -------------------------------------------- HTML documentation generator
596
+
597
+ class HTMLRepr(Repr):
598
+ """Class for safely making an HTML representation of a Python object."""
599
+ def __init__(self):
600
+ Repr.__init__(self)
601
+ self.maxlist = self.maxtuple = 20
602
+ self.maxdict = 10
603
+ self.maxstring = self.maxother = 100
604
+
605
+ def escape(self, text):
606
+ return replace(text, '&', '&amp;', '<', '&lt;', '>', '&gt;')
607
+
608
+ def repr(self, object):
609
+ return Repr.repr(self, object)
610
+
611
+ def repr1(self, x, level):
612
+ if hasattr(type(x), '__name__'):
613
+ methodname = 'repr_' + '_'.join(type(x).__name__.split())
614
+ if hasattr(self, methodname):
615
+ return getattr(self, methodname)(x, level)
616
+ return self.escape(cram(stripid(repr(x)), self.maxother))
617
+
618
+ def repr_string(self, x, level):
619
+ test = cram(x, self.maxstring)
620
+ testrepr = repr(test)
621
+ if '\\' in test and '\\' not in replace(testrepr, r'\\', ''):
622
+ # Backslashes are only literal in the string and are never
623
+ # needed to make any special characters, so show a raw string.
624
+ return 'r' + testrepr[0] + self.escape(test) + testrepr[0]
625
+ return re.sub(r'((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)',
626
+ r'<span class="repr">\1</span>',
627
+ self.escape(testrepr))
628
+
629
+ repr_str = repr_string
630
+
631
+ def repr_instance(self, x, level):
632
+ try:
633
+ return self.escape(cram(stripid(repr(x)), self.maxstring))
634
+ except:
635
+ return self.escape('<%s instance>' % x.__class__.__name__)
636
+
637
+ repr_unicode = repr_string
638
+
639
+ class HTMLDoc(Doc):
640
+ """Formatter class for HTML documentation."""
641
+
642
+ # ------------------------------------------- HTML formatting utilities
643
+
644
+ _repr_instance = HTMLRepr()
645
+ repr = _repr_instance.repr
646
+ escape = _repr_instance.escape
647
+
648
+ def page(self, title, contents):
649
+ """Format an HTML page."""
650
+ return '''\
651
+ <!DOCTYPE html>
652
+ <html lang="en">
653
+ <head>
654
+ <meta charset="utf-8">
655
+ <title>Python: %s</title>
656
+ </head><body>
657
+ %s
658
+ </body></html>''' % (title, contents)
659
+
660
+ def heading(self, title, extras=''):
661
+ """Format a page heading."""
662
+ return '''
663
+ <table class="heading">
664
+ <tr class="heading-text decor">
665
+ <td class="title">&nbsp;<br>%s</td>
666
+ <td class="extra">%s</td></tr></table>
667
+ ''' % (title, extras or '&nbsp;')
668
+
669
+ def section(self, title, cls, contents, width=6,
670
+ prelude='', marginalia=None, gap='&nbsp;'):
671
+ """Format a section with a heading."""
672
+ if marginalia is None:
673
+ marginalia = '<span class="code">' + '&nbsp;' * width + '</span>'
674
+ result = '''<p>
675
+ <table class="section">
676
+ <tr class="decor %s-decor heading-text">
677
+ <td class="section-title" colspan=3>&nbsp;<br>%s</td></tr>
678
+ ''' % (cls, title)
679
+ if prelude:
680
+ result = result + '''
681
+ <tr><td class="decor %s-decor" rowspan=2>%s</td>
682
+ <td class="decor %s-decor" colspan=2>%s</td></tr>
683
+ <tr><td>%s</td>''' % (cls, marginalia, cls, prelude, gap)
684
+ else:
685
+ result = result + '''
686
+ <tr><td class="decor %s-decor">%s</td><td>%s</td>''' % (cls, marginalia, gap)
687
+
688
+ return result + '\n<td class="singlecolumn">%s</td></tr></table>' % contents
689
+
690
+ def bigsection(self, title, *args):
691
+ """Format a section with a big heading."""
692
+ title = '<strong class="bigsection">%s</strong>' % title
693
+ return self.section(title, *args)
694
+
695
+ def preformat(self, text):
696
+ """Format literal preformatted text."""
697
+ text = self.escape(text.expandtabs())
698
+ return replace(text, '\n\n', '\n \n', '\n\n', '\n \n',
699
+ ' ', '&nbsp;', '\n', '<br>\n')
700
+
701
+ def multicolumn(self, list, format):
702
+ """Format a list of items into a multi-column list."""
703
+ result = ''
704
+ rows = (len(list) + 3) // 4
705
+ for col in range(4):
706
+ result = result + '<td class="multicolumn">'
707
+ for i in range(rows*col, rows*col+rows):
708
+ if i < len(list):
709
+ result = result + format(list[i]) + '<br>\n'
710
+ result = result + '</td>'
711
+ return '<table><tr>%s</tr></table>' % result
712
+
713
+ def grey(self, text): return '<span class="grey">%s</span>' % text
714
+
715
+ def namelink(self, name, *dicts):
716
+ """Make a link for an identifier, given name-to-URL mappings."""
717
+ for dict in dicts:
718
+ if name in dict:
719
+ return '<a href="%s">%s</a>' % (dict[name], name)
720
+ return name
721
+
722
+ def classlink(self, object, modname):
723
+ """Make a link for a class."""
724
+ name, module = object.__name__, sys.modules.get(object.__module__)
725
+ if hasattr(module, name) and getattr(module, name) is object:
726
+ return '<a href="%s.html#%s">%s</a>' % (
727
+ module.__name__, name, classname(object, modname))
728
+ return classname(object, modname)
729
+
730
+ def parentlink(self, object, modname):
731
+ """Make a link for the enclosing class or module."""
732
+ link = None
733
+ name, module = object.__name__, sys.modules.get(object.__module__)
734
+ if hasattr(module, name) and getattr(module, name) is object:
735
+ if '.' in object.__qualname__:
736
+ name = object.__qualname__.rpartition('.')[0]
737
+ if object.__module__ != modname:
738
+ link = '%s.html#%s' % (module.__name__, name)
739
+ else:
740
+ link = '#%s' % name
741
+ else:
742
+ if object.__module__ != modname:
743
+ link = '%s.html' % module.__name__
744
+ if link:
745
+ return '<a href="%s">%s</a>' % (link, parentname(object, modname))
746
+ else:
747
+ return parentname(object, modname)
748
+
749
+ def modulelink(self, object):
750
+ """Make a link for a module."""
751
+ return '<a href="%s.html">%s</a>' % (object.__name__, object.__name__)
752
+
753
+ def modpkglink(self, modpkginfo):
754
+ """Make a link for a module or package to display in an index."""
755
+ name, path, ispackage, shadowed = modpkginfo
756
+ if shadowed:
757
+ return self.grey(name)
758
+ if path:
759
+ url = '%s.%s.html' % (path, name)
760
+ else:
761
+ url = '%s.html' % name
762
+ if ispackage:
763
+ text = '<strong>%s</strong>&nbsp;(package)' % name
764
+ else:
765
+ text = name
766
+ return '<a href="%s">%s</a>' % (url, text)
767
+
768
+ def filelink(self, url, path):
769
+ """Make a link to source file."""
770
+ return '<a href="file:%s">%s</a>' % (url, path)
771
+
772
+ def markup(self, text, escape=None, funcs={}, classes={}, methods={}):
773
+ """Mark up some plain text, given a context of symbols to look for.
774
+ Each context dictionary maps object names to anchor names."""
775
+ escape = escape or self.escape
776
+ results = []
777
+ here = 0
778
+ pattern = re.compile(r'\b((http|https|ftp)://\S+[\w/]|'
779
+ r'RFC[- ]?(\d+)|'
780
+ r'PEP[- ]?(\d+)|'
781
+ r'(self\.)?(\w+))')
782
+ while match := pattern.search(text, here):
783
+ start, end = match.span()
784
+ results.append(escape(text[here:start]))
785
+
786
+ all, scheme, rfc, pep, selfdot, name = match.groups()
787
+ if scheme:
788
+ url = escape(all).replace('"', '&quot;')
789
+ results.append('<a href="%s">%s</a>' % (url, url))
790
+ elif rfc:
791
+ url = 'https://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
792
+ results.append('<a href="%s">%s</a>' % (url, escape(all)))
793
+ elif pep:
794
+ url = 'https://peps.python.org/pep-%04d/' % int(pep)
795
+ results.append('<a href="%s">%s</a>' % (url, escape(all)))
796
+ elif selfdot:
797
+ # Create a link for methods like 'self.method(...)'
798
+ # and use <strong> for attributes like 'self.attr'
799
+ if text[end:end+1] == '(':
800
+ results.append('self.' + self.namelink(name, methods))
801
+ else:
802
+ results.append('self.<strong>%s</strong>' % name)
803
+ elif text[end:end+1] == '(':
804
+ results.append(self.namelink(name, methods, funcs, classes))
805
+ else:
806
+ results.append(self.namelink(name, classes))
807
+ here = end
808
+ results.append(escape(text[here:]))
809
+ return ''.join(results)
810
+
811
+ # ---------------------------------------------- type-specific routines
812
+
813
+ def formattree(self, tree, modname, parent=None):
814
+ """Produce HTML for a class tree as given by inspect.getclasstree()."""
815
+ result = ''
816
+ for entry in tree:
817
+ if isinstance(entry, tuple):
818
+ c, bases = entry
819
+ result = result + '<dt class="heading-text">'
820
+ result = result + self.classlink(c, modname)
821
+ if bases and bases != (parent,):
822
+ parents = []
823
+ for base in bases:
824
+ parents.append(self.classlink(base, modname))
825
+ result = result + '(' + ', '.join(parents) + ')'
826
+ result = result + '\n</dt>'
827
+ elif isinstance(entry, list):
828
+ result = result + '<dd>\n%s</dd>\n' % self.formattree(
829
+ entry, modname, c)
830
+ return '<dl>\n%s</dl>\n' % result
831
+
832
+ def docmodule(self, object, name=None, mod=None, *ignored):
833
+ """Produce HTML documentation for a module object."""
834
+ name = object.__name__ # ignore the passed-in name
835
+ try:
836
+ all = object.__all__
837
+ except AttributeError:
838
+ all = None
839
+ parts = name.split('.')
840
+ links = []
841
+ for i in range(len(parts)-1):
842
+ links.append(
843
+ '<a href="%s.html" class="white">%s</a>' %
844
+ ('.'.join(parts[:i+1]), parts[i]))
845
+ linkedname = '.'.join(links + parts[-1:])
846
+ head = '<strong class="title">%s</strong>' % linkedname
847
+ try:
848
+ path = inspect.getabsfile(object)
849
+ url = urllib.parse.quote(path)
850
+ filelink = self.filelink(url, path)
851
+ except TypeError:
852
+ filelink = '(built-in)'
853
+ info = []
854
+ if hasattr(object, '__version__'):
855
+ version = str(object.__version__)
856
+ if version[:11] == '$' + 'Revision: ' and version[-1:] == '$':
857
+ version = version[11:-1].strip()
858
+ info.append('version %s' % self.escape(version))
859
+ if hasattr(object, '__date__'):
860
+ info.append(self.escape(str(object.__date__)))
861
+ if info:
862
+ head = head + ' (%s)' % ', '.join(info)
863
+ docloc = self.getdocloc(object)
864
+ if docloc is not None:
865
+ docloc = '<br><a href="%(docloc)s">Module Reference</a>' % locals()
866
+ else:
867
+ docloc = ''
868
+ result = self.heading(head, '<a href=".">index</a><br>' + filelink + docloc)
869
+
870
+ modules = inspect.getmembers(object, inspect.ismodule)
871
+
872
+ classes, cdict = [], {}
873
+ for key, value in inspect.getmembers(object, inspect.isclass):
874
+ # if __all__ exists, believe it. Otherwise use old heuristic.
875
+ if (all is not None or
876
+ (inspect.getmodule(value) or object) is object):
877
+ if visiblename(key, all, object):
878
+ classes.append((key, value))
879
+ cdict[key] = cdict[value] = '#' + key
880
+ for key, value in classes:
881
+ for base in value.__bases__:
882
+ key, modname = base.__name__, base.__module__
883
+ module = sys.modules.get(modname)
884
+ if modname != name and module and hasattr(module, key):
885
+ if getattr(module, key) is base:
886
+ if not key in cdict:
887
+ cdict[key] = cdict[base] = modname + '.html#' + key
888
+ funcs, fdict = [], {}
889
+ for key, value in inspect.getmembers(object, inspect.isroutine):
890
+ # if __all__ exists, believe it. Otherwise use a heuristic.
891
+ if (all is not None
892
+ or inspect.isbuiltin(value)
893
+ or (inspect.getmodule(value) or object) is object):
894
+ if visiblename(key, all, object):
895
+ funcs.append((key, value))
896
+ fdict[key] = '#-' + key
897
+ if inspect.isfunction(value): fdict[value] = fdict[key]
898
+ data = []
899
+ for key, value in inspect.getmembers(object, isdata):
900
+ if visiblename(key, all, object):
901
+ data.append((key, value))
902
+
903
+ doc = self.markup(getdoc(object), self.preformat, fdict, cdict)
904
+ doc = doc and '<span class="code">%s</span>' % doc
905
+ result = result + '<p>%s</p>\n' % doc
906
+
907
+ if hasattr(object, '__path__'):
908
+ modpkgs = []
909
+ for importer, modname, ispkg in pkgutil.iter_modules(object.__path__):
910
+ modpkgs.append((modname, name, ispkg, 0))
911
+ modpkgs.sort()
912
+ contents = self.multicolumn(modpkgs, self.modpkglink)
913
+ result = result + self.bigsection(
914
+ 'Package Contents', 'pkg-content', contents)
915
+ elif modules:
916
+ contents = self.multicolumn(
917
+ modules, lambda t: self.modulelink(t[1]))
918
+ result = result + self.bigsection(
919
+ 'Modules', 'pkg-content', contents)
920
+
921
+ if classes:
922
+ classlist = [value for (key, value) in classes]
923
+ contents = [
924
+ self.formattree(inspect.getclasstree(classlist, 1), name)]
925
+ for key, value in classes:
926
+ contents.append(self.document(value, key, name, fdict, cdict))
927
+ result = result + self.bigsection(
928
+ 'Classes', 'index', ' '.join(contents))
929
+ if funcs:
930
+ contents = []
931
+ for key, value in funcs:
932
+ contents.append(self.document(value, key, name, fdict, cdict))
933
+ result = result + self.bigsection(
934
+ 'Functions', 'functions', ' '.join(contents))
935
+ if data:
936
+ contents = []
937
+ for key, value in data:
938
+ contents.append(self.document(value, key))
939
+ result = result + self.bigsection(
940
+ 'Data', 'data', '<br>\n'.join(contents))
941
+ if hasattr(object, '__author__'):
942
+ contents = self.markup(str(object.__author__), self.preformat)
943
+ result = result + self.bigsection('Author', 'author', contents)
944
+ if hasattr(object, '__credits__'):
945
+ contents = self.markup(str(object.__credits__), self.preformat)
946
+ result = result + self.bigsection('Credits', 'credits', contents)
947
+
948
+ return result
949
+
950
+ def docclass(self, object, name=None, mod=None, funcs={}, classes={},
951
+ *ignored):
952
+ """Produce HTML documentation for a class object."""
953
+ realname = object.__name__
954
+ name = name or realname
955
+ bases = object.__bases__
956
+
957
+ contents = []
958
+ push = contents.append
959
+
960
+ # Cute little class to pump out a horizontal rule between sections.
961
+ class HorizontalRule:
962
+ def __init__(self):
963
+ self.needone = 0
964
+ def maybe(self):
965
+ if self.needone:
966
+ push('<hr>\n')
967
+ self.needone = 1
968
+ hr = HorizontalRule()
969
+
970
+ # List the mro, if non-trivial.
971
+ mro = deque(inspect.getmro(object))
972
+ if len(mro) > 2:
973
+ hr.maybe()
974
+ push('<dl><dt>Method resolution order:</dt>\n')
975
+ for base in mro:
976
+ push('<dd>%s</dd>\n' % self.classlink(base,
977
+ object.__module__))
978
+ push('</dl>\n')
979
+
980
+ def spill(msg, attrs, predicate):
981
+ ok, attrs = _split_list(attrs, predicate)
982
+ if ok:
983
+ hr.maybe()
984
+ push(msg)
985
+ for name, kind, homecls, value in ok:
986
+ try:
987
+ value = getattr(object, name)
988
+ except Exception:
989
+ # Some descriptors may meet a failure in their __get__.
990
+ # (bug #1785)
991
+ push(self.docdata(value, name, mod))
992
+ else:
993
+ push(self.document(value, name, mod,
994
+ funcs, classes, mdict, object, homecls))
995
+ push('\n')
996
+ return attrs
997
+
998
+ def spilldescriptors(msg, attrs, predicate):
999
+ ok, attrs = _split_list(attrs, predicate)
1000
+ if ok:
1001
+ hr.maybe()
1002
+ push(msg)
1003
+ for name, kind, homecls, value in ok:
1004
+ push(self.docdata(value, name, mod))
1005
+ return attrs
1006
+
1007
+ def spilldata(msg, attrs, predicate):
1008
+ ok, attrs = _split_list(attrs, predicate)
1009
+ if ok:
1010
+ hr.maybe()
1011
+ push(msg)
1012
+ for name, kind, homecls, value in ok:
1013
+ base = self.docother(getattr(object, name), name, mod)
1014
+ doc = getdoc(value)
1015
+ if not doc:
1016
+ push('<dl><dt>%s</dl>\n' % base)
1017
+ else:
1018
+ doc = self.markup(getdoc(value), self.preformat,
1019
+ funcs, classes, mdict)
1020
+ doc = '<dd><span class="code">%s</span>' % doc
1021
+ push('<dl><dt>%s%s</dl>\n' % (base, doc))
1022
+ push('\n')
1023
+ return attrs
1024
+
1025
+ attrs = [(name, kind, cls, value)
1026
+ for name, kind, cls, value in classify_class_attrs(object)
1027
+ if visiblename(name, obj=object)]
1028
+
1029
+ mdict = {}
1030
+ for key, kind, homecls, value in attrs:
1031
+ mdict[key] = anchor = '#' + name + '-' + key
1032
+ try:
1033
+ value = getattr(object, name)
1034
+ except Exception:
1035
+ # Some descriptors may meet a failure in their __get__.
1036
+ # (bug #1785)
1037
+ pass
1038
+ try:
1039
+ # The value may not be hashable (e.g., a data attr with
1040
+ # a dict or list value).
1041
+ mdict[value] = anchor
1042
+ except TypeError:
1043
+ pass
1044
+
1045
+ while attrs:
1046
+ if mro:
1047
+ thisclass = mro.popleft()
1048
+ else:
1049
+ thisclass = attrs[0][2]
1050
+ attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)
1051
+
1052
+ if object is not builtins.object and thisclass is builtins.object:
1053
+ attrs = inherited
1054
+ continue
1055
+ elif thisclass is object:
1056
+ tag = 'defined here'
1057
+ else:
1058
+ tag = 'inherited from %s' % self.classlink(thisclass,
1059
+ object.__module__)
1060
+ tag += ':<br>\n'
1061
+
1062
+ sort_attributes(attrs, object)
1063
+
1064
+ # Pump out the attrs, segregated by kind.
1065
+ attrs = spill('Methods %s' % tag, attrs,
1066
+ lambda t: t[1] == 'method')
1067
+ attrs = spill('Class methods %s' % tag, attrs,
1068
+ lambda t: t[1] == 'class method')
1069
+ attrs = spill('Static methods %s' % tag, attrs,
1070
+ lambda t: t[1] == 'static method')
1071
+ attrs = spilldescriptors("Readonly properties %s" % tag, attrs,
1072
+ lambda t: t[1] == 'readonly property')
1073
+ attrs = spilldescriptors('Data descriptors %s' % tag, attrs,
1074
+ lambda t: t[1] == 'data descriptor')
1075
+ attrs = spilldata('Data and other attributes %s' % tag, attrs,
1076
+ lambda t: t[1] == 'data')
1077
+ assert attrs == []
1078
+ attrs = inherited
1079
+
1080
+ contents = ''.join(contents)
1081
+
1082
+ if name == realname:
1083
+ title = '<a name="%s">class <strong>%s</strong></a>' % (
1084
+ name, realname)
1085
+ else:
1086
+ title = '<strong>%s</strong> = <a name="%s">class %s</a>' % (
1087
+ name, name, realname)
1088
+ if bases:
1089
+ parents = []
1090
+ for base in bases:
1091
+ parents.append(self.classlink(base, object.__module__))
1092
+ title = title + '(%s)' % ', '.join(parents)
1093
+
1094
+ decl = ''
1095
+ argspec = _getargspec(object)
1096
+ if argspec and argspec != '()':
1097
+ decl = name + self.escape(argspec) + '\n\n'
1098
+
1099
+ doc = getdoc(object)
1100
+ if decl:
1101
+ doc = decl + (doc or '')
1102
+ doc = self.markup(doc, self.preformat, funcs, classes, mdict)
1103
+ doc = doc and '<span class="code">%s<br>&nbsp;</span>' % doc
1104
+
1105
+ return self.section(title, 'title', contents, 3, doc)
1106
+
1107
+ def formatvalue(self, object):
1108
+ """Format an argument default value as text."""
1109
+ return self.grey('=' + self.repr(object))
1110
+
1111
+ def docroutine(self, object, name=None, mod=None,
1112
+ funcs={}, classes={}, methods={}, cl=None, homecls=None):
1113
+ """Produce HTML documentation for a function or method object."""
1114
+ realname = object.__name__
1115
+ name = name or realname
1116
+ if homecls is None:
1117
+ homecls = cl
1118
+ anchor = ('' if cl is None else cl.__name__) + '-' + name
1119
+ note = ''
1120
+ skipdocs = False
1121
+ imfunc = None
1122
+ if _is_bound_method(object):
1123
+ imself = object.__self__
1124
+ if imself is cl:
1125
+ imfunc = getattr(object, '__func__', None)
1126
+ elif inspect.isclass(imself):
1127
+ note = ' class method of %s' % self.classlink(imself, mod)
1128
+ else:
1129
+ note = ' method of %s instance' % self.classlink(
1130
+ imself.__class__, mod)
1131
+ elif (inspect.ismethoddescriptor(object) or
1132
+ inspect.ismethodwrapper(object)):
1133
+ try:
1134
+ objclass = object.__objclass__
1135
+ except AttributeError:
1136
+ pass
1137
+ else:
1138
+ if cl is None:
1139
+ note = ' unbound %s method' % self.classlink(objclass, mod)
1140
+ elif objclass is not homecls:
1141
+ note = ' from ' + self.classlink(objclass, mod)
1142
+ else:
1143
+ imfunc = object
1144
+ if inspect.isfunction(imfunc) and homecls is not None and (
1145
+ imfunc.__module__ != homecls.__module__ or
1146
+ imfunc.__qualname__ != homecls.__qualname__ + '.' + realname):
1147
+ pname = self.parentlink(imfunc, mod)
1148
+ if pname:
1149
+ note = ' from %s' % pname
1150
+
1151
+ if (inspect.iscoroutinefunction(object) or
1152
+ inspect.isasyncgenfunction(object)):
1153
+ asyncqualifier = 'async '
1154
+ else:
1155
+ asyncqualifier = ''
1156
+
1157
+ if name == realname:
1158
+ title = '<a name="%s"><strong>%s</strong></a>' % (anchor, realname)
1159
+ else:
1160
+ if (cl is not None and
1161
+ inspect.getattr_static(cl, realname, []) is object):
1162
+ reallink = '<a href="#%s">%s</a>' % (
1163
+ cl.__name__ + '-' + realname, realname)
1164
+ skipdocs = True
1165
+ if note.startswith(' from '):
1166
+ note = ''
1167
+ else:
1168
+ reallink = realname
1169
+ title = '<a name="%s"><strong>%s</strong></a> = %s' % (
1170
+ anchor, name, reallink)
1171
+ argspec = None
1172
+ if inspect.isroutine(object):
1173
+ argspec = _getargspec(object)
1174
+ if argspec and realname == '<lambda>':
1175
+ title = '<strong>%s</strong> <em>lambda</em> ' % name
1176
+ # XXX lambda's won't usually have func_annotations['return']
1177
+ # since the syntax doesn't support but it is possible.
1178
+ # So removing parentheses isn't truly safe.
1179
+ if not object.__annotations__:
1180
+ argspec = argspec[1:-1] # remove parentheses
1181
+ if not argspec:
1182
+ argspec = '(...)'
1183
+
1184
+ decl = asyncqualifier + title + self.escape(argspec) + (note and
1185
+ self.grey('<span class="heading-text">%s</span>' % note))
1186
+
1187
+ if skipdocs:
1188
+ return '<dl><dt>%s</dt></dl>\n' % decl
1189
+ else:
1190
+ doc = self.markup(
1191
+ getdoc(object), self.preformat, funcs, classes, methods)
1192
+ doc = doc and '<dd><span class="code">%s</span></dd>' % doc
1193
+ return '<dl><dt>%s</dt>%s</dl>\n' % (decl, doc)
1194
+
1195
+ def docdata(self, object, name=None, mod=None, cl=None, *ignored):
1196
+ """Produce html documentation for a data descriptor."""
1197
+ results = []
1198
+ push = results.append
1199
+
1200
+ if name:
1201
+ push('<dl><dt><strong>%s</strong></dt>\n' % name)
1202
+ doc = self.markup(getdoc(object), self.preformat)
1203
+ if doc:
1204
+ push('<dd><span class="code">%s</span></dd>\n' % doc)
1205
+ push('</dl>\n')
1206
+
1207
+ return ''.join(results)
1208
+
1209
+ docproperty = docdata
1210
+
1211
+ def docother(self, object, name=None, mod=None, *ignored):
1212
+ """Produce HTML documentation for a data object."""
1213
+ lhs = name and '<strong>%s</strong> = ' % name or ''
1214
+ return lhs + self.repr(object)
1215
+
1216
+ def index(self, dir, shadowed=None):
1217
+ """Generate an HTML index for a directory of modules."""
1218
+ modpkgs = []
1219
+ if shadowed is None: shadowed = {}
1220
+ for importer, name, ispkg in pkgutil.iter_modules([dir]):
1221
+ if any((0xD800 <= ord(ch) <= 0xDFFF) for ch in name):
1222
+ # ignore a module if its name contains a surrogate character
1223
+ continue
1224
+ modpkgs.append((name, '', ispkg, name in shadowed))
1225
+ shadowed[name] = 1
1226
+
1227
+ modpkgs.sort()
1228
+ contents = self.multicolumn(modpkgs, self.modpkglink)
1229
+ return self.bigsection(dir, 'index', contents)
1230
+
1231
+ # -------------------------------------------- text documentation generator
1232
+
1233
+ class TextRepr(Repr):
1234
+ """Class for safely making a text representation of a Python object."""
1235
+ def __init__(self):
1236
+ Repr.__init__(self)
1237
+ self.maxlist = self.maxtuple = 20
1238
+ self.maxdict = 10
1239
+ self.maxstring = self.maxother = 100
1240
+
1241
+ def repr1(self, x, level):
1242
+ if hasattr(type(x), '__name__'):
1243
+ methodname = 'repr_' + '_'.join(type(x).__name__.split())
1244
+ if hasattr(self, methodname):
1245
+ return getattr(self, methodname)(x, level)
1246
+ return cram(stripid(repr(x)), self.maxother)
1247
+
1248
+ def repr_string(self, x, level):
1249
+ test = cram(x, self.maxstring)
1250
+ testrepr = repr(test)
1251
+ if '\\' in test and '\\' not in replace(testrepr, r'\\', ''):
1252
+ # Backslashes are only literal in the string and are never
1253
+ # needed to make any special characters, so show a raw string.
1254
+ return 'r' + testrepr[0] + test + testrepr[0]
1255
+ return testrepr
1256
+
1257
+ repr_str = repr_string
1258
+
1259
+ def repr_instance(self, x, level):
1260
+ try:
1261
+ return cram(stripid(repr(x)), self.maxstring)
1262
+ except:
1263
+ return '<%s instance>' % x.__class__.__name__
1264
+
1265
+ class TextDoc(Doc):
1266
+ """Formatter class for text documentation."""
1267
+
1268
+ # ------------------------------------------- text formatting utilities
1269
+
1270
+ _repr_instance = TextRepr()
1271
+ repr = _repr_instance.repr
1272
+
1273
+ def bold(self, text):
1274
+ """Format a string in bold by overstriking."""
1275
+ return ''.join(ch + '\b' + ch for ch in text)
1276
+
1277
+ def indent(self, text, prefix=' '):
1278
+ """Indent text by prepending a given prefix to each line."""
1279
+ if not text: return ''
1280
+ lines = [(prefix + line).rstrip() for line in text.split('\n')]
1281
+ return '\n'.join(lines)
1282
+
1283
+ def section(self, title, contents):
1284
+ """Format a section with a given heading."""
1285
+ clean_contents = self.indent(contents).rstrip()
1286
+ return self.bold(title) + '\n' + clean_contents + '\n\n'
1287
+
1288
+ # ---------------------------------------------- type-specific routines
1289
+
1290
+ def formattree(self, tree, modname, parent=None, prefix=''):
1291
+ """Render in text a class tree as returned by inspect.getclasstree()."""
1292
+ result = ''
1293
+ for entry in tree:
1294
+ if isinstance(entry, tuple):
1295
+ c, bases = entry
1296
+ result = result + prefix + classname(c, modname)
1297
+ if bases and bases != (parent,):
1298
+ parents = (classname(c, modname) for c in bases)
1299
+ result = result + '(%s)' % ', '.join(parents)
1300
+ result = result + '\n'
1301
+ elif isinstance(entry, list):
1302
+ result = result + self.formattree(
1303
+ entry, modname, c, prefix + ' ')
1304
+ return result
1305
+
1306
+ def docmodule(self, object, name=None, mod=None, *ignored):
1307
+ """Produce text documentation for a given module object."""
1308
+ name = object.__name__ # ignore the passed-in name
1309
+ synop, desc = splitdoc(getdoc(object))
1310
+ result = self.section('NAME', name + (synop and ' - ' + synop))
1311
+ all = getattr(object, '__all__', None)
1312
+ docloc = self.getdocloc(object)
1313
+ if docloc is not None:
1314
+ result = result + self.section('MODULE REFERENCE', docloc + """
1315
+
1316
+ The following documentation is automatically generated from the Python
1317
+ source files. It may be incomplete, incorrect or include features that
1318
+ are considered implementation detail and may vary between Python
1319
+ implementations. When in doubt, consult the module reference at the
1320
+ location listed above.
1321
+ """)
1322
+
1323
+ if desc:
1324
+ result = result + self.section('DESCRIPTION', desc)
1325
+
1326
+ classes = []
1327
+ for key, value in inspect.getmembers(object, inspect.isclass):
1328
+ # if __all__ exists, believe it. Otherwise use old heuristic.
1329
+ if (all is not None
1330
+ or (inspect.getmodule(value) or object) is object):
1331
+ if visiblename(key, all, object):
1332
+ classes.append((key, value))
1333
+ funcs = []
1334
+ for key, value in inspect.getmembers(object, inspect.isroutine):
1335
+ # if __all__ exists, believe it. Otherwise use a heuristic.
1336
+ if (all is not None
1337
+ or inspect.isbuiltin(value)
1338
+ or (inspect.getmodule(value) or object) is object):
1339
+ if visiblename(key, all, object):
1340
+ funcs.append((key, value))
1341
+ data = []
1342
+ for key, value in inspect.getmembers(object, isdata):
1343
+ if visiblename(key, all, object):
1344
+ data.append((key, value))
1345
+
1346
+ modpkgs = []
1347
+ modpkgs_names = set()
1348
+ if hasattr(object, '__path__'):
1349
+ for importer, modname, ispkg in pkgutil.iter_modules(object.__path__):
1350
+ modpkgs_names.add(modname)
1351
+ if ispkg:
1352
+ modpkgs.append(modname + ' (package)')
1353
+ else:
1354
+ modpkgs.append(modname)
1355
+
1356
+ modpkgs.sort()
1357
+ result = result + self.section(
1358
+ 'PACKAGE CONTENTS', '\n'.join(modpkgs))
1359
+
1360
+ # Detect submodules as sometimes created by C extensions
1361
+ submodules = []
1362
+ for key, value in inspect.getmembers(object, inspect.ismodule):
1363
+ if value.__name__.startswith(name + '.') and key not in modpkgs_names:
1364
+ submodules.append(key)
1365
+ if submodules:
1366
+ submodules.sort()
1367
+ result = result + self.section(
1368
+ 'SUBMODULES', '\n'.join(submodules))
1369
+
1370
+ if classes:
1371
+ classlist = [value for key, value in classes]
1372
+ contents = [self.formattree(
1373
+ inspect.getclasstree(classlist, 1), name)]
1374
+ for key, value in classes:
1375
+ contents.append(self.document(value, key, name))
1376
+ result = result + self.section('CLASSES', '\n'.join(contents))
1377
+
1378
+ if funcs:
1379
+ contents = []
1380
+ for key, value in funcs:
1381
+ contents.append(self.document(value, key, name))
1382
+ result = result + self.section('FUNCTIONS', '\n'.join(contents))
1383
+
1384
+ if data:
1385
+ contents = []
1386
+ for key, value in data:
1387
+ contents.append(self.docother(value, key, name, maxlen=70))
1388
+ result = result + self.section('DATA', '\n'.join(contents))
1389
+
1390
+ if hasattr(object, '__version__'):
1391
+ version = str(object.__version__)
1392
+ if version[:11] == '$' + 'Revision: ' and version[-1:] == '$':
1393
+ version = version[11:-1].strip()
1394
+ result = result + self.section('VERSION', version)
1395
+ if hasattr(object, '__date__'):
1396
+ result = result + self.section('DATE', str(object.__date__))
1397
+ if hasattr(object, '__author__'):
1398
+ result = result + self.section('AUTHOR', str(object.__author__))
1399
+ if hasattr(object, '__credits__'):
1400
+ result = result + self.section('CREDITS', str(object.__credits__))
1401
+ try:
1402
+ file = inspect.getabsfile(object)
1403
+ except TypeError:
1404
+ file = '(built-in)'
1405
+ result = result + self.section('FILE', file)
1406
+ return result
1407
+
1408
+ def docclass(self, object, name=None, mod=None, *ignored):
1409
+ """Produce text documentation for a given class object."""
1410
+ realname = object.__name__
1411
+ name = name or realname
1412
+ bases = object.__bases__
1413
+
1414
+ def makename(c, m=object.__module__):
1415
+ return classname(c, m)
1416
+
1417
+ if name == realname:
1418
+ title = 'class ' + self.bold(realname)
1419
+ else:
1420
+ title = self.bold(name) + ' = class ' + realname
1421
+ if bases:
1422
+ parents = map(makename, bases)
1423
+ title = title + '(%s)' % ', '.join(parents)
1424
+
1425
+ contents = []
1426
+ push = contents.append
1427
+
1428
+ argspec = _getargspec(object)
1429
+ if argspec and argspec != '()':
1430
+ push(name + argspec + '\n')
1431
+
1432
+ doc = getdoc(object)
1433
+ if doc:
1434
+ push(doc + '\n')
1435
+
1436
+ # List the mro, if non-trivial.
1437
+ mro = deque(inspect.getmro(object))
1438
+ if len(mro) > 2:
1439
+ push("Method resolution order:")
1440
+ for base in mro:
1441
+ push(' ' + makename(base))
1442
+ push('')
1443
+
1444
+ # List the built-in subclasses, if any:
1445
+ subclasses = sorted(
1446
+ (str(cls.__name__) for cls in type.__subclasses__(object)
1447
+ if not cls.__name__.startswith("_") and cls.__module__ == "builtins"),
1448
+ key=str.lower
1449
+ )
1450
+ no_of_subclasses = len(subclasses)
1451
+ MAX_SUBCLASSES_TO_DISPLAY = 4
1452
+ if subclasses:
1453
+ push("Built-in subclasses:")
1454
+ for subclassname in subclasses[:MAX_SUBCLASSES_TO_DISPLAY]:
1455
+ push(' ' + subclassname)
1456
+ if no_of_subclasses > MAX_SUBCLASSES_TO_DISPLAY:
1457
+ push(' ... and ' +
1458
+ str(no_of_subclasses - MAX_SUBCLASSES_TO_DISPLAY) +
1459
+ ' other subclasses')
1460
+ push('')
1461
+
1462
+ # Cute little class to pump out a horizontal rule between sections.
1463
+ class HorizontalRule:
1464
+ def __init__(self):
1465
+ self.needone = 0
1466
+ def maybe(self):
1467
+ if self.needone:
1468
+ push('-' * 70)
1469
+ self.needone = 1
1470
+ hr = HorizontalRule()
1471
+
1472
+ def spill(msg, attrs, predicate):
1473
+ ok, attrs = _split_list(attrs, predicate)
1474
+ if ok:
1475
+ hr.maybe()
1476
+ push(msg)
1477
+ for name, kind, homecls, value in ok:
1478
+ try:
1479
+ value = getattr(object, name)
1480
+ except Exception:
1481
+ # Some descriptors may meet a failure in their __get__.
1482
+ # (bug #1785)
1483
+ push(self.docdata(value, name, mod))
1484
+ else:
1485
+ push(self.document(value,
1486
+ name, mod, object, homecls))
1487
+ return attrs
1488
+
1489
+ def spilldescriptors(msg, attrs, predicate):
1490
+ ok, attrs = _split_list(attrs, predicate)
1491
+ if ok:
1492
+ hr.maybe()
1493
+ push(msg)
1494
+ for name, kind, homecls, value in ok:
1495
+ push(self.docdata(value, name, mod))
1496
+ return attrs
1497
+
1498
+ def spilldata(msg, attrs, predicate):
1499
+ ok, attrs = _split_list(attrs, predicate)
1500
+ if ok:
1501
+ hr.maybe()
1502
+ push(msg)
1503
+ for name, kind, homecls, value in ok:
1504
+ doc = getdoc(value)
1505
+ try:
1506
+ obj = getattr(object, name)
1507
+ except AttributeError:
1508
+ obj = homecls.__dict__[name]
1509
+ push(self.docother(obj, name, mod, maxlen=70, doc=doc) +
1510
+ '\n')
1511
+ return attrs
1512
+
1513
+ attrs = [(name, kind, cls, value)
1514
+ for name, kind, cls, value in classify_class_attrs(object)
1515
+ if visiblename(name, obj=object)]
1516
+
1517
+ while attrs:
1518
+ if mro:
1519
+ thisclass = mro.popleft()
1520
+ else:
1521
+ thisclass = attrs[0][2]
1522
+ attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)
1523
+
1524
+ if object is not builtins.object and thisclass is builtins.object:
1525
+ attrs = inherited
1526
+ continue
1527
+ elif thisclass is object:
1528
+ tag = "defined here"
1529
+ else:
1530
+ tag = "inherited from %s" % classname(thisclass,
1531
+ object.__module__)
1532
+
1533
+ sort_attributes(attrs, object)
1534
+
1535
+ # Pump out the attrs, segregated by kind.
1536
+ attrs = spill("Methods %s:\n" % tag, attrs,
1537
+ lambda t: t[1] == 'method')
1538
+ attrs = spill("Class methods %s:\n" % tag, attrs,
1539
+ lambda t: t[1] == 'class method')
1540
+ attrs = spill("Static methods %s:\n" % tag, attrs,
1541
+ lambda t: t[1] == 'static method')
1542
+ attrs = spilldescriptors("Readonly properties %s:\n" % tag, attrs,
1543
+ lambda t: t[1] == 'readonly property')
1544
+ attrs = spilldescriptors("Data descriptors %s:\n" % tag, attrs,
1545
+ lambda t: t[1] == 'data descriptor')
1546
+ attrs = spilldata("Data and other attributes %s:\n" % tag, attrs,
1547
+ lambda t: t[1] == 'data')
1548
+
1549
+ assert attrs == []
1550
+ attrs = inherited
1551
+
1552
+ contents = '\n'.join(contents)
1553
+ if not contents:
1554
+ return title + '\n'
1555
+ return title + '\n' + self.indent(contents.rstrip(), ' | ') + '\n'
1556
+
1557
+ def formatvalue(self, object):
1558
+ """Format an argument default value as text."""
1559
+ return '=' + self.repr(object)
1560
+
1561
+ def docroutine(self, object, name=None, mod=None, cl=None, homecls=None):
1562
+ """Produce text documentation for a function or method object."""
1563
+ realname = object.__name__
1564
+ name = name or realname
1565
+ if homecls is None:
1566
+ homecls = cl
1567
+ note = ''
1568
+ skipdocs = False
1569
+ imfunc = None
1570
+ if _is_bound_method(object):
1571
+ imself = object.__self__
1572
+ if imself is cl:
1573
+ imfunc = getattr(object, '__func__', None)
1574
+ elif inspect.isclass(imself):
1575
+ note = ' class method of %s' % classname(imself, mod)
1576
+ else:
1577
+ note = ' method of %s instance' % classname(
1578
+ imself.__class__, mod)
1579
+ elif (inspect.ismethoddescriptor(object) or
1580
+ inspect.ismethodwrapper(object)):
1581
+ try:
1582
+ objclass = object.__objclass__
1583
+ except AttributeError:
1584
+ pass
1585
+ else:
1586
+ if cl is None:
1587
+ note = ' unbound %s method' % classname(objclass, mod)
1588
+ elif objclass is not homecls:
1589
+ note = ' from ' + classname(objclass, mod)
1590
+ else:
1591
+ imfunc = object
1592
+ if inspect.isfunction(imfunc) and homecls is not None and (
1593
+ imfunc.__module__ != homecls.__module__ or
1594
+ imfunc.__qualname__ != homecls.__qualname__ + '.' + realname):
1595
+ pname = parentname(imfunc, mod)
1596
+ if pname:
1597
+ note = ' from %s' % pname
1598
+
1599
+ if (inspect.iscoroutinefunction(object) or
1600
+ inspect.isasyncgenfunction(object)):
1601
+ asyncqualifier = 'async '
1602
+ else:
1603
+ asyncqualifier = ''
1604
+
1605
+ if name == realname:
1606
+ title = self.bold(realname)
1607
+ else:
1608
+ if (cl is not None and
1609
+ inspect.getattr_static(cl, realname, []) is object):
1610
+ skipdocs = True
1611
+ if note.startswith(' from '):
1612
+ note = ''
1613
+ title = self.bold(name) + ' = ' + realname
1614
+ argspec = None
1615
+
1616
+ if inspect.isroutine(object):
1617
+ argspec = _getargspec(object)
1618
+ if argspec and realname == '<lambda>':
1619
+ title = self.bold(name) + ' lambda '
1620
+ # XXX lambda's won't usually have func_annotations['return']
1621
+ # since the syntax doesn't support but it is possible.
1622
+ # So removing parentheses isn't truly safe.
1623
+ if not object.__annotations__:
1624
+ argspec = argspec[1:-1]
1625
+ if not argspec:
1626
+ argspec = '(...)'
1627
+ decl = asyncqualifier + title + argspec + note
1628
+
1629
+ if skipdocs:
1630
+ return decl + '\n'
1631
+ else:
1632
+ doc = getdoc(object) or ''
1633
+ return decl + '\n' + (doc and self.indent(doc).rstrip() + '\n')
1634
+
1635
+ def docdata(self, object, name=None, mod=None, cl=None, *ignored):
1636
+ """Produce text documentation for a data descriptor."""
1637
+ results = []
1638
+ push = results.append
1639
+
1640
+ if name:
1641
+ push(self.bold(name))
1642
+ push('\n')
1643
+ doc = getdoc(object) or ''
1644
+ if doc:
1645
+ push(self.indent(doc))
1646
+ push('\n')
1647
+ return ''.join(results)
1648
+
1649
+ docproperty = docdata
1650
+
1651
+ def docother(self, object, name=None, mod=None, parent=None, *ignored,
1652
+ maxlen=None, doc=None):
1653
+ """Produce text documentation for a data object."""
1654
+ repr = self.repr(object)
1655
+ if maxlen:
1656
+ line = (name and name + ' = ' or '') + repr
1657
+ chop = maxlen - len(line)
1658
+ if chop < 0: repr = repr[:chop] + '...'
1659
+ line = (name and self.bold(name) + ' = ' or '') + repr
1660
+ if not doc:
1661
+ doc = getdoc(object)
1662
+ if doc:
1663
+ line += '\n' + self.indent(str(doc)) + '\n'
1664
+ return line
1665
+
1666
+ class _PlainTextDoc(TextDoc):
1667
+ """Subclass of TextDoc which overrides string styling"""
1668
+ def bold(self, text):
1669
+ return text
1670
+
1671
+ # --------------------------------------------------------- user interfaces
1672
+
1673
+ def pager(text, title=''):
1674
+ """The first time this is called, determine what kind of pager to use."""
1675
+ global pager
1676
+ pager = get_pager()
1677
+ pager(text, title)
1678
+
1679
+ def describe(thing):
1680
+ """Produce a short description of the given thing."""
1681
+ if inspect.ismodule(thing):
1682
+ if thing.__name__ in sys.builtin_module_names:
1683
+ return 'built-in module ' + thing.__name__
1684
+ if hasattr(thing, '__path__'):
1685
+ return 'package ' + thing.__name__
1686
+ else:
1687
+ return 'module ' + thing.__name__
1688
+ if inspect.isbuiltin(thing):
1689
+ return 'built-in function ' + thing.__name__
1690
+ if inspect.isgetsetdescriptor(thing):
1691
+ return 'getset descriptor %s.%s.%s' % (
1692
+ thing.__objclass__.__module__, thing.__objclass__.__name__,
1693
+ thing.__name__)
1694
+ if inspect.ismemberdescriptor(thing):
1695
+ return 'member descriptor %s.%s.%s' % (
1696
+ thing.__objclass__.__module__, thing.__objclass__.__name__,
1697
+ thing.__name__)
1698
+ if inspect.isclass(thing):
1699
+ return 'class ' + thing.__name__
1700
+ if inspect.isfunction(thing):
1701
+ return 'function ' + thing.__name__
1702
+ if inspect.ismethod(thing):
1703
+ return 'method ' + thing.__name__
1704
+ return type(thing).__name__
1705
+
1706
+ def locate(path, forceload=0):
1707
+ """Locate an object by name or dotted path, importing as necessary."""
1708
+ parts = [part for part in path.split('.') if part]
1709
+ module, n = None, 0
1710
+ while n < len(parts):
1711
+ nextmodule = safeimport('.'.join(parts[:n+1]), forceload)
1712
+ if nextmodule: module, n = nextmodule, n + 1
1713
+ else: break
1714
+ if module:
1715
+ object = module
1716
+ else:
1717
+ object = builtins
1718
+ for part in parts[n:]:
1719
+ try:
1720
+ object = getattr(object, part)
1721
+ except AttributeError:
1722
+ return None
1723
+ return object
1724
+
1725
+ # --------------------------------------- interactive interpreter interface
1726
+
1727
+ text = TextDoc()
1728
+ plaintext = _PlainTextDoc()
1729
+ html = HTMLDoc()
1730
+
1731
+ def resolve(thing, forceload=0):
1732
+ """Given an object or a path to an object, get the object and its name."""
1733
+ if isinstance(thing, str):
1734
+ object = locate(thing, forceload)
1735
+ if object is None:
1736
+ raise ImportError('''\
1737
+ No Python documentation found for %r.
1738
+ Use help() to get the interactive help utility.
1739
+ Use help(str) for help on the str class.''' % thing)
1740
+ return object, thing
1741
+ else:
1742
+ name = getattr(thing, '__name__', None)
1743
+ return thing, name if isinstance(name, str) else None
1744
+
1745
+ def render_doc(thing, title='Python Library Documentation: %s', forceload=0,
1746
+ renderer=None):
1747
+ """Render text documentation, given an object or a path to an object."""
1748
+ if renderer is None:
1749
+ renderer = text
1750
+ object, name = resolve(thing, forceload)
1751
+ desc = describe(object)
1752
+ module = inspect.getmodule(object)
1753
+ if name and '.' in name:
1754
+ desc += ' in ' + name[:name.rfind('.')]
1755
+ elif module and module is not object:
1756
+ desc += ' in module ' + module.__name__
1757
+
1758
+ if not (inspect.ismodule(object) or
1759
+ inspect.isclass(object) or
1760
+ inspect.isroutine(object) or
1761
+ inspect.isdatadescriptor(object) or
1762
+ _getdoc(object)):
1763
+ # If the passed object is a piece of data or an instance,
1764
+ # document its available methods instead of its value.
1765
+ if hasattr(object, '__origin__'):
1766
+ object = object.__origin__
1767
+ else:
1768
+ object = type(object)
1769
+ desc += ' object'
1770
+ return title % desc + '\n\n' + renderer.document(object, name)
1771
+
1772
+ def doc(thing, title='Python Library Documentation: %s', forceload=0,
1773
+ output=None, is_cli=False):
1774
+ """Display text documentation, given an object or a path to an object."""
1775
+ if output is None:
1776
+ try:
1777
+ if isinstance(thing, str):
1778
+ what = thing
1779
+ else:
1780
+ what = getattr(thing, '__qualname__', None)
1781
+ if not isinstance(what, str):
1782
+ what = getattr(thing, '__name__', None)
1783
+ if not isinstance(what, str):
1784
+ what = type(thing).__name__ + ' object'
1785
+ pager(render_doc(thing, title, forceload), f'Help on {what!s}')
1786
+ except ImportError as exc:
1787
+ if is_cli:
1788
+ raise
1789
+ print(exc)
1790
+ else:
1791
+ try:
1792
+ s = render_doc(thing, title, forceload, plaintext)
1793
+ except ImportError as exc:
1794
+ s = str(exc)
1795
+ output.write(s)
1796
+
1797
+ def writedoc(thing, forceload=0):
1798
+ """Write HTML documentation to a file in the current directory."""
1799
+ object, name = resolve(thing, forceload)
1800
+ page = html.page(describe(object), html.document(object, name))
1801
+ with open(name + '.html', 'w', encoding='utf-8') as file:
1802
+ file.write(page)
1803
+ print('wrote', name + '.html')
1804
+
1805
+ def writedocs(dir, pkgpath='', done=None):
1806
+ """Write out HTML documentation for all modules in a directory tree."""
1807
+ if done is None: done = {}
1808
+ for importer, modname, ispkg in pkgutil.walk_packages([dir], pkgpath):
1809
+ writedoc(modname)
1810
+ return
1811
+
1812
+ class Helper:
1813
+
1814
+ # These dictionaries map a topic name to either an alias, or a tuple
1815
+ # (label, seealso-items). The "label" is the label of the corresponding
1816
+ # section in the .rst file under Doc/ and an index into the dictionary
1817
+ # in pydoc_data/topics.py.
1818
+ #
1819
+ # CAUTION: if you change one of these dictionaries, be sure to adapt the
1820
+ # list of needed labels in Doc/tools/extensions/pyspecific.py and
1821
+ # regenerate the pydoc_data/topics.py file by running
1822
+ # make pydoc-topics
1823
+ # in Doc/ and copying the output file into the Lib/ directory.
1824
+
1825
+ keywords = {
1826
+ 'False': '',
1827
+ 'None': '',
1828
+ 'True': '',
1829
+ 'and': 'BOOLEAN',
1830
+ 'as': 'with',
1831
+ 'assert': ('assert', ''),
1832
+ 'async': ('async', ''),
1833
+ 'await': ('await', ''),
1834
+ 'break': ('break', 'while for'),
1835
+ 'class': ('class', 'CLASSES SPECIALMETHODS'),
1836
+ 'continue': ('continue', 'while for'),
1837
+ 'def': ('function', ''),
1838
+ 'del': ('del', 'BASICMETHODS'),
1839
+ 'elif': 'if',
1840
+ 'else': ('else', 'while for'),
1841
+ 'except': 'try',
1842
+ 'finally': 'try',
1843
+ 'for': ('for', 'break continue while'),
1844
+ 'from': 'import',
1845
+ 'global': ('global', 'nonlocal NAMESPACES'),
1846
+ 'if': ('if', 'TRUTHVALUE'),
1847
+ 'import': ('import', 'MODULES'),
1848
+ 'in': ('in', 'SEQUENCEMETHODS'),
1849
+ 'is': 'COMPARISON',
1850
+ 'lambda': ('lambda', 'FUNCTIONS'),
1851
+ 'nonlocal': ('nonlocal', 'global NAMESPACES'),
1852
+ 'not': 'BOOLEAN',
1853
+ 'or': 'BOOLEAN',
1854
+ 'pass': ('pass', ''),
1855
+ 'raise': ('raise', 'EXCEPTIONS'),
1856
+ 'return': ('return', 'FUNCTIONS'),
1857
+ 'try': ('try', 'EXCEPTIONS'),
1858
+ 'while': ('while', 'break continue if TRUTHVALUE'),
1859
+ 'with': ('with', 'CONTEXTMANAGERS EXCEPTIONS yield'),
1860
+ 'yield': ('yield', ''),
1861
+ }
1862
+ # Either add symbols to this dictionary or to the symbols dictionary
1863
+ # directly: Whichever is easier. They are merged later.
1864
+ _strprefixes = [p + q for p in ('b', 'f', 'r', 'u') for q in ("'", '"')]
1865
+ _symbols_inverse = {
1866
+ 'STRINGS' : ("'", "'''", '"', '"""', *_strprefixes),
1867
+ 'OPERATORS' : ('+', '-', '*', '**', '/', '//', '%', '<<', '>>', '&',
1868
+ '|', '^', '~', '<', '>', '<=', '>=', '==', '!=', '<>'),
1869
+ 'COMPARISON' : ('<', '>', '<=', '>=', '==', '!=', '<>'),
1870
+ 'UNARY' : ('-', '~'),
1871
+ 'AUGMENTEDASSIGNMENT' : ('+=', '-=', '*=', '/=', '%=', '&=', '|=',
1872
+ '^=', '<<=', '>>=', '**=', '//='),
1873
+ 'BITWISE' : ('<<', '>>', '&', '|', '^', '~'),
1874
+ 'COMPLEX' : ('j', 'J')
1875
+ }
1876
+ symbols = {
1877
+ '%': 'OPERATORS FORMATTING',
1878
+ '**': 'POWER',
1879
+ ',': 'TUPLES LISTS FUNCTIONS',
1880
+ '.': 'ATTRIBUTES FLOAT MODULES OBJECTS',
1881
+ '...': 'ELLIPSIS',
1882
+ ':': 'SLICINGS DICTIONARYLITERALS',
1883
+ '@': 'def class',
1884
+ '\\': 'STRINGS',
1885
+ ':=': 'ASSIGNMENTEXPRESSIONS',
1886
+ '_': 'PRIVATENAMES',
1887
+ '__': 'PRIVATENAMES SPECIALMETHODS',
1888
+ '`': 'BACKQUOTES',
1889
+ '(': 'TUPLES FUNCTIONS CALLS',
1890
+ ')': 'TUPLES FUNCTIONS CALLS',
1891
+ '[': 'LISTS SUBSCRIPTS SLICINGS',
1892
+ ']': 'LISTS SUBSCRIPTS SLICINGS'
1893
+ }
1894
+ for topic, symbols_ in _symbols_inverse.items():
1895
+ for symbol in symbols_:
1896
+ topics = symbols.get(symbol, topic)
1897
+ if topic not in topics:
1898
+ topics = topics + ' ' + topic
1899
+ symbols[symbol] = topics
1900
+ del topic, symbols_, symbol, topics
1901
+
1902
+ topics = {
1903
+ 'TYPES': ('types', 'STRINGS UNICODE NUMBERS SEQUENCES MAPPINGS '
1904
+ 'FUNCTIONS CLASSES MODULES FILES inspect'),
1905
+ 'STRINGS': ('strings', 'str UNICODE SEQUENCES STRINGMETHODS '
1906
+ 'FORMATTING TYPES'),
1907
+ 'STRINGMETHODS': ('string-methods', 'STRINGS FORMATTING'),
1908
+ 'FORMATTING': ('formatstrings', 'OPERATORS'),
1909
+ 'UNICODE': ('strings', 'encodings unicode SEQUENCES STRINGMETHODS '
1910
+ 'FORMATTING TYPES'),
1911
+ 'NUMBERS': ('numbers', 'INTEGER FLOAT COMPLEX TYPES'),
1912
+ 'INTEGER': ('integers', 'int range'),
1913
+ 'FLOAT': ('floating', 'float math'),
1914
+ 'COMPLEX': ('imaginary', 'complex cmath'),
1915
+ 'SEQUENCES': ('typesseq', 'STRINGMETHODS FORMATTING range LISTS'),
1916
+ 'MAPPINGS': 'DICTIONARIES',
1917
+ 'FUNCTIONS': ('typesfunctions', 'def TYPES'),
1918
+ 'METHODS': ('typesmethods', 'class def CLASSES TYPES'),
1919
+ 'CODEOBJECTS': ('bltin-code-objects', 'compile FUNCTIONS TYPES'),
1920
+ 'TYPEOBJECTS': ('bltin-type-objects', 'types TYPES'),
1921
+ 'FRAMEOBJECTS': 'TYPES',
1922
+ 'TRACEBACKS': 'TYPES',
1923
+ 'NONE': ('bltin-null-object', ''),
1924
+ 'ELLIPSIS': ('bltin-ellipsis-object', 'SLICINGS'),
1925
+ 'SPECIALATTRIBUTES': ('specialattrs', ''),
1926
+ 'CLASSES': ('types', 'class SPECIALMETHODS PRIVATENAMES'),
1927
+ 'MODULES': ('typesmodules', 'import'),
1928
+ 'PACKAGES': 'import',
1929
+ 'EXPRESSIONS': ('operator-summary', 'lambda or and not in is BOOLEAN '
1930
+ 'COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER '
1931
+ 'UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES '
1932
+ 'LISTS DICTIONARIES'),
1933
+ 'OPERATORS': 'EXPRESSIONS',
1934
+ 'PRECEDENCE': 'EXPRESSIONS',
1935
+ 'OBJECTS': ('objects', 'TYPES'),
1936
+ 'SPECIALMETHODS': ('specialnames', 'BASICMETHODS ATTRIBUTEMETHODS '
1937
+ 'CALLABLEMETHODS SEQUENCEMETHODS MAPPINGMETHODS '
1938
+ 'NUMBERMETHODS CLASSES'),
1939
+ 'BASICMETHODS': ('customization', 'hash repr str SPECIALMETHODS'),
1940
+ 'ATTRIBUTEMETHODS': ('attribute-access', 'ATTRIBUTES SPECIALMETHODS'),
1941
+ 'CALLABLEMETHODS': ('callable-types', 'CALLS SPECIALMETHODS'),
1942
+ 'SEQUENCEMETHODS': ('sequence-types', 'SEQUENCES SEQUENCEMETHODS '
1943
+ 'SPECIALMETHODS'),
1944
+ 'MAPPINGMETHODS': ('sequence-types', 'MAPPINGS SPECIALMETHODS'),
1945
+ 'NUMBERMETHODS': ('numeric-types', 'NUMBERS AUGMENTEDASSIGNMENT '
1946
+ 'SPECIALMETHODS'),
1947
+ 'EXECUTION': ('execmodel', 'NAMESPACES DYNAMICFEATURES EXCEPTIONS'),
1948
+ 'NAMESPACES': ('naming', 'global nonlocal ASSIGNMENT DELETION DYNAMICFEATURES'),
1949
+ 'DYNAMICFEATURES': ('dynamic-features', ''),
1950
+ 'SCOPING': 'NAMESPACES',
1951
+ 'FRAMES': 'NAMESPACES',
1952
+ 'EXCEPTIONS': ('exceptions', 'try except finally raise'),
1953
+ 'CONVERSIONS': ('conversions', ''),
1954
+ 'IDENTIFIERS': ('identifiers', 'keywords SPECIALIDENTIFIERS'),
1955
+ 'SPECIALIDENTIFIERS': ('id-classes', ''),
1956
+ 'PRIVATENAMES': ('atom-identifiers', ''),
1957
+ 'LITERALS': ('atom-literals', 'STRINGS NUMBERS TUPLELITERALS '
1958
+ 'LISTLITERALS DICTIONARYLITERALS'),
1959
+ 'TUPLES': 'SEQUENCES',
1960
+ 'TUPLELITERALS': ('exprlists', 'TUPLES LITERALS'),
1961
+ 'LISTS': ('typesseq-mutable', 'LISTLITERALS'),
1962
+ 'LISTLITERALS': ('lists', 'LISTS LITERALS'),
1963
+ 'DICTIONARIES': ('typesmapping', 'DICTIONARYLITERALS'),
1964
+ 'DICTIONARYLITERALS': ('dict', 'DICTIONARIES LITERALS'),
1965
+ 'ATTRIBUTES': ('attribute-references', 'getattr hasattr setattr ATTRIBUTEMETHODS'),
1966
+ 'SUBSCRIPTS': ('subscriptions', 'SEQUENCEMETHODS'),
1967
+ 'SLICINGS': ('slicings', 'SEQUENCEMETHODS'),
1968
+ 'CALLS': ('calls', 'EXPRESSIONS'),
1969
+ 'POWER': ('power', 'EXPRESSIONS'),
1970
+ 'UNARY': ('unary', 'EXPRESSIONS'),
1971
+ 'BINARY': ('binary', 'EXPRESSIONS'),
1972
+ 'SHIFTING': ('shifting', 'EXPRESSIONS'),
1973
+ 'BITWISE': ('bitwise', 'EXPRESSIONS'),
1974
+ 'COMPARISON': ('comparisons', 'EXPRESSIONS BASICMETHODS'),
1975
+ 'BOOLEAN': ('booleans', 'EXPRESSIONS TRUTHVALUE'),
1976
+ 'ASSERTION': 'assert',
1977
+ 'ASSIGNMENT': ('assignment', 'AUGMENTEDASSIGNMENT'),
1978
+ 'AUGMENTEDASSIGNMENT': ('augassign', 'NUMBERMETHODS'),
1979
+ 'ASSIGNMENTEXPRESSIONS': ('assignment-expressions', ''),
1980
+ 'DELETION': 'del',
1981
+ 'RETURNING': 'return',
1982
+ 'IMPORTING': 'import',
1983
+ 'CONDITIONAL': 'if',
1984
+ 'LOOPING': ('compound', 'for while break continue'),
1985
+ 'TRUTHVALUE': ('truth', 'if while and or not BASICMETHODS'),
1986
+ 'DEBUGGING': ('debugger', 'pdb'),
1987
+ 'CONTEXTMANAGERS': ('context-managers', 'with'),
1988
+ }
1989
+
1990
+ def __init__(self, input=None, output=None):
1991
+ self._input = input
1992
+ self._output = output
1993
+
1994
+ @property
1995
+ def input(self):
1996
+ return self._input or sys.stdin
1997
+
1998
+ @property
1999
+ def output(self):
2000
+ return self._output or sys.stdout
2001
+
2002
+ def __repr__(self):
2003
+ if inspect.stack()[1][3] == '?':
2004
+ self()
2005
+ return ''
2006
+ return '<%s.%s instance>' % (self.__class__.__module__,
2007
+ self.__class__.__qualname__)
2008
+
2009
+ _GoInteractive = object()
2010
+ def __call__(self, request=_GoInteractive):
2011
+ if request is not self._GoInteractive:
2012
+ try:
2013
+ self.help(request)
2014
+ except ImportError as err:
2015
+ self.output.write(f'{err}\n')
2016
+ else:
2017
+ self.intro()
2018
+ self.interact()
2019
+ self.output.write('''
2020
+ You are now leaving help and returning to the Python interpreter.
2021
+ If you want to ask for help on a particular object directly from the
2022
+ interpreter, you can type "help(object)". Executing "help('string')"
2023
+ has the same effect as typing a particular string at the help> prompt.
2024
+ ''')
2025
+
2026
+ def interact(self):
2027
+ self.output.write('\n')
2028
+ while True:
2029
+ try:
2030
+ request = self.getline('help> ')
2031
+ except (KeyboardInterrupt, EOFError):
2032
+ break
2033
+ request = request.strip()
2034
+ if not request:
2035
+ continue # back to the prompt
2036
+
2037
+ # Make sure significant trailing quoting marks of literals don't
2038
+ # get deleted while cleaning input
2039
+ if (len(request) > 2 and request[0] == request[-1] in ("'", '"')
2040
+ and request[0] not in request[1:-1]):
2041
+ request = request[1:-1]
2042
+ if request.lower() in ('q', 'quit', 'exit'): break
2043
+ if request == 'help':
2044
+ self.intro()
2045
+ else:
2046
+ self.help(request)
2047
+
2048
+ def getline(self, prompt):
2049
+ """Read one line, using input() when appropriate."""
2050
+ if self.input is sys.stdin:
2051
+ return input(prompt)
2052
+ else:
2053
+ self.output.write(prompt)
2054
+ self.output.flush()
2055
+ return self.input.readline()
2056
+
2057
+ def help(self, request, is_cli=False):
2058
+ if isinstance(request, str):
2059
+ request = request.strip()
2060
+ if request == 'keywords': self.listkeywords()
2061
+ elif request == 'symbols': self.listsymbols()
2062
+ elif request == 'topics': self.listtopics()
2063
+ elif request == 'modules': self.listmodules()
2064
+ elif request[:8] == 'modules ':
2065
+ self.listmodules(request.split()[1])
2066
+ elif request in self.symbols: self.showsymbol(request)
2067
+ elif request in ['True', 'False', 'None']:
2068
+ # special case these keywords since they are objects too
2069
+ doc(eval(request), 'Help on %s:', output=self._output, is_cli=is_cli)
2070
+ elif request in self.keywords: self.showtopic(request)
2071
+ elif request in self.topics: self.showtopic(request)
2072
+ elif request: doc(request, 'Help on %s:', output=self._output, is_cli=is_cli)
2073
+ else: doc(str, 'Help on %s:', output=self._output, is_cli=is_cli)
2074
+ elif isinstance(request, Helper): self()
2075
+ else: doc(request, 'Help on %s:', output=self._output, is_cli=is_cli)
2076
+ self.output.write('\n')
2077
+
2078
+ def intro(self):
2079
+ self.output.write('''\
2080
+ Welcome to Python {0}'s help utility! If this is your first time using
2081
+ Python, you should definitely check out the tutorial at
2082
+ https://docs.python.org/{0}/tutorial/.
2083
+
2084
+ Enter the name of any module, keyword, or topic to get help on writing
2085
+ Python programs and using Python modules. To get a list of available
2086
+ modules, keywords, symbols, or topics, enter "modules", "keywords",
2087
+ "symbols", or "topics".
2088
+
2089
+ Each module also comes with a one-line summary of what it does; to list
2090
+ the modules whose name or summary contain a given string such as "spam",
2091
+ enter "modules spam".
2092
+
2093
+ To quit this help utility and return to the interpreter,
2094
+ enter "q", "quit" or "exit".
2095
+ '''.format('%d.%d' % sys.version_info[:2]))
2096
+
2097
+ def list(self, items, columns=4, width=80):
2098
+ items = sorted(items)
2099
+ colw = width // columns
2100
+ rows = (len(items) + columns - 1) // columns
2101
+ for row in range(rows):
2102
+ for col in range(columns):
2103
+ i = col * rows + row
2104
+ if i < len(items):
2105
+ self.output.write(items[i])
2106
+ if col < columns - 1:
2107
+ self.output.write(' ' + ' ' * (colw - 1 - len(items[i])))
2108
+ self.output.write('\n')
2109
+
2110
+ def listkeywords(self):
2111
+ self.output.write('''
2112
+ Here is a list of the Python keywords. Enter any keyword to get more help.
2113
+
2114
+ ''')
2115
+ self.list(self.keywords.keys())
2116
+
2117
+ def listsymbols(self):
2118
+ self.output.write('''
2119
+ Here is a list of the punctuation symbols which Python assigns special meaning
2120
+ to. Enter any symbol to get more help.
2121
+
2122
+ ''')
2123
+ self.list(self.symbols.keys())
2124
+
2125
+ def listtopics(self):
2126
+ self.output.write('''
2127
+ Here is a list of available topics. Enter any topic name to get more help.
2128
+
2129
+ ''')
2130
+ self.list(self.topics.keys(), columns=3)
2131
+
2132
+ def showtopic(self, topic, more_xrefs=''):
2133
+ try:
2134
+ import pydoc_data.topics
2135
+ except ImportError:
2136
+ self.output.write('''
2137
+ Sorry, topic and keyword documentation is not available because the
2138
+ module "pydoc_data.topics" could not be found.
2139
+ ''')
2140
+ return
2141
+ target = self.topics.get(topic, self.keywords.get(topic))
2142
+ if not target:
2143
+ self.output.write('no documentation found for %s\n' % repr(topic))
2144
+ return
2145
+ if isinstance(target, str):
2146
+ return self.showtopic(target, more_xrefs)
2147
+
2148
+ label, xrefs = target
2149
+ try:
2150
+ doc = pydoc_data.topics.topics[label]
2151
+ except KeyError:
2152
+ self.output.write('no documentation found for %s\n' % repr(topic))
2153
+ return
2154
+ doc = doc.strip() + '\n'
2155
+ if more_xrefs:
2156
+ xrefs = (xrefs or '') + ' ' + more_xrefs
2157
+ if xrefs:
2158
+ import textwrap
2159
+ text = 'Related help topics: ' + ', '.join(xrefs.split()) + '\n'
2160
+ wrapped_text = textwrap.wrap(text, 72)
2161
+ doc += '\n%s\n' % '\n'.join(wrapped_text)
2162
+
2163
+ if self._output is None:
2164
+ pager(doc, f'Help on {topic!s}')
2165
+ else:
2166
+ self.output.write(doc)
2167
+
2168
+ def _gettopic(self, topic, more_xrefs=''):
2169
+ """Return unbuffered tuple of (topic, xrefs).
2170
+
2171
+ If an error occurs here, the exception is caught and displayed by
2172
+ the url handler.
2173
+
2174
+ This function duplicates the showtopic method but returns its
2175
+ result directly so it can be formatted for display in an html page.
2176
+ """
2177
+ try:
2178
+ import pydoc_data.topics
2179
+ except ImportError:
2180
+ return('''
2181
+ Sorry, topic and keyword documentation is not available because the
2182
+ module "pydoc_data.topics" could not be found.
2183
+ ''' , '')
2184
+ target = self.topics.get(topic, self.keywords.get(topic))
2185
+ if not target:
2186
+ raise ValueError('could not find topic')
2187
+ if isinstance(target, str):
2188
+ return self._gettopic(target, more_xrefs)
2189
+ label, xrefs = target
2190
+ doc = pydoc_data.topics.topics[label]
2191
+ if more_xrefs:
2192
+ xrefs = (xrefs or '') + ' ' + more_xrefs
2193
+ return doc, xrefs
2194
+
2195
+ def showsymbol(self, symbol):
2196
+ target = self.symbols[symbol]
2197
+ topic, _, xrefs = target.partition(' ')
2198
+ self.showtopic(topic, xrefs)
2199
+
2200
+ def listmodules(self, key=''):
2201
+ if key:
2202
+ self.output.write('''
2203
+ Here is a list of modules whose name or summary contains '{}'.
2204
+ If there are any, enter a module name to get more help.
2205
+
2206
+ '''.format(key))
2207
+ apropos(key)
2208
+ else:
2209
+ self.output.write('''
2210
+ Please wait a moment while I gather a list of all available modules...
2211
+
2212
+ ''')
2213
+ modules = {}
2214
+ def callback(path, modname, desc, modules=modules):
2215
+ if modname and modname[-9:] == '.__init__':
2216
+ modname = modname[:-9] + ' (package)'
2217
+ if modname.find('.') < 0:
2218
+ modules[modname] = 1
2219
+ def onerror(modname):
2220
+ callback(None, modname, None)
2221
+ ModuleScanner().run(callback, onerror=onerror)
2222
+ self.list(modules.keys())
2223
+ self.output.write('''
2224
+ Enter any module name to get more help. Or, type "modules spam" to search
2225
+ for modules whose name or summary contain the string "spam".
2226
+ ''')
2227
+
2228
+ help = Helper()
2229
+
2230
+ class ModuleScanner:
2231
+ """An interruptible scanner that searches module synopses."""
2232
+
2233
+ def run(self, callback, key=None, completer=None, onerror=None):
2234
+ if key: key = key.lower()
2235
+ self.quit = False
2236
+ seen = {}
2237
+
2238
+ for modname in sys.builtin_module_names:
2239
+ if modname != '__main__':
2240
+ seen[modname] = 1
2241
+ if key is None:
2242
+ callback(None, modname, '')
2243
+ else:
2244
+ name = __import__(modname).__doc__ or ''
2245
+ desc = name.split('\n')[0]
2246
+ name = modname + ' - ' + desc
2247
+ if name.lower().find(key) >= 0:
2248
+ callback(None, modname, desc)
2249
+
2250
+ for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror):
2251
+ if self.quit:
2252
+ break
2253
+
2254
+ if key is None:
2255
+ callback(None, modname, '')
2256
+ else:
2257
+ try:
2258
+ spec = importer.find_spec(modname)
2259
+ except SyntaxError:
2260
+ # raised by tests for bad coding cookies or BOM
2261
+ continue
2262
+ loader = spec.loader
2263
+ if hasattr(loader, 'get_source'):
2264
+ try:
2265
+ source = loader.get_source(modname)
2266
+ except Exception:
2267
+ if onerror:
2268
+ onerror(modname)
2269
+ continue
2270
+ desc = source_synopsis(io.StringIO(source)) or ''
2271
+ if hasattr(loader, 'get_filename'):
2272
+ path = loader.get_filename(modname)
2273
+ else:
2274
+ path = None
2275
+ else:
2276
+ try:
2277
+ module = importlib._bootstrap._load(spec)
2278
+ except ImportError:
2279
+ if onerror:
2280
+ onerror(modname)
2281
+ continue
2282
+ desc = module.__doc__.splitlines()[0] if module.__doc__ else ''
2283
+ path = getattr(module,'__file__',None)
2284
+ name = modname + ' - ' + desc
2285
+ if name.lower().find(key) >= 0:
2286
+ callback(path, modname, desc)
2287
+
2288
+ if completer:
2289
+ completer()
2290
+
2291
+ def apropos(key):
2292
+ """Print all the one-line module summaries that contain a substring."""
2293
+ def callback(path, modname, desc):
2294
+ if modname[-9:] == '.__init__':
2295
+ modname = modname[:-9] + ' (package)'
2296
+ print(modname, desc and '- ' + desc)
2297
+ def onerror(modname):
2298
+ pass
2299
+ with warnings.catch_warnings():
2300
+ warnings.filterwarnings('ignore') # ignore problems during import
2301
+ ModuleScanner().run(callback, key, onerror=onerror)
2302
+
2303
+ # --------------------------------------- enhanced web browser interface
2304
+
2305
+ def _start_server(urlhandler, hostname, port):
2306
+ """Start an HTTP server thread on a specific port.
2307
+
2308
+ Start an HTML/text server thread, so HTML or text documents can be
2309
+ browsed dynamically and interactively with a web browser. Example use:
2310
+
2311
+ >>> import time
2312
+ >>> import pydoc
2313
+
2314
+ Define a URL handler. To determine what the client is asking
2315
+ for, check the URL and content_type.
2316
+
2317
+ Then get or generate some text or HTML code and return it.
2318
+
2319
+ >>> def my_url_handler(url, content_type):
2320
+ ... text = 'the URL sent was: (%s, %s)' % (url, content_type)
2321
+ ... return text
2322
+
2323
+ Start server thread on port 0.
2324
+ If you use port 0, the server will pick a random port number.
2325
+ You can then use serverthread.port to get the port number.
2326
+
2327
+ >>> port = 0
2328
+ >>> serverthread = pydoc._start_server(my_url_handler, port)
2329
+
2330
+ Check that the server is really started. If it is, open browser
2331
+ and get first page. Use serverthread.url as the starting page.
2332
+
2333
+ >>> if serverthread.serving:
2334
+ ... import webbrowser
2335
+
2336
+ The next two lines are commented out so a browser doesn't open if
2337
+ doctest is run on this module.
2338
+
2339
+ #... webbrowser.open(serverthread.url)
2340
+ #True
2341
+
2342
+ Let the server do its thing. We just need to monitor its status.
2343
+ Use time.sleep so the loop doesn't hog the CPU.
2344
+
2345
+ >>> starttime = time.monotonic()
2346
+ >>> timeout = 1 #seconds
2347
+
2348
+ This is a short timeout for testing purposes.
2349
+
2350
+ >>> while serverthread.serving:
2351
+ ... time.sleep(.01)
2352
+ ... if serverthread.serving and time.monotonic() - starttime > timeout:
2353
+ ... serverthread.stop()
2354
+ ... break
2355
+
2356
+ Print any errors that may have occurred.
2357
+
2358
+ >>> print(serverthread.error)
2359
+ None
2360
+ """
2361
+ import http.server
2362
+ import email.message
2363
+ import select
2364
+ import threading
2365
+
2366
+ class DocHandler(http.server.BaseHTTPRequestHandler):
2367
+
2368
+ def do_GET(self):
2369
+ """Process a request from an HTML browser.
2370
+
2371
+ The URL received is in self.path.
2372
+ Get an HTML page from self.urlhandler and send it.
2373
+ """
2374
+ if self.path.endswith('.css'):
2375
+ content_type = 'text/css'
2376
+ else:
2377
+ content_type = 'text/html'
2378
+ self.send_response(200)
2379
+ self.send_header('Content-Type', '%s; charset=UTF-8' % content_type)
2380
+ self.end_headers()
2381
+ self.wfile.write(self.urlhandler(
2382
+ self.path, content_type).encode('utf-8'))
2383
+
2384
+ def log_message(self, *args):
2385
+ # Don't log messages.
2386
+ pass
2387
+
2388
+ class DocServer(http.server.HTTPServer):
2389
+
2390
+ def __init__(self, host, port, callback):
2391
+ self.host = host
2392
+ self.address = (self.host, port)
2393
+ self.callback = callback
2394
+ self.base.__init__(self, self.address, self.handler)
2395
+ self.quit = False
2396
+
2397
+ def serve_until_quit(self):
2398
+ while not self.quit:
2399
+ rd, wr, ex = select.select([self.socket.fileno()], [], [], 1)
2400
+ if rd:
2401
+ self.handle_request()
2402
+ self.server_close()
2403
+
2404
+ def server_activate(self):
2405
+ self.base.server_activate(self)
2406
+ if self.callback:
2407
+ self.callback(self)
2408
+
2409
+ class ServerThread(threading.Thread):
2410
+
2411
+ def __init__(self, urlhandler, host, port):
2412
+ self.urlhandler = urlhandler
2413
+ self.host = host
2414
+ self.port = int(port)
2415
+ threading.Thread.__init__(self)
2416
+ self.serving = False
2417
+ self.error = None
2418
+ self.docserver = None
2419
+
2420
+ def run(self):
2421
+ """Start the server."""
2422
+ try:
2423
+ DocServer.base = http.server.HTTPServer
2424
+ DocServer.handler = DocHandler
2425
+ DocHandler.MessageClass = email.message.Message
2426
+ DocHandler.urlhandler = staticmethod(self.urlhandler)
2427
+ docsvr = DocServer(self.host, self.port, self.ready)
2428
+ self.docserver = docsvr
2429
+ docsvr.serve_until_quit()
2430
+ except Exception as err:
2431
+ self.error = err
2432
+
2433
+ def ready(self, server):
2434
+ self.serving = True
2435
+ self.host = server.host
2436
+ self.port = server.server_port
2437
+ self.url = 'http://%s:%d/' % (self.host, self.port)
2438
+
2439
+ def stop(self):
2440
+ """Stop the server and this thread nicely"""
2441
+ self.docserver.quit = True
2442
+ self.join()
2443
+ # explicitly break a reference cycle: DocServer.callback
2444
+ # has indirectly a reference to ServerThread.
2445
+ self.docserver = None
2446
+ self.serving = False
2447
+ self.url = None
2448
+
2449
+ thread = ServerThread(urlhandler, hostname, port)
2450
+ thread.start()
2451
+ # Wait until thread.serving is True and thread.docserver is set
2452
+ # to make sure we are really up before returning.
2453
+ while not thread.error and not (thread.serving and thread.docserver):
2454
+ time.sleep(.01)
2455
+ return thread
2456
+
2457
+
2458
+ def _url_handler(url, content_type="text/html"):
2459
+ """The pydoc url handler for use with the pydoc server.
2460
+
2461
+ If the content_type is 'text/css', the _pydoc.css style
2462
+ sheet is read and returned if it exits.
2463
+
2464
+ If the content_type is 'text/html', then the result of
2465
+ get_html_page(url) is returned.
2466
+ """
2467
+ class _HTMLDoc(HTMLDoc):
2468
+
2469
+ def page(self, title, contents):
2470
+ """Format an HTML page."""
2471
+ css_path = "pydoc_data/_pydoc.css"
2472
+ css_link = (
2473
+ '<link rel="stylesheet" type="text/css" href="%s">' %
2474
+ css_path)
2475
+ return '''\
2476
+ <!DOCTYPE>
2477
+ <html lang="en">
2478
+ <head>
2479
+ <meta charset="utf-8">
2480
+ <title>Pydoc: %s</title>
2481
+ %s</head><body>%s<div style="clear:both;padding-top:.5em;">%s</div>
2482
+ </body></html>''' % (title, css_link, html_navbar(), contents)
2483
+
2484
+
2485
+ html = _HTMLDoc()
2486
+
2487
+ def html_navbar():
2488
+ version = html.escape("%s [%s, %s]" % (platform.python_version(),
2489
+ platform.python_build()[0],
2490
+ platform.python_compiler()))
2491
+ return """
2492
+ <div style='float:left'>
2493
+ Python %s<br>%s
2494
+ </div>
2495
+ <div style='float:right'>
2496
+ <div style='text-align:center'>
2497
+ <a href="index.html">Module Index</a>
2498
+ : <a href="topics.html">Topics</a>
2499
+ : <a href="keywords.html">Keywords</a>
2500
+ </div>
2501
+ <div>
2502
+ <form action="get" style='display:inline;'>
2503
+ <input type=text name=key size=15>
2504
+ <input type=submit value="Get">
2505
+ </form>&nbsp;
2506
+ <form action="search" style='display:inline;'>
2507
+ <input type=text name=key size=15>
2508
+ <input type=submit value="Search">
2509
+ </form>
2510
+ </div>
2511
+ </div>
2512
+ """ % (version, html.escape(platform.platform(terse=True)))
2513
+
2514
+ def html_index():
2515
+ """Module Index page."""
2516
+
2517
+ def bltinlink(name):
2518
+ return '<a href="%s.html">%s</a>' % (name, name)
2519
+
2520
+ heading = html.heading(
2521
+ '<strong class="title">Index of Modules</strong>'
2522
+ )
2523
+ names = [name for name in sys.builtin_module_names
2524
+ if name != '__main__']
2525
+ contents = html.multicolumn(names, bltinlink)
2526
+ contents = [heading, '<p>' + html.bigsection(
2527
+ 'Built-in Modules', 'index', contents)]
2528
+
2529
+ seen = {}
2530
+ for dir in sys.path:
2531
+ contents.append(html.index(dir, seen))
2532
+
2533
+ contents.append(
2534
+ '<p align=right class="heading-text grey"><strong>pydoc</strong> by Ka-Ping Yee'
2535
+ '&lt;ping@lfw.org&gt;</p>')
2536
+ return 'Index of Modules', ''.join(contents)
2537
+
2538
+ def html_search(key):
2539
+ """Search results page."""
2540
+ # scan for modules
2541
+ search_result = []
2542
+
2543
+ def callback(path, modname, desc):
2544
+ if modname[-9:] == '.__init__':
2545
+ modname = modname[:-9] + ' (package)'
2546
+ search_result.append((modname, desc and '- ' + desc))
2547
+
2548
+ with warnings.catch_warnings():
2549
+ warnings.filterwarnings('ignore') # ignore problems during import
2550
+ def onerror(modname):
2551
+ pass
2552
+ ModuleScanner().run(callback, key, onerror=onerror)
2553
+
2554
+ # format page
2555
+ def bltinlink(name):
2556
+ return '<a href="%s.html">%s</a>' % (name, name)
2557
+
2558
+ results = []
2559
+ heading = html.heading(
2560
+ '<strong class="title">Search Results</strong>',
2561
+ )
2562
+ for name, desc in search_result:
2563
+ results.append(bltinlink(name) + desc)
2564
+ contents = heading + html.bigsection(
2565
+ 'key = %s' % key, 'index', '<br>'.join(results))
2566
+ return 'Search Results', contents
2567
+
2568
+ def html_topics():
2569
+ """Index of topic texts available."""
2570
+
2571
+ def bltinlink(name):
2572
+ return '<a href="topic?key=%s">%s</a>' % (name, name)
2573
+
2574
+ heading = html.heading(
2575
+ '<strong class="title">INDEX</strong>',
2576
+ )
2577
+ names = sorted(Helper.topics.keys())
2578
+
2579
+ contents = html.multicolumn(names, bltinlink)
2580
+ contents = heading + html.bigsection(
2581
+ 'Topics', 'index', contents)
2582
+ return 'Topics', contents
2583
+
2584
+ def html_keywords():
2585
+ """Index of keywords."""
2586
+ heading = html.heading(
2587
+ '<strong class="title">INDEX</strong>',
2588
+ )
2589
+ names = sorted(Helper.keywords.keys())
2590
+
2591
+ def bltinlink(name):
2592
+ return '<a href="topic?key=%s">%s</a>' % (name, name)
2593
+
2594
+ contents = html.multicolumn(names, bltinlink)
2595
+ contents = heading + html.bigsection(
2596
+ 'Keywords', 'index', contents)
2597
+ return 'Keywords', contents
2598
+
2599
+ def html_topicpage(topic):
2600
+ """Topic or keyword help page."""
2601
+ buf = io.StringIO()
2602
+ htmlhelp = Helper(buf, buf)
2603
+ contents, xrefs = htmlhelp._gettopic(topic)
2604
+ if topic in htmlhelp.keywords:
2605
+ title = 'KEYWORD'
2606
+ else:
2607
+ title = 'TOPIC'
2608
+ heading = html.heading(
2609
+ '<strong class="title">%s</strong>' % title,
2610
+ )
2611
+ contents = '<pre>%s</pre>' % html.markup(contents)
2612
+ contents = html.bigsection(topic , 'index', contents)
2613
+ if xrefs:
2614
+ xrefs = sorted(xrefs.split())
2615
+
2616
+ def bltinlink(name):
2617
+ return '<a href="topic?key=%s">%s</a>' % (name, name)
2618
+
2619
+ xrefs = html.multicolumn(xrefs, bltinlink)
2620
+ xrefs = html.section('Related help topics: ', 'index', xrefs)
2621
+ return ('%s %s' % (title, topic),
2622
+ ''.join((heading, contents, xrefs)))
2623
+
2624
+ def html_getobj(url):
2625
+ obj = locate(url, forceload=1)
2626
+ if obj is None and url != 'None':
2627
+ raise ValueError('could not find object')
2628
+ title = describe(obj)
2629
+ content = html.document(obj, url)
2630
+ return title, content
2631
+
2632
+ def html_error(url, exc):
2633
+ heading = html.heading(
2634
+ '<strong class="title">Error</strong>',
2635
+ )
2636
+ contents = '<br>'.join(html.escape(line) for line in
2637
+ format_exception_only(type(exc), exc))
2638
+ contents = heading + html.bigsection(url, 'error', contents)
2639
+ return "Error - %s" % url, contents
2640
+
2641
+ def get_html_page(url):
2642
+ """Generate an HTML page for url."""
2643
+ complete_url = url
2644
+ if url.endswith('.html'):
2645
+ url = url[:-5]
2646
+ try:
2647
+ if url in ("", "index"):
2648
+ title, content = html_index()
2649
+ elif url == "topics":
2650
+ title, content = html_topics()
2651
+ elif url == "keywords":
2652
+ title, content = html_keywords()
2653
+ elif '=' in url:
2654
+ op, _, url = url.partition('=')
2655
+ if op == "search?key":
2656
+ title, content = html_search(url)
2657
+ elif op == "topic?key":
2658
+ # try topics first, then objects.
2659
+ try:
2660
+ title, content = html_topicpage(url)
2661
+ except ValueError:
2662
+ title, content = html_getobj(url)
2663
+ elif op == "get?key":
2664
+ # try objects first, then topics.
2665
+ if url in ("", "index"):
2666
+ title, content = html_index()
2667
+ else:
2668
+ try:
2669
+ title, content = html_getobj(url)
2670
+ except ValueError:
2671
+ title, content = html_topicpage(url)
2672
+ else:
2673
+ raise ValueError('bad pydoc url')
2674
+ else:
2675
+ title, content = html_getobj(url)
2676
+ except Exception as exc:
2677
+ # Catch any errors and display them in an error page.
2678
+ title, content = html_error(complete_url, exc)
2679
+ return html.page(title, content)
2680
+
2681
+ if url.startswith('/'):
2682
+ url = url[1:]
2683
+ if content_type == 'text/css':
2684
+ path_here = os.path.dirname(os.path.realpath(__file__))
2685
+ css_path = os.path.join(path_here, url)
2686
+ with open(css_path) as fp:
2687
+ return ''.join(fp.readlines())
2688
+ elif content_type == 'text/html':
2689
+ return get_html_page(url)
2690
+ # Errors outside the url handler are caught by the server.
2691
+ raise TypeError('unknown content type %r for url %s' % (content_type, url))
2692
+
2693
+
2694
+ def browse(port=0, *, open_browser=True, hostname='localhost'):
2695
+ """Start the enhanced pydoc web server and open a web browser.
2696
+
2697
+ Use port '0' to start the server on an arbitrary port.
2698
+ Set open_browser to False to suppress opening a browser.
2699
+ """
2700
+ import webbrowser
2701
+ serverthread = _start_server(_url_handler, hostname, port)
2702
+ if serverthread.error:
2703
+ print(serverthread.error)
2704
+ return
2705
+ if serverthread.serving:
2706
+ server_help_msg = 'Server commands: [b]rowser, [q]uit'
2707
+ if open_browser:
2708
+ webbrowser.open(serverthread.url)
2709
+ try:
2710
+ print('Server ready at', serverthread.url)
2711
+ print(server_help_msg)
2712
+ while serverthread.serving:
2713
+ cmd = input('server> ')
2714
+ cmd = cmd.lower()
2715
+ if cmd == 'q':
2716
+ break
2717
+ elif cmd == 'b':
2718
+ webbrowser.open(serverthread.url)
2719
+ else:
2720
+ print(server_help_msg)
2721
+ except (KeyboardInterrupt, EOFError):
2722
+ print()
2723
+ finally:
2724
+ if serverthread.serving:
2725
+ serverthread.stop()
2726
+ print('Server stopped')
2727
+
2728
+
2729
+ # -------------------------------------------------- command-line interface
2730
+
2731
+ def ispath(x):
2732
+ return isinstance(x, str) and x.find(os.sep) >= 0
2733
+
2734
+ def _get_revised_path(given_path, argv0):
2735
+ """Ensures current directory is on returned path, and argv0 directory is not
2736
+
2737
+ Exception: argv0 dir is left alone if it's also pydoc's directory.
2738
+
2739
+ Returns a new path entry list, or None if no adjustment is needed.
2740
+ """
2741
+ # Scripts may get the current directory in their path by default if they're
2742
+ # run with the -m switch, or directly from the current directory.
2743
+ # The interactive prompt also allows imports from the current directory.
2744
+
2745
+ # Accordingly, if the current directory is already present, don't make
2746
+ # any changes to the given_path
2747
+ if '' in given_path or os.curdir in given_path or os.getcwd() in given_path:
2748
+ return None
2749
+
2750
+ # Otherwise, add the current directory to the given path, and remove the
2751
+ # script directory (as long as the latter isn't also pydoc's directory.
2752
+ stdlib_dir = os.path.dirname(__file__)
2753
+ script_dir = os.path.dirname(argv0)
2754
+ revised_path = given_path.copy()
2755
+ if script_dir in given_path and not os.path.samefile(script_dir, stdlib_dir):
2756
+ revised_path.remove(script_dir)
2757
+ revised_path.insert(0, os.getcwd())
2758
+ return revised_path
2759
+
2760
+
2761
+ # Note: the tests only cover _get_revised_path, not _adjust_cli_path itself
2762
+ def _adjust_cli_sys_path():
2763
+ """Ensures current directory is on sys.path, and __main__ directory is not.
2764
+
2765
+ Exception: __main__ dir is left alone if it's also pydoc's directory.
2766
+ """
2767
+ revised_path = _get_revised_path(sys.path, sys.argv[0])
2768
+ if revised_path is not None:
2769
+ sys.path[:] = revised_path
2770
+
2771
+
2772
+ def cli():
2773
+ """Command-line interface (looks at sys.argv to decide what to do)."""
2774
+ import getopt
2775
+ class BadUsage(Exception): pass
2776
+
2777
+ _adjust_cli_sys_path()
2778
+
2779
+ try:
2780
+ opts, args = getopt.getopt(sys.argv[1:], 'bk:n:p:w')
2781
+ writing = False
2782
+ start_server = False
2783
+ open_browser = False
2784
+ port = 0
2785
+ hostname = 'localhost'
2786
+ for opt, val in opts:
2787
+ if opt == '-b':
2788
+ start_server = True
2789
+ open_browser = True
2790
+ if opt == '-k':
2791
+ apropos(val)
2792
+ return
2793
+ if opt == '-p':
2794
+ start_server = True
2795
+ port = val
2796
+ if opt == '-w':
2797
+ writing = True
2798
+ if opt == '-n':
2799
+ start_server = True
2800
+ hostname = val
2801
+
2802
+ if start_server:
2803
+ browse(port, hostname=hostname, open_browser=open_browser)
2804
+ return
2805
+
2806
+ if not args: raise BadUsage
2807
+ for arg in args:
2808
+ if ispath(arg) and not os.path.exists(arg):
2809
+ print('file %r does not exist' % arg)
2810
+ sys.exit(1)
2811
+ try:
2812
+ if ispath(arg) and os.path.isfile(arg):
2813
+ arg = importfile(arg)
2814
+ if writing:
2815
+ if ispath(arg) and os.path.isdir(arg):
2816
+ writedocs(arg)
2817
+ else:
2818
+ writedoc(arg)
2819
+ else:
2820
+ help.help(arg, is_cli=True)
2821
+ except (ImportError, ErrorDuringImport) as value:
2822
+ print(value)
2823
+ sys.exit(1)
2824
+
2825
+ except (getopt.error, BadUsage):
2826
+ cmd = os.path.splitext(os.path.basename(sys.argv[0]))[0]
2827
+ print("""pydoc - the Python documentation tool
2828
+
2829
+ {cmd} <name> ...
2830
+ Show text documentation on something. <name> may be the name of a
2831
+ Python keyword, topic, function, module, or package, or a dotted
2832
+ reference to a class or function within a module or module in a
2833
+ package. If <name> contains a '{sep}', it is used as the path to a
2834
+ Python source file to document. If name is 'keywords', 'topics',
2835
+ or 'modules', a listing of these things is displayed.
2836
+
2837
+ {cmd} -k <keyword>
2838
+ Search for a keyword in the synopsis lines of all available modules.
2839
+
2840
+ {cmd} -n <hostname>
2841
+ Start an HTTP server with the given hostname (default: localhost).
2842
+
2843
+ {cmd} -p <port>
2844
+ Start an HTTP server on the given port on the local machine. Port
2845
+ number 0 can be used to get an arbitrary unused port.
2846
+
2847
+ {cmd} -b
2848
+ Start an HTTP server on an arbitrary unused port and open a web browser
2849
+ to interactively browse documentation. This option can be used in
2850
+ combination with -n and/or -p.
2851
+
2852
+ {cmd} -w <name> ...
2853
+ Write out the HTML documentation for a module to a file in the current
2854
+ directory. If <name> contains a '{sep}', it is treated as a filename; if
2855
+ it names a directory, documentation is written for all the contents.
2856
+ """.format(cmd=cmd, sep=os.sep))
2857
+
2858
+ if __name__ == '__main__':
2859
+ cli()