pytron-kit 0.3.12__py3-none-macosx_11_0_universal2.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. pytron/__init__.py +112 -0
  2. pytron/application.py +562 -0
  3. pytron/apputils/__init__.py +0 -0
  4. pytron/apputils/chrome_ipc.py +203 -0
  5. pytron/apputils/codegen.py +261 -0
  6. pytron/apputils/config.py +303 -0
  7. pytron/apputils/deadmansswitch.py +47 -0
  8. pytron/apputils/extras.py +76 -0
  9. pytron/apputils/native.py +148 -0
  10. pytron/apputils/shell.py +73 -0
  11. pytron/apputils/windows.py +286 -0
  12. pytron/cli.py +384 -0
  13. pytron/commands/__init__.py +0 -0
  14. pytron/commands/android.py +28 -0
  15. pytron/commands/build.py +26 -0
  16. pytron/commands/doctor.py +221 -0
  17. pytron/commands/engine.py +23 -0
  18. pytron/commands/frontend.py +60 -0
  19. pytron/commands/harvest.py +112 -0
  20. pytron/commands/helpers.py +239 -0
  21. pytron/commands/info.py +50 -0
  22. pytron/commands/init.py +521 -0
  23. pytron/commands/install.py +294 -0
  24. pytron/commands/login.py +130 -0
  25. pytron/commands/package.py +228 -0
  26. pytron/commands/plugin.py +442 -0
  27. pytron/commands/run.py +312 -0
  28. pytron/commands/scan.py +210 -0
  29. pytron/commands/show.py +23 -0
  30. pytron/commands/uninstall.py +150 -0
  31. pytron/commands/utils.py +42 -0
  32. pytron/commands/workflow.py +95 -0
  33. pytron/console.py +133 -0
  34. pytron/core.py +18 -0
  35. pytron/dependencies/WebView2Loader.dll +0 -0
  36. pytron/dependencies/__init__.py +1 -0
  37. pytron/dependencies/pytron_native.so +0 -0
  38. pytron/engines/chrome/adapter.py +445 -0
  39. pytron/engines/chrome/engine.py +576 -0
  40. pytron/engines/chrome/forge.py +147 -0
  41. pytron/engines/chrome/shell/package.json +8 -0
  42. pytron/engines/chrome/shell/preload.js +12 -0
  43. pytron/engines/chrome/shell/shell.js +534 -0
  44. pytron/exceptions.py +36 -0
  45. pytron/inspector.py +201 -0
  46. pytron/inspector_ui.py +512 -0
  47. pytron/installer/Installation.nsi +236 -0
  48. pytron/installer/header.bmp +0 -0
  49. pytron/installer/pytron.ico +0 -0
  50. pytron/installer/sidebar.bmp +0 -0
  51. pytron/llms.md +98 -0
  52. pytron/manifests/README.md +29 -0
  53. pytron/manifests/windows-utf8.manifest +44 -0
  54. pytron/menu.py +128 -0
  55. pytron/nsis-setup.exe +0 -0
  56. pytron/pack/__init__.py +0 -0
  57. pytron/pack/assets.py +131 -0
  58. pytron/pack/compilers.py +289 -0
  59. pytron/pack/crystal.py +297 -0
  60. pytron/pack/graph.py +377 -0
  61. pytron/pack/inference.py +157 -0
  62. pytron/pack/installers.py +402 -0
  63. pytron/pack/introspect.py +357 -0
  64. pytron/pack/metadata.py +213 -0
  65. pytron/pack/modules.py +618 -0
  66. pytron/pack/nuitka.py +108 -0
  67. pytron/pack/pipeline.py +107 -0
  68. pytron/pack/pyinstaller.py +176 -0
  69. pytron/pack/rust_engine.py +273 -0
  70. pytron/pack/secure.py +309 -0
  71. pytron/pack/secure_loader/bin/pytron_rust_bootloader +0 -0
  72. pytron/pack/secure_loader/icon.ico +0 -0
  73. pytron/pack/utils.py +110 -0
  74. pytron/pack/virtual_root.py +124 -0
  75. pytron/platforms/__init__.py +0 -0
  76. pytron/platforms/android/__init__.py +3 -0
  77. pytron/platforms/android/android.py +103 -0
  78. pytron/platforms/android/builder.py +736 -0
  79. pytron/platforms/android/ops/build.py +79 -0
  80. pytron/platforms/android/ops/init.py +63 -0
  81. pytron/platforms/android/ops/run.py +79 -0
  82. pytron/platforms/android/ops/sync.py +770 -0
  83. pytron/platforms/android/ops/utils.py +8 -0
  84. pytron/platforms/android/shell/README.md +30 -0
  85. pytron/platforms/android/shell/app/build.gradle +64 -0
  86. pytron/platforms/android/shell/app/src/main/AndroidManifest.xml +29 -0
  87. pytron/platforms/android/shell/app/src/main/assets/python/main.py +86 -0
  88. pytron/platforms/android/shell/app/src/main/assets/python/python314.zip +0 -0
  89. pytron/platforms/android/shell/app/src/main/cpp/CMakeLists.txt +25 -0
  90. pytron/platforms/android/shell/app/src/main/cpp/include/Python.h +155 -0
  91. pytron/platforms/android/shell/app/src/main/cpp/include/abstract.h +915 -0
  92. pytron/platforms/android/shell/app/src/main/cpp/include/audit.h +30 -0
  93. pytron/platforms/android/shell/app/src/main/cpp/include/bltinmodule.h +14 -0
  94. pytron/platforms/android/shell/app/src/main/cpp/include/boolobject.h +54 -0
  95. pytron/platforms/android/shell/app/src/main/cpp/include/bytearrayobject.h +44 -0
  96. pytron/platforms/android/shell/app/src/main/cpp/include/bytesobject.h +66 -0
  97. pytron/platforms/android/shell/app/src/main/cpp/include/ceval.h +145 -0
  98. pytron/platforms/android/shell/app/src/main/cpp/include/codecs.h +176 -0
  99. pytron/platforms/android/shell/app/src/main/cpp/include/compile.h +22 -0
  100. pytron/platforms/android/shell/app/src/main/cpp/include/complexobject.h +30 -0
  101. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/abstract.h +104 -0
  102. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/audit.h +8 -0
  103. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytearrayobject.h +38 -0
  104. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytesobject.h +42 -0
  105. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/cellobject.h +50 -0
  106. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/ceval.h +43 -0
  107. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/classobject.h +71 -0
  108. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/code.h +340 -0
  109. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/compile.h +50 -0
  110. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/complexobject.h +33 -0
  111. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/context.h +107 -0
  112. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/critical_section.h +154 -0
  113. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/descrobject.h +62 -0
  114. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/dictobject.h +105 -0
  115. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileobject.h +16 -0
  116. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileutils.h +16 -0
  117. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/floatobject.h +27 -0
  118. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/frameobject.h +35 -0
  119. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/funcobject.h +185 -0
  120. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/genobject.h +56 -0
  121. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/import.h +30 -0
  122. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/initconfig.h +334 -0
  123. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/listobject.h +53 -0
  124. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/lock.h +74 -0
  125. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longintrepr.h +184 -0
  126. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longobject.h +89 -0
  127. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/memoryobject.h +50 -0
  128. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/methodobject.h +66 -0
  129. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/modsupport.h +26 -0
  130. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/monitoring.h +269 -0
  131. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/object.h +493 -0
  132. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/objimpl.h +104 -0
  133. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/odictobject.h +43 -0
  134. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/picklebufobject.h +31 -0
  135. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pthread_stubs.h +105 -0
  136. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic.h +614 -0
  137. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_gcc.h +615 -0
  138. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_msc.h +1197 -0
  139. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_std.h +1112 -0
  140. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyctype.h +39 -0
  141. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pydebug.h +38 -0
  142. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyerrors.h +132 -0
  143. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyfpe.h +15 -0
  144. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyframe.h +45 -0
  145. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyhash.h +54 -0
  146. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pylifecycle.h +89 -0
  147. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pymem.h +84 -0
  148. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystate.h +275 -0
  149. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystats.h +194 -0
  150. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythonrun.h +96 -0
  151. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythread.h +43 -0
  152. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pytime.h +27 -0
  153. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/setobject.h +71 -0
  154. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/traceback.h +13 -0
  155. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tracemalloc.h +32 -0
  156. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tupleobject.h +40 -0
  157. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/unicodeobject.h +773 -0
  158. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/warnings.h +20 -0
  159. pytron/platforms/android/shell/app/src/main/cpp/include/cpython/weakrefobject.h +66 -0
  160. pytron/platforms/android/shell/app/src/main/cpp/include/critical_section.h +16 -0
  161. pytron/platforms/android/shell/app/src/main/cpp/include/datetime.h +267 -0
  162. pytron/platforms/android/shell/app/src/main/cpp/include/descrobject.h +100 -0
  163. pytron/platforms/android/shell/app/src/main/cpp/include/dictobject.h +108 -0
  164. pytron/platforms/android/shell/app/src/main/cpp/include/dynamic_annotations.h +499 -0
  165. pytron/platforms/android/shell/app/src/main/cpp/include/enumobject.h +17 -0
  166. pytron/platforms/android/shell/app/src/main/cpp/include/errcode.h +45 -0
  167. pytron/platforms/android/shell/app/src/main/cpp/include/exports.h +105 -0
  168. pytron/platforms/android/shell/app/src/main/cpp/include/fileobject.h +41 -0
  169. pytron/platforms/android/shell/app/src/main/cpp/include/fileutils.h +62 -0
  170. pytron/platforms/android/shell/app/src/main/cpp/include/floatobject.h +54 -0
  171. pytron/platforms/android/shell/app/src/main/cpp/include/frameobject.h +20 -0
  172. pytron/platforms/android/shell/app/src/main/cpp/include/genericaliasobject.h +14 -0
  173. pytron/platforms/android/shell/app/src/main/cpp/include/import.h +103 -0
  174. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/atomic.h +392 -0
  175. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/internal.h +969 -0
  176. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/prim.h +329 -0
  177. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/track.h +147 -0
  178. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/types.h +721 -0
  179. pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc.h +565 -0
  180. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_abstract.h +61 -0
  181. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_asdl.h +112 -0
  182. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast.h +945 -0
  183. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast_state.h +271 -0
  184. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_atexit.h +31 -0
  185. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_audit.h +35 -0
  186. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_backoff.h +133 -0
  187. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bitutils.h +186 -0
  188. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_blocks_output_buffer.h +321 -0
  189. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_brc.h +73 -0
  190. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytes_methods.h +82 -0
  191. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytesobject.h +149 -0
  192. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_c_array.h +39 -0
  193. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_call.h +206 -0
  194. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_capsule.h +17 -0
  195. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_cell.h +75 -0
  196. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval.h +390 -0
  197. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval_state.h +48 -0
  198. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_code.h +671 -0
  199. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_codecs.h +76 -0
  200. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_compile.h +230 -0
  201. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_complexobject.h +34 -0
  202. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_condvar.h +93 -0
  203. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_context.h +59 -0
  204. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_critical_section.h +237 -0
  205. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp.h +406 -0
  206. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp_data_registry.h +41 -0
  207. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_debug_offsets.h +379 -0
  208. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_descrobject.h +28 -0
  209. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict.h +410 -0
  210. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict_state.h +28 -0
  211. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dtoa.h +40 -0
  212. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_signal.h +30 -0
  213. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_trampoline.h +70 -0
  214. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_exceptions.h +40 -0
  215. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_faulthandler.h +100 -0
  216. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils.h +320 -0
  217. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils_windows.h +98 -0
  218. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_floatobject.h +49 -0
  219. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_flowgraph.h +47 -0
  220. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_format.h +27 -0
  221. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_frame.h +61 -0
  222. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist.h +111 -0
  223. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist_state.h +70 -0
  224. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_function.h +53 -0
  225. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gc.h +378 -0
  226. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_genobject.h +43 -0
  227. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_getopt.h +22 -0
  228. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gil.h +66 -0
  229. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects.h +34 -0
  230. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects_fini_generated.h +1592 -0
  231. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_strings.h +854 -0
  232. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hamt.h +113 -0
  233. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hashtable.h +150 -0
  234. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_import.h +141 -0
  235. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_importdl.h +139 -0
  236. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_index_pool.h +36 -0
  237. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_initconfig.h +197 -0
  238. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruction_sequence.h +83 -0
  239. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruments.h +127 -0
  240. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp.h +109 -0
  241. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp_structs.h +977 -0
  242. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe.h +401 -0
  243. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe_structs.h +95 -0
  244. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpolation.h +26 -0
  245. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_intrinsics.h +51 -0
  246. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_jit.h +29 -0
  247. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_list.h +81 -0
  248. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_llist.h +106 -0
  249. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_lock.h +236 -0
  250. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_long.h +319 -0
  251. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_magic_number.h +305 -0
  252. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_memoryobject.h +20 -0
  253. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_mimalloc.h +69 -0
  254. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_modsupport.h +99 -0
  255. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_moduleobject.h +62 -0
  256. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_namespace.h +21 -0
  257. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object.h +1029 -0
  258. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_alloc.h +71 -0
  259. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_deferred.h +32 -0
  260. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_stack.h +95 -0
  261. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_state.h +49 -0
  262. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc.h +702 -0
  263. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc_init.h +66 -0
  264. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_metadata.h +2117 -0
  265. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_utils.h +90 -0
  266. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_optimizer.h +318 -0
  267. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parking_lot.h +97 -0
  268. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parser.h +78 -0
  269. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pathconfig.h +26 -0
  270. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyarena.h +68 -0
  271. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyatomic_ft_wrappers.h +174 -0
  272. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pybuffer.h +21 -0
  273. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyerrors.h +213 -0
  274. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyhash.h +91 -0
  275. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pylifecycle.h +136 -0
  276. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymath.h +205 -0
  277. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem.h +145 -0
  278. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem_init.h +103 -0
  279. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystate.h +339 -0
  280. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystats.h +21 -0
  281. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythonrun.h +68 -0
  282. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythread.h +172 -0
  283. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_qsbr.h +172 -0
  284. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_range.h +21 -0
  285. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime.h +63 -0
  286. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init.h +239 -0
  287. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init_generated.h +1589 -0
  288. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_structs.h +310 -0
  289. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_semaphore.h +67 -0
  290. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_setobject.h +41 -0
  291. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_signal.h +108 -0
  292. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sliceobject.h +20 -0
  293. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stackref.h +791 -0
  294. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stats.h +97 -0
  295. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_strhex.h +39 -0
  296. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structs.h +88 -0
  297. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structseq.h +40 -0
  298. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_symtable.h +201 -0
  299. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sysmodule.h +32 -0
  300. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_template.h +26 -0
  301. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_time.h +334 -0
  302. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_token.h +110 -0
  303. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_traceback.h +111 -0
  304. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tracemalloc.h +164 -0
  305. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tstate.h +88 -0
  306. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tuple.h +75 -0
  307. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typedefs.h +18 -0
  308. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typeobject.h +155 -0
  309. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typevarobject.h +28 -0
  310. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ucnhash.h +36 -0
  311. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject.h +308 -0
  312. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject_generated.h +3132 -0
  313. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unionobject.h +26 -0
  314. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uniqueid.h +57 -0
  315. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_ids.h +335 -0
  316. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_metadata.h +1204 -0
  317. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_warnings.h +21 -0
  318. pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_weakref.h +133 -0
  319. pytron/platforms/android/shell/app/src/main/cpp/include/intrcheck.h +23 -0
  320. pytron/platforms/android/shell/app/src/main/cpp/include/iterobject.h +24 -0
  321. pytron/platforms/android/shell/app/src/main/cpp/include/listobject.h +55 -0
  322. pytron/platforms/android/shell/app/src/main/cpp/include/lock.h +16 -0
  323. pytron/platforms/android/shell/app/src/main/cpp/include/longobject.h +178 -0
  324. pytron/platforms/android/shell/app/src/main/cpp/include/marshal.h +31 -0
  325. pytron/platforms/android/shell/app/src/main/cpp/include/memoryobject.h +34 -0
  326. pytron/platforms/android/shell/app/src/main/cpp/include/methodobject.h +146 -0
  327. pytron/platforms/android/shell/app/src/main/cpp/include/modsupport.h +146 -0
  328. pytron/platforms/android/shell/app/src/main/cpp/include/moduleobject.h +122 -0
  329. pytron/platforms/android/shell/app/src/main/cpp/include/monitoring.h +18 -0
  330. pytron/platforms/android/shell/app/src/main/cpp/include/object.h +828 -0
  331. pytron/platforms/android/shell/app/src/main/cpp/include/objimpl.h +211 -0
  332. pytron/platforms/android/shell/app/src/main/cpp/include/opcode.h +43 -0
  333. pytron/platforms/android/shell/app/src/main/cpp/include/opcode_ids.h +259 -0
  334. pytron/platforms/android/shell/app/src/main/cpp/include/osdefs.h +57 -0
  335. pytron/platforms/android/shell/app/src/main/cpp/include/osmodule.h +17 -0
  336. pytron/platforms/android/shell/app/src/main/cpp/include/patchlevel.h +49 -0
  337. pytron/platforms/android/shell/app/src/main/cpp/include/py_curses.h +117 -0
  338. pytron/platforms/android/shell/app/src/main/cpp/include/pyatomic.h +16 -0
  339. pytron/platforms/android/shell/app/src/main/cpp/include/pybuffer.h +145 -0
  340. pytron/platforms/android/shell/app/src/main/cpp/include/pycapsule.h +58 -0
  341. pytron/platforms/android/shell/app/src/main/cpp/include/pyconfig.h +2088 -0
  342. pytron/platforms/android/shell/app/src/main/cpp/include/pydtrace.h +59 -0
  343. pytron/platforms/android/shell/app/src/main/cpp/include/pyerrors.h +335 -0
  344. pytron/platforms/android/shell/app/src/main/cpp/include/pyexpat.h +62 -0
  345. pytron/platforms/android/shell/app/src/main/cpp/include/pyframe.h +26 -0
  346. pytron/platforms/android/shell/app/src/main/cpp/include/pyhash.h +59 -0
  347. pytron/platforms/android/shell/app/src/main/cpp/include/pylifecycle.h +80 -0
  348. pytron/platforms/android/shell/app/src/main/cpp/include/pymacconfig.h +91 -0
  349. pytron/platforms/android/shell/app/src/main/cpp/include/pymacro.h +243 -0
  350. pytron/platforms/android/shell/app/src/main/cpp/include/pymath.h +65 -0
  351. pytron/platforms/android/shell/app/src/main/cpp/include/pymem.h +110 -0
  352. pytron/platforms/android/shell/app/src/main/cpp/include/pyport.h +710 -0
  353. pytron/platforms/android/shell/app/src/main/cpp/include/pystate.h +132 -0
  354. pytron/platforms/android/shell/app/src/main/cpp/include/pystats.h +28 -0
  355. pytron/platforms/android/shell/app/src/main/cpp/include/pystrcmp.h +23 -0
  356. pytron/platforms/android/shell/app/src/main/cpp/include/pystrtod.h +37 -0
  357. pytron/platforms/android/shell/app/src/main/cpp/include/pythonrun.h +42 -0
  358. pytron/platforms/android/shell/app/src/main/cpp/include/pythread.h +131 -0
  359. pytron/platforms/android/shell/app/src/main/cpp/include/pytypedefs.h +30 -0
  360. pytron/platforms/android/shell/app/src/main/cpp/include/rangeobject.h +27 -0
  361. pytron/platforms/android/shell/app/src/main/cpp/include/refcount.h +555 -0
  362. pytron/platforms/android/shell/app/src/main/cpp/include/setobject.h +49 -0
  363. pytron/platforms/android/shell/app/src/main/cpp/include/sliceobject.h +69 -0
  364. pytron/platforms/android/shell/app/src/main/cpp/include/structmember.h +56 -0
  365. pytron/platforms/android/shell/app/src/main/cpp/include/structseq.h +46 -0
  366. pytron/platforms/android/shell/app/src/main/cpp/include/sysmodule.h +27 -0
  367. pytron/platforms/android/shell/app/src/main/cpp/include/traceback.h +26 -0
  368. pytron/platforms/android/shell/app/src/main/cpp/include/tupleobject.h +46 -0
  369. pytron/platforms/android/shell/app/src/main/cpp/include/typeslots.h +96 -0
  370. pytron/platforms/android/shell/app/src/main/cpp/include/unicodeobject.h +1029 -0
  371. pytron/platforms/android/shell/app/src/main/cpp/include/warnings.h +45 -0
  372. pytron/platforms/android/shell/app/src/main/cpp/include/weakrefobject.h +46 -0
  373. pytron/platforms/android/shell/app/src/main/cpp/pytron_bridge.cpp +224 -0
  374. pytron/platforms/android/shell/app/src/main/java/com/pytron/shell/MainActivity.kt +208 -0
  375. pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  376. pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  377. pytron/platforms/android/shell/build.gradle +11 -0
  378. pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.jar +0 -0
  379. pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.properties +5 -0
  380. pytron/platforms/android/shell/gradle.properties +2 -0
  381. pytron/platforms/android/shell/gradlew.bat +85 -0
  382. pytron/platforms/android/shell/settings.gradle +16 -0
  383. pytron/platforms/darwin.py +82 -0
  384. pytron/platforms/darwin_ops/libs.py +31 -0
  385. pytron/platforms/darwin_ops/system.py +182 -0
  386. pytron/platforms/darwin_ops/utils.py +85 -0
  387. pytron/platforms/darwin_ops/webview.py +5 -0
  388. pytron/platforms/darwin_ops/window.py +102 -0
  389. pytron/platforms/interface.py +152 -0
  390. pytron/platforms/linux.py +82 -0
  391. pytron/platforms/linux_ops/libs.py +49 -0
  392. pytron/platforms/linux_ops/system.py +316 -0
  393. pytron/platforms/linux_ops/utils.py +19 -0
  394. pytron/platforms/linux_ops/webview.py +5 -0
  395. pytron/platforms/linux_ops/window.py +115 -0
  396. pytron/platforms/windows.py +136 -0
  397. pytron/platforms/windows_ops/__init__.py +0 -0
  398. pytron/platforms/windows_ops/constants.py +126 -0
  399. pytron/platforms/windows_ops/system.py +518 -0
  400. pytron/platforms/windows_ops/utils.py +3 -0
  401. pytron/platforms/windows_ops/webview.py +5 -0
  402. pytron/platforms/windows_ops/window.py +361 -0
  403. pytron/plugin.py +467 -0
  404. pytron/rcedit-x64.exe +0 -0
  405. pytron/router.py +146 -0
  406. pytron/serializer.py +240 -0
  407. pytron/shortcuts.py +279 -0
  408. pytron/state.py +76 -0
  409. pytron/tray.py +399 -0
  410. pytron/updater.py +181 -0
  411. pytron/utf8_hook.py +112 -0
  412. pytron/utils.py +44 -0
  413. pytron/webview.py +722 -0
  414. pytron_kit-0.3.12.dist-info/METADATA +131 -0
  415. pytron_kit-0.3.12.dist-info/RECORD +419 -0
  416. pytron_kit-0.3.12.dist-info/WHEEL +5 -0
  417. pytron_kit-0.3.12.dist-info/entry_points.txt +2 -0
  418. pytron_kit-0.3.12.dist-info/licenses/LICENSE +201 -0
  419. pytron_kit-0.3.12.dist-info/top_level.txt +1 -0
