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.
- pytron/__init__.py +112 -0
- pytron/application.py +562 -0
- pytron/apputils/__init__.py +0 -0
- pytron/apputils/chrome_ipc.py +203 -0
- pytron/apputils/codegen.py +261 -0
- pytron/apputils/config.py +303 -0
- pytron/apputils/deadmansswitch.py +47 -0
- pytron/apputils/extras.py +76 -0
- pytron/apputils/native.py +148 -0
- pytron/apputils/shell.py +73 -0
- pytron/apputils/windows.py +286 -0
- pytron/cli.py +384 -0
- pytron/commands/__init__.py +0 -0
- pytron/commands/android.py +28 -0
- pytron/commands/build.py +26 -0
- pytron/commands/doctor.py +221 -0
- pytron/commands/engine.py +23 -0
- pytron/commands/frontend.py +60 -0
- pytron/commands/harvest.py +112 -0
- pytron/commands/helpers.py +239 -0
- pytron/commands/info.py +50 -0
- pytron/commands/init.py +521 -0
- pytron/commands/install.py +294 -0
- pytron/commands/login.py +130 -0
- pytron/commands/package.py +228 -0
- pytron/commands/plugin.py +442 -0
- pytron/commands/run.py +312 -0
- pytron/commands/scan.py +210 -0
- pytron/commands/show.py +23 -0
- pytron/commands/uninstall.py +150 -0
- pytron/commands/utils.py +42 -0
- pytron/commands/workflow.py +95 -0
- pytron/console.py +133 -0
- pytron/core.py +18 -0
- pytron/dependencies/WebView2Loader.dll +0 -0
- pytron/dependencies/__init__.py +1 -0
- pytron/dependencies/pytron_native.so +0 -0
- pytron/engines/chrome/adapter.py +445 -0
- pytron/engines/chrome/engine.py +576 -0
- pytron/engines/chrome/forge.py +147 -0
- pytron/engines/chrome/shell/package.json +8 -0
- pytron/engines/chrome/shell/preload.js +12 -0
- pytron/engines/chrome/shell/shell.js +534 -0
- pytron/exceptions.py +36 -0
- pytron/inspector.py +201 -0
- pytron/inspector_ui.py +512 -0
- pytron/installer/Installation.nsi +236 -0
- pytron/installer/header.bmp +0 -0
- pytron/installer/pytron.ico +0 -0
- pytron/installer/sidebar.bmp +0 -0
- pytron/llms.md +98 -0
- pytron/manifests/README.md +29 -0
- pytron/manifests/windows-utf8.manifest +44 -0
- pytron/menu.py +128 -0
- pytron/nsis-setup.exe +0 -0
- pytron/pack/__init__.py +0 -0
- pytron/pack/assets.py +131 -0
- pytron/pack/compilers.py +289 -0
- pytron/pack/crystal.py +297 -0
- pytron/pack/graph.py +377 -0
- pytron/pack/inference.py +157 -0
- pytron/pack/installers.py +402 -0
- pytron/pack/introspect.py +357 -0
- pytron/pack/metadata.py +213 -0
- pytron/pack/modules.py +618 -0
- pytron/pack/nuitka.py +108 -0
- pytron/pack/pipeline.py +107 -0
- pytron/pack/pyinstaller.py +176 -0
- pytron/pack/rust_engine.py +273 -0
- pytron/pack/secure.py +309 -0
- pytron/pack/secure_loader/bin/pytron_rust_bootloader +0 -0
- pytron/pack/secure_loader/icon.ico +0 -0
- pytron/pack/utils.py +110 -0
- pytron/pack/virtual_root.py +124 -0
- pytron/platforms/__init__.py +0 -0
- pytron/platforms/android/__init__.py +3 -0
- pytron/platforms/android/android.py +103 -0
- pytron/platforms/android/builder.py +736 -0
- pytron/platforms/android/ops/build.py +79 -0
- pytron/platforms/android/ops/init.py +63 -0
- pytron/platforms/android/ops/run.py +79 -0
- pytron/platforms/android/ops/sync.py +770 -0
- pytron/platforms/android/ops/utils.py +8 -0
- pytron/platforms/android/shell/README.md +30 -0
- pytron/platforms/android/shell/app/build.gradle +64 -0
- pytron/platforms/android/shell/app/src/main/AndroidManifest.xml +29 -0
- pytron/platforms/android/shell/app/src/main/assets/python/main.py +86 -0
- pytron/platforms/android/shell/app/src/main/assets/python/python314.zip +0 -0
- pytron/platforms/android/shell/app/src/main/cpp/CMakeLists.txt +25 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/Python.h +155 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/abstract.h +915 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/audit.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/bltinmodule.h +14 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/boolobject.h +54 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/bytearrayobject.h +44 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/bytesobject.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/ceval.h +145 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/codecs.h +176 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/compile.h +22 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/complexobject.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/abstract.h +104 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/audit.h +8 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytearrayobject.h +38 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/bytesobject.h +42 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/cellobject.h +50 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/ceval.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/classobject.h +71 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/code.h +340 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/compile.h +50 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/complexobject.h +33 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/context.h +107 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/critical_section.h +154 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/descrobject.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/dictobject.h +105 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileobject.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/fileutils.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/floatobject.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/frameobject.h +35 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/funcobject.h +185 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/genobject.h +56 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/import.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/initconfig.h +334 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/listobject.h +53 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/lock.h +74 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longintrepr.h +184 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/longobject.h +89 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/memoryobject.h +50 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/methodobject.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/modsupport.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/monitoring.h +269 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/object.h +493 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/objimpl.h +104 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/odictobject.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/picklebufobject.h +31 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pthread_stubs.h +105 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic.h +614 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_gcc.h +615 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_msc.h +1197 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyatomic_std.h +1112 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyctype.h +39 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pydebug.h +38 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyerrors.h +132 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyfpe.h +15 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyframe.h +45 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pyhash.h +54 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pylifecycle.h +89 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pymem.h +84 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystate.h +275 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pystats.h +194 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythonrun.h +96 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pythread.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/pytime.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/setobject.h +71 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/traceback.h +13 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tracemalloc.h +32 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/tupleobject.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/unicodeobject.h +773 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/warnings.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/cpython/weakrefobject.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/critical_section.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/datetime.h +267 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/descrobject.h +100 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/dictobject.h +108 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/dynamic_annotations.h +499 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/enumobject.h +17 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/errcode.h +45 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/exports.h +105 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/fileobject.h +41 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/fileutils.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/floatobject.h +54 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/frameobject.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/genericaliasobject.h +14 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/import.h +103 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/atomic.h +392 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/internal.h +969 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/prim.h +329 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/track.h +147 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc/types.h +721 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/mimalloc/mimalloc.h +565 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_abstract.h +61 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_asdl.h +112 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast.h +945 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ast_state.h +271 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_atexit.h +31 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_audit.h +35 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_backoff.h +133 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bitutils.h +186 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_blocks_output_buffer.h +321 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_brc.h +73 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytes_methods.h +82 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_bytesobject.h +149 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_c_array.h +39 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_call.h +206 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_capsule.h +17 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_cell.h +75 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval.h +390 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ceval_state.h +48 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_code.h +671 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_codecs.h +76 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_compile.h +230 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_complexobject.h +34 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_condvar.h +93 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_context.h +59 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_critical_section.h +237 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp.h +406 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_crossinterp_data_registry.h +41 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_debug_offsets.h +379 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_descrobject.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict.h +410 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dict_state.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_dtoa.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_signal.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_emscripten_trampoline.h +70 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_exceptions.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_faulthandler.h +100 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils.h +320 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_fileutils_windows.h +98 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_floatobject.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_flowgraph.h +47 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_format.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_frame.h +61 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist.h +111 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_freelist_state.h +70 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_function.h +53 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gc.h +378 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_genobject.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_getopt.h +22 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_gil.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects.h +34 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_objects_fini_generated.h +1592 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_global_strings.h +854 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hamt.h +113 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_hashtable.h +150 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_import.h +141 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_importdl.h +139 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_index_pool.h +36 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_initconfig.h +197 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruction_sequence.h +83 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_instruments.h +127 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp.h +109 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interp_structs.h +977 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe.h +401 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpframe_structs.h +95 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_interpolation.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_intrinsics.h +51 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_jit.h +29 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_list.h +81 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_llist.h +106 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_lock.h +236 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_long.h +319 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_magic_number.h +305 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_memoryobject.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_mimalloc.h +69 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_modsupport.h +99 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_moduleobject.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_namespace.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object.h +1029 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_alloc.h +71 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_deferred.h +32 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_stack.h +95 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_object_state.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc.h +702 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_obmalloc_init.h +66 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_metadata.h +2117 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_opcode_utils.h +90 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_optimizer.h +318 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parking_lot.h +97 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_parser.h +78 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pathconfig.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyarena.h +68 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyatomic_ft_wrappers.h +174 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pybuffer.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyerrors.h +213 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pyhash.h +91 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pylifecycle.h +136 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymath.h +205 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem.h +145 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pymem_init.h +103 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystate.h +339 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pystats.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythonrun.h +68 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_pythread.h +172 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_qsbr.h +172 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_range.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime.h +63 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init.h +239 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_init_generated.h +1589 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_runtime_structs.h +310 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_semaphore.h +67 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_setobject.h +41 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_signal.h +108 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sliceobject.h +20 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stackref.h +791 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_stats.h +97 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_strhex.h +39 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structs.h +88 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_structseq.h +40 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_symtable.h +201 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_sysmodule.h +32 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_template.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_time.h +334 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_token.h +110 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_traceback.h +111 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tracemalloc.h +164 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tstate.h +88 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_tuple.h +75 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typedefs.h +18 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typeobject.h +155 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_typevarobject.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_ucnhash.h +36 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject.h +308 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unicodeobject_generated.h +3132 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_unionobject.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uniqueid.h +57 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_ids.h +335 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_uop_metadata.h +1204 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_warnings.h +21 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/internal/pycore_weakref.h +133 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/intrcheck.h +23 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/iterobject.h +24 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/listobject.h +55 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/lock.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/longobject.h +178 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/marshal.h +31 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/memoryobject.h +34 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/methodobject.h +146 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/modsupport.h +146 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/moduleobject.h +122 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/monitoring.h +18 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/object.h +828 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/objimpl.h +211 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/opcode.h +43 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/opcode_ids.h +259 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/osdefs.h +57 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/osmodule.h +17 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/patchlevel.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/py_curses.h +117 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyatomic.h +16 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pybuffer.h +145 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pycapsule.h +58 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyconfig.h +2088 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pydtrace.h +59 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyerrors.h +335 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyexpat.h +62 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyframe.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyhash.h +59 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pylifecycle.h +80 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymacconfig.h +91 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymacro.h +243 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymath.h +65 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pymem.h +110 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pyport.h +710 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystate.h +132 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystats.h +28 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystrcmp.h +23 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pystrtod.h +37 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pythonrun.h +42 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pythread.h +131 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/pytypedefs.h +30 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/rangeobject.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/refcount.h +555 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/setobject.h +49 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/sliceobject.h +69 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/structmember.h +56 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/structseq.h +46 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/sysmodule.h +27 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/traceback.h +26 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/tupleobject.h +46 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/typeslots.h +96 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/unicodeobject.h +1029 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/warnings.h +45 -0
- pytron/platforms/android/shell/app/src/main/cpp/include/weakrefobject.h +46 -0
- pytron/platforms/android/shell/app/src/main/cpp/pytron_bridge.cpp +224 -0
- pytron/platforms/android/shell/app/src/main/java/com/pytron/shell/MainActivity.kt +208 -0
- pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- pytron/platforms/android/shell/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- pytron/platforms/android/shell/build.gradle +11 -0
- pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.jar +0 -0
- pytron/platforms/android/shell/gradle/wrapper/gradle-wrapper.properties +5 -0
- pytron/platforms/android/shell/gradle.properties +2 -0
- pytron/platforms/android/shell/gradlew.bat +85 -0
- pytron/platforms/android/shell/settings.gradle +16 -0
- pytron/platforms/darwin.py +82 -0
- pytron/platforms/darwin_ops/libs.py +31 -0
- pytron/platforms/darwin_ops/system.py +182 -0
- pytron/platforms/darwin_ops/utils.py +85 -0
- pytron/platforms/darwin_ops/webview.py +5 -0
- pytron/platforms/darwin_ops/window.py +102 -0
- pytron/platforms/interface.py +152 -0
- pytron/platforms/linux.py +82 -0
- pytron/platforms/linux_ops/libs.py +49 -0
- pytron/platforms/linux_ops/system.py +316 -0
- pytron/platforms/linux_ops/utils.py +19 -0
- pytron/platforms/linux_ops/webview.py +5 -0
- pytron/platforms/linux_ops/window.py +115 -0
- pytron/platforms/windows.py +136 -0
- pytron/platforms/windows_ops/__init__.py +0 -0
- pytron/platforms/windows_ops/constants.py +126 -0
- pytron/platforms/windows_ops/system.py +518 -0
- pytron/platforms/windows_ops/utils.py +3 -0
- pytron/platforms/windows_ops/webview.py +5 -0
- pytron/platforms/windows_ops/window.py +361 -0
- pytron/plugin.py +467 -0
- pytron/rcedit-x64.exe +0 -0
- pytron/router.py +146 -0
- pytron/serializer.py +240 -0
- pytron/shortcuts.py +279 -0
- pytron/state.py +76 -0
- pytron/tray.py +399 -0
- pytron/updater.py +181 -0
- pytron/utf8_hook.py +112 -0
- pytron/utils.py +44 -0
- pytron/webview.py +722 -0
- pytron_kit-0.3.12.dist-info/METADATA +131 -0
- pytron_kit-0.3.12.dist-info/RECORD +419 -0
- pytron_kit-0.3.12.dist-info/WHEEL +5 -0
- pytron_kit-0.3.12.dist-info/entry_points.txt +2 -0
- pytron_kit-0.3.12.dist-info/licenses/LICENSE +201 -0
- pytron_kit-0.3.12.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
// Internal PyTime_t C API: see Doc/c-api/time.rst for the documentation.
|
|
2
|
+
//
|
|
3
|
+
// The PyTime_t type is an integer to support directly common arithmetic
|
|
4
|
+
// operations such as t1 + t2.
|
|
5
|
+
//
|
|
6
|
+
// Time formats:
|
|
7
|
+
//
|
|
8
|
+
// * Seconds.
|
|
9
|
+
// * Seconds as a floating-point number (C double).
|
|
10
|
+
// * Milliseconds (10^-3 seconds).
|
|
11
|
+
// * Microseconds (10^-6 seconds).
|
|
12
|
+
// * 100 nanoseconds (10^-7 seconds), used on Windows.
|
|
13
|
+
// * Nanoseconds (10^-9 seconds).
|
|
14
|
+
// * timeval structure, 1 microsecond (10^-6 seconds).
|
|
15
|
+
// * timespec structure, 1 nanosecond (10^-9 seconds).
|
|
16
|
+
//
|
|
17
|
+
// Note that PyTime_t is now specified as int64_t, in nanoseconds.
|
|
18
|
+
// (If we need to change this, we'll need new public API with new names.)
|
|
19
|
+
// Previously, PyTime_t was configurable (in theory); some comments and code
|
|
20
|
+
// might still allude to that.
|
|
21
|
+
//
|
|
22
|
+
// Integer overflows are detected and raise OverflowError. Conversion to a
|
|
23
|
+
// resolution larger than 1 nanosecond is rounded correctly with the requested
|
|
24
|
+
// rounding mode. Available rounding modes:
|
|
25
|
+
//
|
|
26
|
+
// * Round towards minus infinity (-inf). For example, used to read a clock.
|
|
27
|
+
// * Round towards infinity (+inf). For example, used for timeout to wait "at
|
|
28
|
+
// least" N seconds.
|
|
29
|
+
// * Round to nearest with ties going to nearest even integer. For example, used
|
|
30
|
+
// to round from a Python float.
|
|
31
|
+
// * Round away from zero. For example, used for timeout.
|
|
32
|
+
//
|
|
33
|
+
// Some functions clamp the result in the range [PyTime_MIN; PyTime_MAX]. The
|
|
34
|
+
// caller doesn't have to handle errors and so doesn't need to hold the GIL to
|
|
35
|
+
// handle exceptions. For example, _PyTime_Add(t1, t2) computes t1+t2 and
|
|
36
|
+
// clamps the result on overflow.
|
|
37
|
+
//
|
|
38
|
+
// Clocks:
|
|
39
|
+
//
|
|
40
|
+
// * System clock
|
|
41
|
+
// * Monotonic clock
|
|
42
|
+
// * Performance counter
|
|
43
|
+
//
|
|
44
|
+
// Internally, operations like (t * k / q) with integers are implemented in a
|
|
45
|
+
// way to reduce the risk of integer overflow. Such operation is used to convert a
|
|
46
|
+
// clock value expressed in ticks with a frequency to PyTime_t, like
|
|
47
|
+
// QueryPerformanceCounter() with QueryPerformanceFrequency() on Windows.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
#ifndef Py_INTERNAL_TIME_H
|
|
51
|
+
#define Py_INTERNAL_TIME_H
|
|
52
|
+
#ifdef __cplusplus
|
|
53
|
+
extern "C" {
|
|
54
|
+
#endif
|
|
55
|
+
|
|
56
|
+
#ifndef Py_BUILD_CORE
|
|
57
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
58
|
+
#endif
|
|
59
|
+
|
|
60
|
+
#include "pycore_runtime_structs.h" // _PyTimeFraction
|
|
61
|
+
|
|
62
|
+
#ifdef __clang__
|
|
63
|
+
struct timeval;
|
|
64
|
+
#endif
|
|
65
|
+
|
|
66
|
+
#define _SIZEOF_PYTIME_T 8
|
|
67
|
+
|
|
68
|
+
typedef enum {
|
|
69
|
+
// Round towards minus infinity (-inf).
|
|
70
|
+
// For example, used to read a clock.
|
|
71
|
+
_PyTime_ROUND_FLOOR=0,
|
|
72
|
+
|
|
73
|
+
// Round towards infinity (+inf).
|
|
74
|
+
// For example, used for timeout to wait "at least" N seconds.
|
|
75
|
+
_PyTime_ROUND_CEILING=1,
|
|
76
|
+
|
|
77
|
+
// Round to nearest with ties going to nearest even integer.
|
|
78
|
+
// For example, used to round from a Python float.
|
|
79
|
+
_PyTime_ROUND_HALF_EVEN=2,
|
|
80
|
+
|
|
81
|
+
// Round away from zero
|
|
82
|
+
// For example, used for timeout. _PyTime_ROUND_CEILING rounds
|
|
83
|
+
// -1e-9 to 0 milliseconds which causes bpo-31786 issue.
|
|
84
|
+
// _PyTime_ROUND_UP rounds -1e-9 to -1 millisecond which keeps
|
|
85
|
+
// the timeout sign as expected. select.poll(timeout) must block
|
|
86
|
+
// for negative values.
|
|
87
|
+
_PyTime_ROUND_UP=3,
|
|
88
|
+
|
|
89
|
+
// _PyTime_ROUND_TIMEOUT (an alias for _PyTime_ROUND_UP) should be
|
|
90
|
+
// used for timeouts.
|
|
91
|
+
_PyTime_ROUND_TIMEOUT = _PyTime_ROUND_UP
|
|
92
|
+
} _PyTime_round_t;
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
// Convert a time_t to a PyLong.
|
|
96
|
+
// Export for '_testinternalcapi' shared extension
|
|
97
|
+
PyAPI_FUNC(PyObject*) _PyLong_FromTime_t(time_t sec);
|
|
98
|
+
|
|
99
|
+
// Convert a PyLong to a time_t.
|
|
100
|
+
// Export for '_datetime' shared extension
|
|
101
|
+
PyAPI_FUNC(time_t) _PyLong_AsTime_t(PyObject *obj);
|
|
102
|
+
|
|
103
|
+
// Convert a number of seconds, int or float, to time_t.
|
|
104
|
+
// Export for '_datetime' shared extension.
|
|
105
|
+
PyAPI_FUNC(int) _PyTime_ObjectToTime_t(
|
|
106
|
+
PyObject *obj,
|
|
107
|
+
time_t *sec,
|
|
108
|
+
_PyTime_round_t);
|
|
109
|
+
|
|
110
|
+
// Convert a number of seconds, int or float, to a timeval structure.
|
|
111
|
+
// usec is in the range [0; 999999] and rounded towards zero.
|
|
112
|
+
// For example, -1.2 is converted to (-2, 800000).
|
|
113
|
+
// Export for '_datetime' shared extension.
|
|
114
|
+
PyAPI_FUNC(int) _PyTime_ObjectToTimeval(
|
|
115
|
+
PyObject *obj,
|
|
116
|
+
time_t *sec,
|
|
117
|
+
long *usec,
|
|
118
|
+
_PyTime_round_t);
|
|
119
|
+
|
|
120
|
+
// Convert a number of seconds, int or float, to a timespec structure.
|
|
121
|
+
// nsec is in the range [0; 999999999] and rounded towards zero.
|
|
122
|
+
// For example, -1.2 is converted to (-2, 800000000).
|
|
123
|
+
// Export for '_testinternalcapi' shared extension.
|
|
124
|
+
PyAPI_FUNC(int) _PyTime_ObjectToTimespec(
|
|
125
|
+
PyObject *obj,
|
|
126
|
+
time_t *sec,
|
|
127
|
+
long *nsec,
|
|
128
|
+
_PyTime_round_t);
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
// Create a timestamp from a number of seconds.
|
|
132
|
+
// Export for '_socket' shared extension.
|
|
133
|
+
PyAPI_FUNC(PyTime_t) _PyTime_FromSeconds(int seconds);
|
|
134
|
+
|
|
135
|
+
// Create a timestamp from a number of seconds in double.
|
|
136
|
+
extern int _PyTime_FromSecondsDouble(
|
|
137
|
+
double seconds,
|
|
138
|
+
_PyTime_round_t round,
|
|
139
|
+
PyTime_t *result);
|
|
140
|
+
|
|
141
|
+
// Macro to create a timestamp from a number of seconds, no integer overflow.
|
|
142
|
+
// Only use the macro for small values, prefer _PyTime_FromSeconds().
|
|
143
|
+
#define _PYTIME_FROMSECONDS(seconds) \
|
|
144
|
+
((PyTime_t)(seconds) * (1000 * 1000 * 1000))
|
|
145
|
+
|
|
146
|
+
// Create a timestamp from a number of microseconds.
|
|
147
|
+
// Clamp to [PyTime_MIN; PyTime_MAX] on overflow.
|
|
148
|
+
extern PyTime_t _PyTime_FromMicrosecondsClamp(PyTime_t us);
|
|
149
|
+
|
|
150
|
+
// Create a timestamp from a Python int object (number of nanoseconds).
|
|
151
|
+
// Export for '_lsprof' shared extension.
|
|
152
|
+
PyAPI_FUNC(int) _PyTime_FromLong(PyTime_t *t,
|
|
153
|
+
PyObject *obj);
|
|
154
|
+
|
|
155
|
+
// Convert a number of seconds (Python float or int) to a timestamp.
|
|
156
|
+
// Raise an exception and return -1 on error, return 0 on success.
|
|
157
|
+
// Export for '_socket' shared extension.
|
|
158
|
+
PyAPI_FUNC(int) _PyTime_FromSecondsObject(PyTime_t *t,
|
|
159
|
+
PyObject *obj,
|
|
160
|
+
_PyTime_round_t round);
|
|
161
|
+
|
|
162
|
+
// Convert a number of milliseconds (Python float or int, 10^-3) to a timestamp.
|
|
163
|
+
// Raise an exception and return -1 on error, return 0 on success.
|
|
164
|
+
// Export for 'select' shared extension.
|
|
165
|
+
PyAPI_FUNC(int) _PyTime_FromMillisecondsObject(PyTime_t *t,
|
|
166
|
+
PyObject *obj,
|
|
167
|
+
_PyTime_round_t round);
|
|
168
|
+
|
|
169
|
+
// Convert timestamp to a number of milliseconds (10^-3 seconds).
|
|
170
|
+
// Export for '_ssl' shared extension.
|
|
171
|
+
PyAPI_FUNC(PyTime_t) _PyTime_AsMilliseconds(PyTime_t t,
|
|
172
|
+
_PyTime_round_t round);
|
|
173
|
+
|
|
174
|
+
// Convert timestamp to a number of microseconds (10^-6 seconds).
|
|
175
|
+
// Export for '_queue' shared extension.
|
|
176
|
+
PyAPI_FUNC(PyTime_t) _PyTime_AsMicroseconds(PyTime_t t,
|
|
177
|
+
_PyTime_round_t round);
|
|
178
|
+
|
|
179
|
+
#ifdef MS_WINDOWS
|
|
180
|
+
// Convert timestamp to a number of 100 nanoseconds (10^-7 seconds).
|
|
181
|
+
extern PyTime_t _PyTime_As100Nanoseconds(PyTime_t t,
|
|
182
|
+
_PyTime_round_t round);
|
|
183
|
+
#endif
|
|
184
|
+
|
|
185
|
+
// Convert a timestamp (number of nanoseconds) as a Python int object.
|
|
186
|
+
// Export for '_testinternalcapi' shared extension.
|
|
187
|
+
PyAPI_FUNC(PyObject*) _PyTime_AsLong(PyTime_t t);
|
|
188
|
+
|
|
189
|
+
#ifndef MS_WINDOWS
|
|
190
|
+
// Create a timestamp from a timeval structure.
|
|
191
|
+
// Raise an exception and return -1 on overflow, return 0 on success.
|
|
192
|
+
extern int _PyTime_FromTimeval(PyTime_t *tp, struct timeval *tv);
|
|
193
|
+
#endif
|
|
194
|
+
|
|
195
|
+
// Convert a timestamp to a timeval structure (microsecond resolution).
|
|
196
|
+
// tv_usec is always positive.
|
|
197
|
+
// Raise an exception and return -1 if the conversion overflowed,
|
|
198
|
+
// return 0 on success.
|
|
199
|
+
// Export for 'select' shared extension.
|
|
200
|
+
PyAPI_FUNC(int) _PyTime_AsTimeval(PyTime_t t,
|
|
201
|
+
struct timeval *tv,
|
|
202
|
+
_PyTime_round_t round);
|
|
203
|
+
|
|
204
|
+
// Similar to _PyTime_AsTimeval() but don't raise an exception on overflow.
|
|
205
|
+
// On overflow, clamp tv_sec to PyTime_t min/max.
|
|
206
|
+
// Export for 'select' shared extension.
|
|
207
|
+
PyAPI_FUNC(void) _PyTime_AsTimeval_clamp(PyTime_t t,
|
|
208
|
+
struct timeval *tv,
|
|
209
|
+
_PyTime_round_t round);
|
|
210
|
+
|
|
211
|
+
// Convert a timestamp to a number of seconds (secs) and microseconds (us).
|
|
212
|
+
// us is always positive. This function is similar to _PyTime_AsTimeval()
|
|
213
|
+
// except that secs is always a time_t type, whereas the timeval structure
|
|
214
|
+
// uses a C long for tv_sec on Windows.
|
|
215
|
+
// Raise an exception and return -1 if the conversion overflowed,
|
|
216
|
+
// return 0 on success.
|
|
217
|
+
// Export for '_datetime' shared extension.
|
|
218
|
+
PyAPI_FUNC(int) _PyTime_AsTimevalTime_t(
|
|
219
|
+
PyTime_t t,
|
|
220
|
+
time_t *secs,
|
|
221
|
+
int *us,
|
|
222
|
+
_PyTime_round_t round);
|
|
223
|
+
|
|
224
|
+
#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_KQUEUE)
|
|
225
|
+
// Create a timestamp from a timespec structure.
|
|
226
|
+
// Raise an exception and return -1 on overflow, return 0 on success.
|
|
227
|
+
extern int _PyTime_FromTimespec(PyTime_t *tp, const struct timespec *ts);
|
|
228
|
+
|
|
229
|
+
// Convert a timestamp to a timespec structure (nanosecond resolution).
|
|
230
|
+
// tv_nsec is always positive.
|
|
231
|
+
// Raise an exception and return -1 on error, return 0 on success.
|
|
232
|
+
// Export for '_testinternalcapi' shared extension.
|
|
233
|
+
PyAPI_FUNC(int) _PyTime_AsTimespec(PyTime_t t, struct timespec *ts);
|
|
234
|
+
|
|
235
|
+
// Similar to _PyTime_AsTimespec() but don't raise an exception on overflow.
|
|
236
|
+
// On overflow, clamp tv_sec to PyTime_t min/max.
|
|
237
|
+
// Export for '_testinternalcapi' shared extension.
|
|
238
|
+
PyAPI_FUNC(void) _PyTime_AsTimespec_clamp(PyTime_t t, struct timespec *ts);
|
|
239
|
+
#endif
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
// Compute t1 + t2. Clamp to [PyTime_MIN; PyTime_MAX] on overflow.
|
|
243
|
+
extern PyTime_t _PyTime_Add(PyTime_t t1, PyTime_t t2);
|
|
244
|
+
|
|
245
|
+
// Structure used by time.get_clock_info()
|
|
246
|
+
typedef struct {
|
|
247
|
+
const char *implementation;
|
|
248
|
+
int monotonic;
|
|
249
|
+
int adjustable;
|
|
250
|
+
double resolution;
|
|
251
|
+
} _Py_clock_info_t;
|
|
252
|
+
|
|
253
|
+
// Get the current time from the system clock.
|
|
254
|
+
// On success, set *t and *info (if not NULL), and return 0.
|
|
255
|
+
// On error, raise an exception and return -1.
|
|
256
|
+
extern int _PyTime_TimeWithInfo(
|
|
257
|
+
PyTime_t *t,
|
|
258
|
+
_Py_clock_info_t *info);
|
|
259
|
+
|
|
260
|
+
// Get the time of a monotonic clock, i.e. a clock that cannot go backwards.
|
|
261
|
+
// The clock is not affected by system clock updates. The reference point of
|
|
262
|
+
// the returned value is undefined, so that only the difference between the
|
|
263
|
+
// results of consecutive calls is valid.
|
|
264
|
+
//
|
|
265
|
+
// Fill info (if set) with information of the function used to get the time.
|
|
266
|
+
//
|
|
267
|
+
// Return 0 on success, raise an exception and return -1 on error.
|
|
268
|
+
// Export for '_testsinglephase' shared extension.
|
|
269
|
+
PyAPI_FUNC(int) _PyTime_MonotonicWithInfo(
|
|
270
|
+
PyTime_t *t,
|
|
271
|
+
_Py_clock_info_t *info);
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
// Converts a timestamp to the Gregorian time, using the local time zone.
|
|
275
|
+
// Return 0 on success, raise an exception and return -1 on error.
|
|
276
|
+
// Export for '_datetime' shared extension.
|
|
277
|
+
PyAPI_FUNC(int) _PyTime_localtime(time_t t, struct tm *tm);
|
|
278
|
+
|
|
279
|
+
// Converts a timestamp to the Gregorian time, assuming UTC.
|
|
280
|
+
// Return 0 on success, raise an exception and return -1 on error.
|
|
281
|
+
// Export for '_datetime' shared extension.
|
|
282
|
+
PyAPI_FUNC(int) _PyTime_gmtime(time_t t, struct tm *tm);
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
// Get the performance counter: clock with the highest available resolution to
|
|
286
|
+
// measure a short duration.
|
|
287
|
+
//
|
|
288
|
+
// Fill info (if set) with information of the function used to get the time.
|
|
289
|
+
//
|
|
290
|
+
// Return 0 on success, raise an exception and return -1 on error.
|
|
291
|
+
extern int _PyTime_PerfCounterWithInfo(
|
|
292
|
+
PyTime_t *t,
|
|
293
|
+
_Py_clock_info_t *info);
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
// --- _PyDeadline -----------------------------------------------------------
|
|
297
|
+
|
|
298
|
+
// Create a deadline.
|
|
299
|
+
// Pseudo code: return PyTime_MonotonicRaw() + timeout
|
|
300
|
+
// Export for '_ssl' shared extension.
|
|
301
|
+
PyAPI_FUNC(PyTime_t) _PyDeadline_Init(PyTime_t timeout);
|
|
302
|
+
|
|
303
|
+
// Get remaining time from a deadline.
|
|
304
|
+
// Pseudo code: return deadline - PyTime_MonotonicRaw()
|
|
305
|
+
// Export for '_ssl' shared extension.
|
|
306
|
+
PyAPI_FUNC(PyTime_t) _PyDeadline_Get(PyTime_t deadline);
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
// --- _PyTimeFraction -------------------------------------------------------
|
|
310
|
+
|
|
311
|
+
// Set a fraction.
|
|
312
|
+
// Return 0 on success.
|
|
313
|
+
// Return -1 if the fraction is invalid.
|
|
314
|
+
extern int _PyTimeFraction_Set(
|
|
315
|
+
_PyTimeFraction *frac,
|
|
316
|
+
PyTime_t numer,
|
|
317
|
+
PyTime_t denom);
|
|
318
|
+
|
|
319
|
+
// Compute ticks * frac.numer / frac.denom.
|
|
320
|
+
// Clamp to [PyTime_MIN; PyTime_MAX] on overflow.
|
|
321
|
+
extern PyTime_t _PyTimeFraction_Mul(
|
|
322
|
+
PyTime_t ticks,
|
|
323
|
+
const _PyTimeFraction *frac);
|
|
324
|
+
|
|
325
|
+
// Compute a clock resolution: frac.numer / frac.denom / 1e9.
|
|
326
|
+
extern double _PyTimeFraction_Resolution(
|
|
327
|
+
const _PyTimeFraction *frac);
|
|
328
|
+
|
|
329
|
+
extern PyStatus _PyTime_Init(struct _Py_time_runtime_state *state);
|
|
330
|
+
|
|
331
|
+
#ifdef __cplusplus
|
|
332
|
+
}
|
|
333
|
+
#endif
|
|
334
|
+
#endif // !Py_INTERNAL_TIME_H
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// Auto-generated by Tools/build/generate_token.py
|
|
2
|
+
|
|
3
|
+
/* Token types */
|
|
4
|
+
#ifndef Py_INTERNAL_TOKEN_H
|
|
5
|
+
#define Py_INTERNAL_TOKEN_H
|
|
6
|
+
#ifdef __cplusplus
|
|
7
|
+
extern "C" {
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
#ifndef Py_BUILD_CORE
|
|
11
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
12
|
+
#endif
|
|
13
|
+
|
|
14
|
+
#undef TILDE /* Prevent clash of our definition with system macro. Ex AIX, ioctl.h */
|
|
15
|
+
|
|
16
|
+
#define ENDMARKER 0
|
|
17
|
+
#define NAME 1
|
|
18
|
+
#define NUMBER 2
|
|
19
|
+
#define STRING 3
|
|
20
|
+
#define NEWLINE 4
|
|
21
|
+
#define INDENT 5
|
|
22
|
+
#define DEDENT 6
|
|
23
|
+
#define LPAR 7
|
|
24
|
+
#define RPAR 8
|
|
25
|
+
#define LSQB 9
|
|
26
|
+
#define RSQB 10
|
|
27
|
+
#define COLON 11
|
|
28
|
+
#define COMMA 12
|
|
29
|
+
#define SEMI 13
|
|
30
|
+
#define PLUS 14
|
|
31
|
+
#define MINUS 15
|
|
32
|
+
#define STAR 16
|
|
33
|
+
#define SLASH 17
|
|
34
|
+
#define VBAR 18
|
|
35
|
+
#define AMPER 19
|
|
36
|
+
#define LESS 20
|
|
37
|
+
#define GREATER 21
|
|
38
|
+
#define EQUAL 22
|
|
39
|
+
#define DOT 23
|
|
40
|
+
#define PERCENT 24
|
|
41
|
+
#define LBRACE 25
|
|
42
|
+
#define RBRACE 26
|
|
43
|
+
#define EQEQUAL 27
|
|
44
|
+
#define NOTEQUAL 28
|
|
45
|
+
#define LESSEQUAL 29
|
|
46
|
+
#define GREATEREQUAL 30
|
|
47
|
+
#define TILDE 31
|
|
48
|
+
#define CIRCUMFLEX 32
|
|
49
|
+
#define LEFTSHIFT 33
|
|
50
|
+
#define RIGHTSHIFT 34
|
|
51
|
+
#define DOUBLESTAR 35
|
|
52
|
+
#define PLUSEQUAL 36
|
|
53
|
+
#define MINEQUAL 37
|
|
54
|
+
#define STAREQUAL 38
|
|
55
|
+
#define SLASHEQUAL 39
|
|
56
|
+
#define PERCENTEQUAL 40
|
|
57
|
+
#define AMPEREQUAL 41
|
|
58
|
+
#define VBAREQUAL 42
|
|
59
|
+
#define CIRCUMFLEXEQUAL 43
|
|
60
|
+
#define LEFTSHIFTEQUAL 44
|
|
61
|
+
#define RIGHTSHIFTEQUAL 45
|
|
62
|
+
#define DOUBLESTAREQUAL 46
|
|
63
|
+
#define DOUBLESLASH 47
|
|
64
|
+
#define DOUBLESLASHEQUAL 48
|
|
65
|
+
#define AT 49
|
|
66
|
+
#define ATEQUAL 50
|
|
67
|
+
#define RARROW 51
|
|
68
|
+
#define ELLIPSIS 52
|
|
69
|
+
#define COLONEQUAL 53
|
|
70
|
+
#define EXCLAMATION 54
|
|
71
|
+
#define OP 55
|
|
72
|
+
#define TYPE_IGNORE 56
|
|
73
|
+
#define TYPE_COMMENT 57
|
|
74
|
+
#define SOFT_KEYWORD 58
|
|
75
|
+
#define FSTRING_START 59
|
|
76
|
+
#define FSTRING_MIDDLE 60
|
|
77
|
+
#define FSTRING_END 61
|
|
78
|
+
#define TSTRING_START 62
|
|
79
|
+
#define TSTRING_MIDDLE 63
|
|
80
|
+
#define TSTRING_END 64
|
|
81
|
+
#define COMMENT 65
|
|
82
|
+
#define NL 66
|
|
83
|
+
#define ERRORTOKEN 67
|
|
84
|
+
#define N_TOKENS 69
|
|
85
|
+
#define NT_OFFSET 256
|
|
86
|
+
|
|
87
|
+
/* Special definitions for cooperation with parser */
|
|
88
|
+
|
|
89
|
+
#define ISTERMINAL(x) ((x) < NT_OFFSET)
|
|
90
|
+
#define ISNONTERMINAL(x) ((x) >= NT_OFFSET)
|
|
91
|
+
#define ISEOF(x) ((x) == ENDMARKER)
|
|
92
|
+
#define ISWHITESPACE(x) ((x) == ENDMARKER || \
|
|
93
|
+
(x) == NEWLINE || \
|
|
94
|
+
(x) == INDENT || \
|
|
95
|
+
(x) == DEDENT)
|
|
96
|
+
#define ISSTRINGLIT(x) ((x) == STRING || \
|
|
97
|
+
(x) == FSTRING_MIDDLE || \
|
|
98
|
+
(x) == TSTRING_MIDDLE)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
// Export these 4 symbols for 'test_peg_generator'
|
|
102
|
+
PyAPI_DATA(const char * const) _PyParser_TokenNames[]; /* Token names */
|
|
103
|
+
PyAPI_FUNC(int) _PyToken_OneChar(int);
|
|
104
|
+
PyAPI_FUNC(int) _PyToken_TwoChars(int, int);
|
|
105
|
+
PyAPI_FUNC(int) _PyToken_ThreeChars(int, int, int);
|
|
106
|
+
|
|
107
|
+
#ifdef __cplusplus
|
|
108
|
+
}
|
|
109
|
+
#endif
|
|
110
|
+
#endif // !Py_INTERNAL_TOKEN_H
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
#ifndef Py_INTERNAL_TRACEBACK_H
|
|
2
|
+
#define Py_INTERNAL_TRACEBACK_H
|
|
3
|
+
#ifdef __cplusplus
|
|
4
|
+
extern "C" {
|
|
5
|
+
#endif
|
|
6
|
+
|
|
7
|
+
#ifndef Py_BUILD_CORE
|
|
8
|
+
# error "this header requires Py_BUILD_CORE define"
|
|
9
|
+
#endif
|
|
10
|
+
|
|
11
|
+
// Export for '_ctypes' shared extension
|
|
12
|
+
PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int, int *, PyObject **);
|
|
13
|
+
|
|
14
|
+
// Export for 'pyexact' shared extension
|
|
15
|
+
PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
|
|
16
|
+
|
|
17
|
+
/* Write the Python traceback into the file 'fd'. For example:
|
|
18
|
+
|
|
19
|
+
Traceback (most recent call first):
|
|
20
|
+
File "xxx", line xxx in <xxx>
|
|
21
|
+
File "xxx", line xxx in <xxx>
|
|
22
|
+
...
|
|
23
|
+
File "xxx", line xxx in <xxx>
|
|
24
|
+
|
|
25
|
+
This function is written for debug purpose only, to dump the traceback in
|
|
26
|
+
the worst case: after a segmentation fault, at fatal error, etc. That's why,
|
|
27
|
+
it is very limited. Strings are truncated to 100 characters and encoded to
|
|
28
|
+
ASCII with backslashreplace. It doesn't write the source code, only the
|
|
29
|
+
function name, filename and line number of each frame. Write only the first
|
|
30
|
+
100 frames: if the traceback is truncated, write the line " ...".
|
|
31
|
+
|
|
32
|
+
This function is signal safe. */
|
|
33
|
+
|
|
34
|
+
extern void _Py_DumpTraceback(
|
|
35
|
+
int fd,
|
|
36
|
+
PyThreadState *tstate);
|
|
37
|
+
|
|
38
|
+
/* Write the traceback of all threads into the file 'fd'. current_thread can be
|
|
39
|
+
NULL.
|
|
40
|
+
|
|
41
|
+
Return NULL on success, or an error message on error.
|
|
42
|
+
|
|
43
|
+
This function is written for debug purpose only. It calls
|
|
44
|
+
_Py_DumpTraceback() for each thread, and so has the same limitations. It
|
|
45
|
+
only write the traceback of the first 100 threads: write "..." if there are
|
|
46
|
+
more threads.
|
|
47
|
+
|
|
48
|
+
If current_tstate is NULL, the function tries to get the Python thread state
|
|
49
|
+
of the current thread. It is not an error if the function is unable to get
|
|
50
|
+
the current Python thread state.
|
|
51
|
+
|
|
52
|
+
If interp is NULL, the function tries to get the interpreter state from
|
|
53
|
+
the current Python thread state, or from
|
|
54
|
+
_PyGILState_GetInterpreterStateUnsafe() in last resort.
|
|
55
|
+
|
|
56
|
+
It is better to pass NULL to interp and current_tstate, the function tries
|
|
57
|
+
different options to retrieve this information.
|
|
58
|
+
|
|
59
|
+
This function is signal safe. */
|
|
60
|
+
|
|
61
|
+
extern const char* _Py_DumpTracebackThreads(
|
|
62
|
+
int fd,
|
|
63
|
+
PyInterpreterState *interp,
|
|
64
|
+
PyThreadState *current_tstate);
|
|
65
|
+
|
|
66
|
+
/* Write a Unicode object into the file descriptor fd. Encode the string to
|
|
67
|
+
ASCII using the backslashreplace error handler.
|
|
68
|
+
|
|
69
|
+
Do nothing if text is not a Unicode object.
|
|
70
|
+
|
|
71
|
+
This function is signal safe. */
|
|
72
|
+
extern void _Py_DumpASCII(int fd, PyObject *text);
|
|
73
|
+
|
|
74
|
+
/* Format an integer as decimal into the file descriptor fd.
|
|
75
|
+
|
|
76
|
+
This function is signal safe. */
|
|
77
|
+
extern void _Py_DumpDecimal(
|
|
78
|
+
int fd,
|
|
79
|
+
size_t value);
|
|
80
|
+
|
|
81
|
+
/* Format an integer as hexadecimal with width digits into fd file descriptor.
|
|
82
|
+
The function is signal safe. */
|
|
83
|
+
extern void _Py_DumpHexadecimal(
|
|
84
|
+
int fd,
|
|
85
|
+
uintptr_t value,
|
|
86
|
+
Py_ssize_t width);
|
|
87
|
+
|
|
88
|
+
extern PyObject* _PyTraceBack_FromFrame(
|
|
89
|
+
PyObject *tb_next,
|
|
90
|
+
PyFrameObject *frame);
|
|
91
|
+
|
|
92
|
+
#define EXCEPTION_TB_HEADER "Traceback (most recent call last):\n"
|
|
93
|
+
#define EXCEPTION_GROUP_TB_HEADER "Exception Group Traceback (most recent call last):\n"
|
|
94
|
+
|
|
95
|
+
/* Write the traceback tb to file f. Prefix each line with
|
|
96
|
+
indent spaces followed by the margin (if it is not NULL). */
|
|
97
|
+
extern int _PyTraceBack_Print(
|
|
98
|
+
PyObject *tb, const char *header, PyObject *f);
|
|
99
|
+
extern int _Py_WriteIndentedMargin(int, const char*, PyObject *);
|
|
100
|
+
extern int _Py_WriteIndent(int, PyObject *);
|
|
101
|
+
|
|
102
|
+
// Export for the faulthandler module
|
|
103
|
+
PyAPI_FUNC(void) _Py_InitDumpStack(void);
|
|
104
|
+
PyAPI_FUNC(void) _Py_DumpStack(int fd);
|
|
105
|
+
|
|
106
|
+
extern void _Py_DumpTraceback_Init(void);
|
|
107
|
+
|
|
108
|
+
#ifdef __cplusplus
|
|
109
|
+
}
|
|
110
|
+
#endif
|
|
111
|
+
#endif /* !Py_INTERNAL_TRACEBACK_H */
|