@@ -0,0 +1,185 @@
1
+ /* Function object interface */
2
+
3
+ #ifndef Py_LIMITED_API
4
+ #ifndef Py_FUNCOBJECT_H
5
+ #define Py_FUNCOBJECT_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+
11
+ #define _Py_COMMON_FIELDS(PREFIX) \
12
+ PyObject *PREFIX ## globals; \
13
+ PyObject *PREFIX ## builtins; \
14
+ PyObject *PREFIX ## name; \
15
+ PyObject *PREFIX ## qualname; \
16
+ PyObject *PREFIX ## code; /* A code object, the __code__ attribute */ \
17
+ PyObject *PREFIX ## defaults; /* NULL or a tuple */ \
18
+ PyObject *PREFIX ## kwdefaults; /* NULL or a dict */ \
19
+ PyObject *PREFIX ## closure; /* NULL or a tuple of cell objects */
20
+
21
+ typedef struct {
22
+ _Py_COMMON_FIELDS(fc_)
23
+ } PyFrameConstructor;
24
+
25
+ /* Function objects and code objects should not be confused with each other:
26
+ *
27
+ * Function objects are created by the execution of the 'def' statement.
28
+ * They reference a code object in their __code__ attribute, which is a
29
+ * purely syntactic object, i.e. nothing more than a compiled version of some
30
+ * source code lines. There is one code object per source code "fragment",
31
+ * but each code object can be referenced by zero or many function objects
32
+ * depending only on how many times the 'def' statement in the source was
33
+ * executed so far.
34
+ */
35
+
36
+ typedef struct {
37
+ PyObject_HEAD
38
+ _Py_COMMON_FIELDS(func_)
39
+ PyObject *func_doc; /* The __doc__ attribute, can be anything */
40
+ PyObject *func_dict; /* The __dict__ attribute, a dict or NULL */
41
+ PyObject *func_weakreflist; /* List of weak references */
42
+ PyObject *func_module; /* The __module__ attribute, can be anything */
43
+ PyObject *func_annotations; /* Annotations, a dict or NULL */
44
+ PyObject *func_annotate; /* Callable to fill the annotations dictionary */
45
+ PyObject *func_typeparams; /* Tuple of active type variables or NULL */
46
+ vectorcallfunc vectorcall;
47
+ /* Version number for use by specializer.
48
+ * Can set to non-zero when we want to specialize.
49
+ * Will be set to zero if any of these change:
50
+ * defaults
51
+ * kwdefaults (only if the object changes, not the contents of the dict)
52
+ * code
53
+ * annotations
54
+ * vectorcall function pointer */
55
+ uint32_t func_version;
56
+
57
+ /* Invariant:
58
+ * func_closure contains the bindings for func_code->co_freevars, so
59
+ * PyTuple_Size(func_closure) == PyCode_GetNumFree(func_code)
60
+ * (func_closure may be NULL if PyCode_GetNumFree(func_code) == 0).
61
+ */
62
+ } PyFunctionObject;
63
+
64
+ #undef _Py_COMMON_FIELDS
65
+
66
+ PyAPI_DATA(PyTypeObject) PyFunction_Type;
67
+
68
+ #define PyFunction_Check(op) Py_IS_TYPE((op), &PyFunction_Type)
69
+
70
+ PyAPI_FUNC(PyObject *) PyFunction_New(PyObject *, PyObject *);
71
+ PyAPI_FUNC(PyObject *) PyFunction_NewWithQualName(PyObject *, PyObject *, PyObject *);
72
+ PyAPI_FUNC(PyObject *) PyFunction_GetCode(PyObject *);
73
+ PyAPI_FUNC(PyObject *) PyFunction_GetGlobals(PyObject *);
74
+ PyAPI_FUNC(PyObject *) PyFunction_GetModule(PyObject *);
75
+ PyAPI_FUNC(PyObject *) PyFunction_GetDefaults(PyObject *);
76
+ PyAPI_FUNC(int) PyFunction_SetDefaults(PyObject *, PyObject *);
77
+ PyAPI_FUNC(void) PyFunction_SetVectorcall(PyFunctionObject *, vectorcallfunc);
78
+ PyAPI_FUNC(PyObject *) PyFunction_GetKwDefaults(PyObject *);
79
+ PyAPI_FUNC(int) PyFunction_SetKwDefaults(PyObject *, PyObject *);
80
+ PyAPI_FUNC(PyObject *) PyFunction_GetClosure(PyObject *);
81
+ PyAPI_FUNC(int) PyFunction_SetClosure(PyObject *, PyObject *);
82
+ PyAPI_FUNC(PyObject *) PyFunction_GetAnnotations(PyObject *);
83
+ PyAPI_FUNC(int) PyFunction_SetAnnotations(PyObject *, PyObject *);
84
+
85
+ #define _PyFunction_CAST(func) \
86
+ (assert(PyFunction_Check(func)), _Py_CAST(PyFunctionObject*, func))
87
+
88
+ /* Static inline functions for direct access to these values.
89
+ Type checks are *not* done, so use with care. */
90
+ static inline PyObject* PyFunction_GET_CODE(PyObject *func) {
91
+ return _PyFunction_CAST(func)->func_code;
92
+ }
93
+ #define PyFunction_GET_CODE(func) PyFunction_GET_CODE(_PyObject_CAST(func))
94
+
95
+ static inline PyObject* PyFunction_GET_GLOBALS(PyObject *func) {
96
+ return _PyFunction_CAST(func)->func_globals;
97
+ }
98
+ #define PyFunction_GET_GLOBALS(func) PyFunction_GET_GLOBALS(_PyObject_CAST(func))
99
+
100
+ static inline PyObject* PyFunction_GET_MODULE(PyObject *func) {
101
+ return _PyFunction_CAST(func)->func_module;
102
+ }
103
+ #define PyFunction_GET_MODULE(func) PyFunction_GET_MODULE(_PyObject_CAST(func))
104
+
105
+ static inline PyObject* PyFunction_GET_DEFAULTS(PyObject *func) {
106
+ return _PyFunction_CAST(func)->func_defaults;
107
+ }
108
+ #define PyFunction_GET_DEFAULTS(func) PyFunction_GET_DEFAULTS(_PyObject_CAST(func))
109
+
110
+ static inline PyObject* PyFunction_GET_KW_DEFAULTS(PyObject *func) {
111
+ return _PyFunction_CAST(func)->func_kwdefaults;
112
+ }
113
+ #define PyFunction_GET_KW_DEFAULTS(func) PyFunction_GET_KW_DEFAULTS(_PyObject_CAST(func))
114
+
115
+ static inline PyObject* PyFunction_GET_CLOSURE(PyObject *func) {
116
+ return _PyFunction_CAST(func)->func_closure;
117
+ }
118
+ #define PyFunction_GET_CLOSURE(func) PyFunction_GET_CLOSURE(_PyObject_CAST(func))
119
+
120
+ static inline PyObject* PyFunction_GET_ANNOTATIONS(PyObject *func) {
121
+ return _PyFunction_CAST(func)->func_annotations;
122
+ }
123
+ #define PyFunction_GET_ANNOTATIONS(func) PyFunction_GET_ANNOTATIONS(_PyObject_CAST(func))
124
+
125
+ /* The classmethod and staticmethod types lives here, too */
126
+ PyAPI_DATA(PyTypeObject) PyClassMethod_Type;
127
+ PyAPI_DATA(PyTypeObject) PyStaticMethod_Type;
128
+
129
+ PyAPI_FUNC(PyObject *) PyClassMethod_New(PyObject *);
130
+ PyAPI_FUNC(PyObject *) PyStaticMethod_New(PyObject *);
131
+
132
+ #define PY_FOREACH_FUNC_EVENT(V) \
133
+ V(CREATE) \
134
+ V(DESTROY) \
135
+ V(MODIFY_CODE) \
136
+ V(MODIFY_DEFAULTS) \
137
+ V(MODIFY_KWDEFAULTS)
138
+
139
+ typedef enum {
140
+ #define PY_DEF_EVENT(EVENT) PyFunction_EVENT_##EVENT,
141
+ PY_FOREACH_FUNC_EVENT(PY_DEF_EVENT)
142
+ #undef PY_DEF_EVENT
143
+ } PyFunction_WatchEvent;
144
+
145
+ /*
146
+ * A callback that is invoked for different events in a function's lifecycle.
147
+ *
148
+ * The callback is invoked with a borrowed reference to func, after it is
149
+ * created and before it is modified or destroyed. The callback should not
150
+ * modify func.
151
+ *
152
+ * When a function's code object, defaults, or kwdefaults are modified the
153
+ * callback will be invoked with the respective event and new_value will
154
+ * contain a borrowed reference to the new value that is about to be stored in
155
+ * the function. Otherwise the third argument is NULL.
156
+ *
157
+ * If the callback returns with an exception set, it must return -1. Otherwise
158
+ * it should return 0.
159
+ */
160
+ typedef int (*PyFunction_WatchCallback)(
161
+ PyFunction_WatchEvent event,
162
+ PyFunctionObject *func,
163
+ PyObject *new_value);
164
+
165
+ /*
166
+ * Register a per-interpreter callback that will be invoked for function lifecycle
167
+ * events.
168
+ *
169
+ * Returns a handle that may be passed to PyFunction_ClearWatcher on success,
170
+ * or -1 and sets an error if no more handles are available.
171
+ */
172
+ PyAPI_FUNC(int) PyFunction_AddWatcher(PyFunction_WatchCallback callback);
173
+
174
+ /*
175
+ * Clear the watcher associated with the watcher_id handle.
176
+ *
177
+ * Returns 0 on success or -1 if no watcher exists for the supplied id.
178
+ */
179
+ PyAPI_FUNC(int) PyFunction_ClearWatcher(int watcher_id);
180
+
181
+ #ifdef __cplusplus
182
+ }
183
+ #endif
184
+ #endif /* !Py_FUNCOBJECT_H */
185
+ #endif /* Py_LIMITED_API */
@@ -0,0 +1,56 @@
1
+ /* Generator object interface */
2
+
3
+ #ifndef Py_LIMITED_API
4
+ #ifndef Py_GENOBJECT_H
5
+ #define Py_GENOBJECT_H
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ /* --- Generators --------------------------------------------------------- */
11
+
12
+ typedef struct _PyGenObject PyGenObject;
13
+
14
+ PyAPI_DATA(PyTypeObject) PyGen_Type;
15
+
16
+ #define PyGen_Check(op) PyObject_TypeCheck((op), &PyGen_Type)
17
+ #define PyGen_CheckExact(op) Py_IS_TYPE((op), &PyGen_Type)
18
+
19
+ PyAPI_FUNC(PyObject *) PyGen_New(PyFrameObject *);
20
+ PyAPI_FUNC(PyObject *) PyGen_NewWithQualName(PyFrameObject *,
21
+ PyObject *name, PyObject *qualname);
22
+ PyAPI_FUNC(PyCodeObject *) PyGen_GetCode(PyGenObject *gen);
23
+
24
+
25
+ /* --- PyCoroObject ------------------------------------------------------- */
26
+
27
+ typedef struct _PyCoroObject PyCoroObject;
28
+
29
+ PyAPI_DATA(PyTypeObject) PyCoro_Type;
30
+
31
+ #define PyCoro_CheckExact(op) Py_IS_TYPE((op), &PyCoro_Type)
32
+ PyAPI_FUNC(PyObject *) PyCoro_New(PyFrameObject *,
33
+ PyObject *name, PyObject *qualname);
34
+
35
+
36
+ /* --- Asynchronous Generators -------------------------------------------- */
37
+
38
+ typedef struct _PyAsyncGenObject PyAsyncGenObject;
39
+
40
+ PyAPI_DATA(PyTypeObject) PyAsyncGen_Type;
41
+ PyAPI_DATA(PyTypeObject) _PyAsyncGenASend_Type;
42
+
43
+ PyAPI_FUNC(PyObject *) PyAsyncGen_New(PyFrameObject *,
44
+ PyObject *name, PyObject *qualname);
45
+
46
+ #define PyAsyncGen_CheckExact(op) Py_IS_TYPE((op), &PyAsyncGen_Type)
47
+
48
+ #define PyAsyncGenASend_CheckExact(op) Py_IS_TYPE((op), &_PyAsyncGenASend_Type)
49
+
50
+ #undef _PyGenObject_HEAD
51
+
52
+ #ifdef __cplusplus
53
+ }
54
+ #endif
55
+ #endif /* !Py_GENOBJECT_H */
56
+ #endif /* Py_LIMITED_API */
@@ -0,0 +1,30 @@
1
+ #ifndef Py_CPYTHON_IMPORT_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ struct _inittab {
6
+ const char *name; /* ASCII encoded string */
7
+ PyObject* (*initfunc)(void);
8
+ };
9
+ // This is not used after Py_Initialize() is called.
10
+ PyAPI_DATA(struct _inittab *) PyImport_Inittab;
11
+ PyAPI_FUNC(int) PyImport_ExtendInittab(struct _inittab *newtab);
12
+
13
+ struct _frozen {
14
+ const char *name; /* ASCII encoded string */
15
+ const unsigned char *code;
16
+ int size;
17
+ int is_package;
18
+ };
19
+
20
+ /* Embedding apps may change this pointer to point to their favorite
21
+ collection of frozen modules: */
22
+
23
+ PyAPI_DATA(const struct _frozen *) PyImport_FrozenModules;
24
+
25
+ PyAPI_FUNC(PyObject*) PyImport_ImportModuleAttr(
26
+ PyObject *mod_name,
27
+ PyObject *attr_name);
28
+ PyAPI_FUNC(PyObject*) PyImport_ImportModuleAttrString(
29
+ const char *mod_name,
30
+ const char *attr_name);
@@ -0,0 +1,334 @@
1
+ #ifndef Py_PYCORECONFIG_H
2
+ #define Py_PYCORECONFIG_H
3
+ #ifndef Py_LIMITED_API
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ /* --- PyStatus ----------------------------------------------- */
9
+
10
+ typedef struct {
11
+ enum {
12
+ _PyStatus_TYPE_OK=0,
13
+ _PyStatus_TYPE_ERROR=1,
14
+ _PyStatus_TYPE_EXIT=2
15
+ } _type;
16
+ const char *func;
17
+ const char *err_msg;
18
+ int exitcode;
19
+ } PyStatus;
20
+
21
+ PyAPI_FUNC(PyStatus) PyStatus_Ok(void);
22
+ PyAPI_FUNC(PyStatus) PyStatus_Error(const char *err_msg);
23
+ PyAPI_FUNC(PyStatus) PyStatus_NoMemory(void);
24
+ PyAPI_FUNC(PyStatus) PyStatus_Exit(int exitcode);
25
+ PyAPI_FUNC(int) PyStatus_IsError(PyStatus err);
26
+ PyAPI_FUNC(int) PyStatus_IsExit(PyStatus err);
27
+ PyAPI_FUNC(int) PyStatus_Exception(PyStatus err);
28
+
29
+ /* --- PyWideStringList ------------------------------------------------ */
30
+
31
+ typedef struct {
32
+ /* If length is greater than zero, items must be non-NULL
33
+ and all items strings must be non-NULL */
34
+ Py_ssize_t length;
35
+ wchar_t **items;
36
+ } PyWideStringList;
37
+
38
+ PyAPI_FUNC(PyStatus) PyWideStringList_Append(PyWideStringList *list,
39
+ const wchar_t *item);
40
+ PyAPI_FUNC(PyStatus) PyWideStringList_Insert(PyWideStringList *list,
41
+ Py_ssize_t index,
42
+ const wchar_t *item);
43
+
44
+
45
+ /* --- PyPreConfig ----------------------------------------------- */
46
+
47
+ typedef struct PyPreConfig {
48
+ int _config_init; /* _PyConfigInitEnum value */
49
+
50
+ /* Parse Py_PreInitializeFromBytesArgs() arguments?
51
+ See PyConfig.parse_argv */
52
+ int parse_argv;
53
+
54
+ /* If greater than 0, enable isolated mode: sys.path contains
55
+ neither the script's directory nor the user's site-packages directory.
56
+
57
+ Set to 1 by the -I command line option. If set to -1 (default), inherit
58
+ Py_IsolatedFlag value. */
59
+ int isolated;
60
+
61
+ /* If greater than 0: use environment variables.
62
+ Set to 0 by -E command line option. If set to -1 (default), it is
63
+ set to !Py_IgnoreEnvironmentFlag. */
64
+ int use_environment;
65
+
66
+ /* Set the LC_CTYPE locale to the user preferred locale? If equals to 0,
67
+ set coerce_c_locale and coerce_c_locale_warn to 0. */
68
+ int configure_locale;
69
+
70
+ /* Coerce the LC_CTYPE locale if it's equal to "C"? (PEP 538)
71
+
72
+ Set to 0 by PYTHONCOERCECLOCALE=0. Set to 1 by PYTHONCOERCECLOCALE=1.
73
+ Set to 2 if the user preferred LC_CTYPE locale is "C".
74
+
75
+ If it is equal to 1, LC_CTYPE locale is read to decide if it should be
76
+ coerced or not (ex: PYTHONCOERCECLOCALE=1). Internally, it is set to 2
77
+ if the LC_CTYPE locale must be coerced.
78
+
79
+ Disable by default (set to 0). Set it to -1 to let Python decide if it
80
+ should be enabled or not. */
81
+ int coerce_c_locale;
82
+
83
+ /* Emit a warning if the LC_CTYPE locale is coerced?
84
+
85
+ Set to 1 by PYTHONCOERCECLOCALE=warn.
86
+
87
+ Disable by default (set to 0). Set it to -1 to let Python decide if it
88
+ should be enabled or not. */
89
+ int coerce_c_locale_warn;
90
+
91
+ #ifdef MS_WINDOWS
92
+ /* If greater than 1, use the "mbcs" encoding instead of the UTF-8
93
+ encoding for the filesystem encoding.
94
+
95
+ Set to 1 if the PYTHONLEGACYWINDOWSFSENCODING environment variable is
96
+ set to a non-empty string. If set to -1 (default), inherit
97
+ Py_LegacyWindowsFSEncodingFlag value.
98
+
99
+ See PEP 529 for more details. */
100
+ int legacy_windows_fs_encoding;
101
+ #endif
102
+
103
+ /* Enable UTF-8 mode? (PEP 540)
104
+
105
+ Disabled by default (equals to 0).
106
+
107
+ Set to 1 by "-X utf8" and "-X utf8=1" command line options.
108
+ Set to 1 by PYTHONUTF8=1 environment variable.
109
+
110
+ Set to 0 by "-X utf8=0" and PYTHONUTF8=0.
111
+
112
+ If equals to -1, it is set to 1 if the LC_CTYPE locale is "C" or
113
+ "POSIX", otherwise it is set to 0. Inherit Py_UTF8Mode value value. */
114
+ int utf8_mode;
115
+
116
+ /* If non-zero, enable the Python Development Mode.
117
+
118
+ Set to 1 by the -X dev command line option. Set by the PYTHONDEVMODE
119
+ environment variable. */
120
+ int dev_mode;
121
+
122
+ /* Memory allocator: PYTHONMALLOC env var.
123
+ See PyMemAllocatorName for valid values. */
124
+ int allocator;
125
+ } PyPreConfig;
126
+
127
+ PyAPI_FUNC(void) PyPreConfig_InitPythonConfig(PyPreConfig *config);
128
+ PyAPI_FUNC(void) PyPreConfig_InitIsolatedConfig(PyPreConfig *config);
129
+
130
+
131
+ /* --- PyConfig ---------------------------------------------- */
132
+
133
+ /* This structure is best documented in the Doc/c-api/init_config.rst file. */
134
+ typedef struct PyConfig {
135
+ int _config_init; /* _PyConfigInitEnum value */
136
+
137
+ int isolated;
138
+ int use_environment;
139
+ int dev_mode;
140
+ int install_signal_handlers;
141
+ int use_hash_seed;
142
+ unsigned long hash_seed;
143
+ int faulthandler;
144
+ int tracemalloc;
145
+ int perf_profiling;
146
+ int remote_debug;
147
+ int import_time;
148
+ int code_debug_ranges;
149
+ int show_ref_count;
150
+ int dump_refs;
151
+ wchar_t *dump_refs_file;
152
+ int malloc_stats;
153
+ wchar_t *filesystem_encoding;
154
+ wchar_t *filesystem_errors;
155
+ wchar_t *pycache_prefix;
156
+ int parse_argv;
157
+ PyWideStringList orig_argv;
158
+ PyWideStringList argv;
159
+ PyWideStringList xoptions;
160
+ PyWideStringList warnoptions;
161
+ int site_import;
162
+ int bytes_warning;
163
+ int warn_default_encoding;
164
+ int inspect;
165
+ int interactive;
166
+ int optimization_level;
167
+ int parser_debug;
168
+ int write_bytecode;
169
+ int verbose;
170
+ int quiet;
171
+ int user_site_directory;
172
+ int configure_c_stdio;
173
+ int buffered_stdio;
174
+ wchar_t *stdio_encoding;
175
+ wchar_t *stdio_errors;
176
+ #ifdef MS_WINDOWS
177
+ int legacy_windows_stdio;
178
+ #endif
179
+ wchar_t *check_hash_pycs_mode;
180
+ int use_frozen_modules;
181
+ int safe_path;
182
+ int int_max_str_digits;
183
+ int thread_inherit_context;
184
+ int context_aware_warnings;
185
+ #ifdef __APPLE__
186
+ int use_system_logger;
187
+ #endif
188
+
189
+ int cpu_count;
190
+ #ifdef Py_GIL_DISABLED
191
+ int enable_gil;
192
+ int tlbc_enabled;
193
+ #endif
194
+
195
+ /* --- Path configuration inputs ------------ */
196
+ int pathconfig_warnings;
197
+ wchar_t *program_name;
198
+ wchar_t *pythonpath_env;
199
+ wchar_t *home;
200
+ wchar_t *platlibdir;
201
+
202
+ /* --- Path configuration outputs ----------- */
203
+ int module_search_paths_set;
204
+ PyWideStringList module_search_paths;
205
+ wchar_t *stdlib_dir;
206
+ wchar_t *executable;
207
+ wchar_t *base_executable;
208
+ wchar_t *prefix;
209
+ wchar_t *base_prefix;
210
+ wchar_t *exec_prefix;
211
+ wchar_t *base_exec_prefix;
212
+
213
+ /* --- Parameter only used by Py_Main() ---------- */
214
+ int skip_source_first_line;
215
+ wchar_t *run_command;
216
+ wchar_t *run_module;
217
+ wchar_t *run_filename;
218
+
219
+ /* --- Set by Py_Main() -------------------------- */
220
+ wchar_t *sys_path_0;
221
+
222
+ /* --- Private fields ---------------------------- */
223
+
224
+ // Install importlib? If equals to 0, importlib is not initialized at all.
225
+ // Needed by freeze_importlib.
226
+ int _install_importlib;
227
+
228
+ // If equal to 0, stop Python initialization before the "main" phase.
229
+ int _init_main;
230
+
231
+ // If non-zero, we believe we're running from a source tree.
232
+ int _is_python_build;
233
+
234
+ #ifdef Py_STATS
235
+ // If non-zero, turns on statistics gathering.
236
+ int _pystats;
237
+ #endif
238
+
239
+ #ifdef Py_DEBUG
240
+ // If not empty, import a non-__main__ module before site.py is executed.
241
+ // PYTHON_PRESITE=package.module or -X presite=package.module
242
+ wchar_t *run_presite;
243
+ #endif
244
+ } PyConfig;
245
+
246
+ PyAPI_FUNC(void) PyConfig_InitPythonConfig(PyConfig *config);
247
+ PyAPI_FUNC(void) PyConfig_InitIsolatedConfig(PyConfig *config);
248
+ PyAPI_FUNC(void) PyConfig_Clear(PyConfig *);
249
+ PyAPI_FUNC(PyStatus) PyConfig_SetString(
250
+ PyConfig *config,
251
+ wchar_t **config_str,
252
+ const wchar_t *str);
253
+ PyAPI_FUNC(PyStatus) PyConfig_SetBytesString(
254
+ PyConfig *config,
255
+ wchar_t **config_str,
256
+ const char *str);
257
+ PyAPI_FUNC(PyStatus) PyConfig_Read(PyConfig *config);
258
+ PyAPI_FUNC(PyStatus) PyConfig_SetBytesArgv(
259
+ PyConfig *config,
260
+ Py_ssize_t argc,
261
+ char * const *argv);
262
+ PyAPI_FUNC(PyStatus) PyConfig_SetArgv(PyConfig *config,
263
+ Py_ssize_t argc,
264
+ wchar_t * const *argv);
265
+ PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
266
+ PyWideStringList *list,
267
+ Py_ssize_t length, wchar_t **items);
268
+
269
+
270
+ /* --- PyConfig_Get() ----------------------------------------- */
271
+
272
+ PyAPI_FUNC(PyObject*) PyConfig_Get(const char *name);
273
+ PyAPI_FUNC(int) PyConfig_GetInt(const char *name, int *value);
274
+ PyAPI_FUNC(PyObject*) PyConfig_Names(void);
275
+ PyAPI_FUNC(int) PyConfig_Set(const char *name, PyObject *value);
276
+
277
+
278
+ /* --- Helper functions --------------------------------------- */
279
+
280
+ /* Get the original command line arguments, before Python modified them.
281
+
282
+ See also PyConfig.orig_argv. */
283
+ PyAPI_FUNC(void) Py_GetArgcArgv(int *argc, wchar_t ***argv);
284
+
285
+
286
+ // --- PyInitConfig ---------------------------------------------------------
287
+
288
+ typedef struct PyInitConfig PyInitConfig;
289
+
290
+ PyAPI_FUNC(PyInitConfig*) PyInitConfig_Create(void);
291
+ PyAPI_FUNC(void) PyInitConfig_Free(PyInitConfig *config);
292
+
293
+ PyAPI_FUNC(int) PyInitConfig_GetError(PyInitConfig* config,
294
+ const char **err_msg);
295
+ PyAPI_FUNC(int) PyInitConfig_GetExitCode(PyInitConfig* config,
296
+ int *exitcode);
297
+
298
+ PyAPI_FUNC(int) PyInitConfig_HasOption(PyInitConfig *config,
299
+ const char *name);
300
+ PyAPI_FUNC(int) PyInitConfig_GetInt(PyInitConfig *config,
301
+ const char *name,
302
+ int64_t *value);
303
+ PyAPI_FUNC(int) PyInitConfig_GetStr(PyInitConfig *config,
304
+ const char *name,
305
+ char **value);
306
+ PyAPI_FUNC(int) PyInitConfig_GetStrList(PyInitConfig *config,
307
+ const char *name,
308
+ size_t *length,
309
+ char ***items);
310
+ PyAPI_FUNC(void) PyInitConfig_FreeStrList(size_t length, char **items);
311
+
312
+ PyAPI_FUNC(int) PyInitConfig_SetInt(PyInitConfig *config,
313
+ const char *name,
314
+ int64_t value);
315
+ PyAPI_FUNC(int) PyInitConfig_SetStr(PyInitConfig *config,
316
+ const char *name,
317
+ const char *value);
318
+ PyAPI_FUNC(int) PyInitConfig_SetStrList(PyInitConfig *config,
319
+ const char *name,
320
+ size_t length,
321
+ char * const *items);
322
+
323
+ PyAPI_FUNC(int) PyInitConfig_AddModule(PyInitConfig *config,
324
+ const char *name,
325
+ PyObject* (*initfunc)(void));
326
+
327
+ PyAPI_FUNC(int) Py_InitializeFromInitConfig(PyInitConfig *config);
328
+
329
+
330
+ #ifdef __cplusplus
331
+ }
332
+ #endif
333
+ #endif /* !Py_LIMITED_API */
334
+ #endif /* !Py_PYCORECONFIG_H */
@@ -0,0 +1,53 @@
1
+ #ifndef Py_CPYTHON_LISTOBJECT_H
2
+ # error "this header file must not be included directly"
3
+ #endif
4
+
5
+ typedef struct {
6
+ PyObject_VAR_HEAD
7
+ /* Vector of pointers to list elements. list[0] is ob_item[0], etc. */
8
+ PyObject **ob_item;
9
+
10
+ /* ob_item contains space for 'allocated' elements. The number
11
+ * currently in use is ob_size.
12
+ * Invariants:
13
+ * 0 <= ob_size <= allocated
14
+ * len(list) == ob_size
15
+ * ob_item == NULL implies ob_size == allocated == 0
16
+ * list.sort() temporarily sets allocated to -1 to detect mutations.
17
+ *
18
+ * Items must normally not be NULL, except during construction when
19
+ * the list is not yet visible outside the function that builds it.
20
+ */
21
+ Py_ssize_t allocated;
22
+ } PyListObject;
23
+
24
+ /* Cast argument to PyListObject* type. */
25
+ #define _PyList_CAST(op) \
26
+ (assert(PyList_Check(op)), _Py_CAST(PyListObject*, (op)))
27
+
28
+ // Macros and static inline functions, trading safety for speed
29
+
30
+ static inline Py_ssize_t PyList_GET_SIZE(PyObject *op) {
31
+ PyListObject *list = _PyList_CAST(op);
32
+ #ifdef Py_GIL_DISABLED
33
+ return _Py_atomic_load_ssize_relaxed(&(_PyVarObject_CAST(list)->ob_size));
34
+ #else
35
+ return Py_SIZE(list);
36
+ #endif
37
+ }
38
+ #define PyList_GET_SIZE(op) PyList_GET_SIZE(_PyObject_CAST(op))
39
+
40
+ #define PyList_GET_ITEM(op, index) (_PyList_CAST(op)->ob_item[(index)])
41
+
42
+ static inline void
43
+ PyList_SET_ITEM(PyObject *op, Py_ssize_t index, PyObject *value) {
44
+ PyListObject *list = _PyList_CAST(op);
45
+ assert(0 <= index);
46
+ assert(index < list->allocated);
47
+ list->ob_item[index] = value;
48
+ }
49
+ #define PyList_SET_ITEM(op, index, value) \
50
+ PyList_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))
51
+
52
+ PyAPI_FUNC(int) PyList_Extend(PyObject *self, PyObject *iterable);
53
+ PyAPI_FUNC(int) PyList_Clear(PyObject *self);