py2docfx 0.1.15rc2025477__py3-none-any.whl → 0.1.16.dev2051338__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- py2docfx/docfx_yaml/process_doctree.py +21 -34
- py2docfx/docfx_yaml/tests/test_method_arguments.py +1 -7
- py2docfx/docfx_yaml/tests/test_process_doctree.py +120 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_core_metadata.py +21 -5
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +13 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/ccompiler.py +5 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build.py +1 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_clib.py +1 -9
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_ext.py +1 -8
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/check.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/config.py +0 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install.py +8 -17
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compat/numpy.py +2 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/base.py +8 -5
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/msvc.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +15 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/dist.py +2 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/sysconfig.py +0 -10
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/tests/test_build_ext.py +60 -5
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/unixccompiler.py +6 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/util.py +7 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_normalization.py +29 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/__init__.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/_bdist_wheel.py +613 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/_setuptools_logging.py +2 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/bdist_wheel.py +25 -594
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/cli/__init__.py +6 -6
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/cli/convert.py +282 -223
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/macosx_libfile.py +22 -9
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/metadata.py +16 -13
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/util.py +0 -9
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_vendor/wheel/wheelfile.py +40 -9
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/bdist_wheel.py +6 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/config/_apply_pyprojecttoml.py +49 -11
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/config/_validate_pyproject/extra_validations.py +31 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.py +222 -129
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/config/_validate_pyproject/formats.py +30 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/dist.py +168 -51
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/msvc.py +12 -3
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/test_apply_pyprojecttoml.py +246 -13
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/test_setupcfg.py +42 -29
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/integration/test_pip_install_sdist.py +1 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_bdist_wheel.py +93 -8
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_build_meta.py +17 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_core_metadata.py +45 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_egg_info.py +24 -4
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_sdist.py +13 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/any_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/api_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/compiler/plugin_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_database.py +22 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/descriptor_pb2.py +82 -35
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/duration_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/empty_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/field_mask_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/builder.py +4 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/containers.py +13 -0
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/decoder.py +62 -115
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_edition_defaults.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/python_message.py +15 -18
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/testing_refleaks.py +4 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/type_checkers.py +5 -0
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/well_known_types.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/json_format.py +25 -9
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/message.py +26 -0
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/message_factory.py +0 -63
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/proto.py +38 -1
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/proto_text.py +129 -0
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/reflection.py +0 -49
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/runtime_version.py +3 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/source_context_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/struct_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/symbol_database.py +0 -18
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/text_format.py +8 -3
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/timestamp_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/type_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/unknown_fields.py +3 -4
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/wrappers_pb2.py +4 -4
- py2docfx/venv/venv1/Lib/site-packages/msal/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/msal/application.py +51 -17
- py2docfx/venv/venv1/Lib/site-packages/msal/broker.py +18 -4
- py2docfx/venv/venv1/Lib/site-packages/msal/cloudshell.py +5 -1
- py2docfx/venv/venv1/Lib/site-packages/msal/managed_identity.py +5 -4
- py2docfx/venv/venv1/Lib/site-packages/msal/sku.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/msal/token_cache.py +31 -10
- py2docfx/venv/venv1/Lib/site-packages/msal_extensions/__init__.py +2 -3
- py2docfx/venv/venv1/Lib/site-packages/msal_extensions/cache_lock.py +4 -1
- py2docfx/venv/venv1/Lib/site-packages/msal_extensions/filelock.py +62 -0
- py2docfx/venv/venv1/Lib/site-packages/msal_extensions/libsecret.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/msal_extensions/token_cache.py +7 -1
- py2docfx/venv/venv1/Lib/site-packages/pyasn1_modules/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_core_metadata.py +21 -5
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +13 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/ccompiler.py +5 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build.py +1 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_clib.py +1 -9
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_ext.py +1 -8
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/check.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/config.py +0 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install.py +8 -17
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compat/numpy.py +2 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/base.py +8 -5
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/msvc.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +15 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/dist.py +2 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/sysconfig.py +0 -10
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/tests/test_build_ext.py +60 -5
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/unixccompiler.py +6 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/util.py +7 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_normalization.py +29 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/__init__.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/_bdist_wheel.py +613 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/_setuptools_logging.py +2 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/bdist_wheel.py +25 -594
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/cli/__init__.py +6 -6
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/cli/convert.py +282 -223
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/macosx_libfile.py +22 -9
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/metadata.py +16 -13
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/util.py +0 -9
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_vendor/wheel/wheelfile.py +40 -9
- py2docfx/venv/venv1/Lib/site-packages/setuptools/command/bdist_wheel.py +6 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/config/_apply_pyprojecttoml.py +49 -11
- py2docfx/venv/venv1/Lib/site-packages/setuptools/config/_validate_pyproject/extra_validations.py +31 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/config/_validate_pyproject/fastjsonschema_validations.py +222 -129
- py2docfx/venv/venv1/Lib/site-packages/setuptools/config/_validate_pyproject/formats.py +30 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/dist.py +168 -51
- py2docfx/venv/venv1/Lib/site-packages/setuptools/msvc.py +12 -3
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/test_apply_pyprojecttoml.py +246 -13
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/test_setupcfg.py +42 -29
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/integration/test_pip_install_sdist.py +1 -1
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_bdist_wheel.py +93 -8
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_build_meta.py +17 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_core_metadata.py +45 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_egg_info.py +24 -4
- py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_sdist.py +13 -1
- py2docfx/venv/venv1/Lib/site-packages/typing_extensions.py +999 -74
- {py2docfx-0.1.15rc2025477.dist-info → py2docfx-0.1.16.dev2051338.dist-info}/METADATA +1 -1
- {py2docfx-0.1.15rc2025477.dist-info → py2docfx-0.1.16.dev2051338.dist-info}/RECORD +141 -596
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/__init__.py +0 -82
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/ado_consts.py +0 -283
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/adodbapi.py +0 -1153
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/apibase.py +0 -723
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/examples/db_print.py +0 -72
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/examples/db_table_names.py +0 -21
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/examples/xls_read.py +0 -41
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/examples/xls_write.py +0 -41
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/is64bit.py +0 -34
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/process_connect_string.py +0 -137
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/schema_table.py +0 -16
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/setup.py +0 -68
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/adodbapitest.py +0 -1547
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/adodbapitestconfig.py +0 -184
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/dbapi20.py +0 -879
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/is64bit.py +0 -34
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/setuptestframework.py +0 -98
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/test_adodbapi_dbapi20.py +0 -195
- py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/tryconnection.py +0 -30
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/internal/_parameterized.py +0 -420
- py2docfx/venv/venv1/Lib/site-packages/google/protobuf/service.py +0 -213
- py2docfx/venv/venv1/Lib/site-packages/isapi/__init__.py +0 -39
- py2docfx/venv/venv1/Lib/site-packages/isapi/install.py +0 -809
- py2docfx/venv/venv1/Lib/site-packages/isapi/isapicon.py +0 -121
- py2docfx/venv/venv1/Lib/site-packages/isapi/samples/advanced.py +0 -218
- py2docfx/venv/venv1/Lib/site-packages/isapi/samples/redirector.py +0 -116
- py2docfx/venv/venv1/Lib/site-packages/isapi/samples/redirector_asynch.py +0 -85
- py2docfx/venv/venv1/Lib/site-packages/isapi/samples/redirector_with_filter.py +0 -162
- py2docfx/venv/venv1/Lib/site-packages/isapi/samples/test.py +0 -195
- py2docfx/venv/venv1/Lib/site-packages/isapi/simple.py +0 -73
- py2docfx/venv/venv1/Lib/site-packages/isapi/test/extension_simple.py +0 -114
- py2docfx/venv/venv1/Lib/site-packages/isapi/threaded_extension.py +0 -191
- py2docfx/venv/venv1/Lib/site-packages/portalocker/__about__.py +0 -6
- py2docfx/venv/venv1/Lib/site-packages/portalocker/__init__.py +0 -79
- py2docfx/venv/venv1/Lib/site-packages/portalocker/__main__.py +0 -122
- py2docfx/venv/venv1/Lib/site-packages/portalocker/constants.py +0 -59
- py2docfx/venv/venv1/Lib/site-packages/portalocker/exceptions.py +0 -27
- py2docfx/venv/venv1/Lib/site-packages/portalocker/portalocker.py +0 -154
- py2docfx/venv/venv1/Lib/site-packages/portalocker/redis.py +0 -236
- py2docfx/venv/venv1/Lib/site-packages/portalocker/utils.py +0 -569
- py2docfx/venv/venv1/Lib/site-packages/pythoncom.py +0 -4
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/basictimerapp.py +0 -258
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/customprint.py +0 -183
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/demoutils.py +0 -63
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/dlgappdemo.py +0 -51
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/dojobapp.py +0 -71
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/helloapp.py +0 -53
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/cmdserver.py +0 -113
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/createwin.py +0 -114
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/demoutils.py +0 -65
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/dibdemo.py +0 -73
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/dlgtest.py +0 -145
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/dyndlg.py +0 -104
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/fontdemo.py +0 -85
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/guidemo.py +0 -53
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/hiertest.py +0 -138
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/menutest.py +0 -13
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/objdoc.py +0 -57
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/demoutils.py +0 -63
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/flash.py +0 -95
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/msoffice.py +0 -159
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/ocxserialtest.py +0 -132
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/ocxtest.py +0 -243
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/webbrowser.py +0 -72
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/openGLDemo.py +0 -415
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/progressbar.py +0 -105
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/sliderdemo.py +0 -76
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/splittst.py +0 -79
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/threadedgui.py +0 -189
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/toolbar.py +0 -105
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/__init__.py +0 -3
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/__init__.py +0 -133
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/configui.py +0 -34
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/dbgcon.py +0 -31
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/dbgpyapp.py +0 -48
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/debugger.py +0 -1097
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/fail.py +0 -54
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/ideoptions.py +0 -136
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/list.py +0 -146
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/login.py +0 -155
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/status.py +0 -242
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/docking/DockingBar.py +0 -676
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/docking/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/app.py +0 -411
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/bitmap.py +0 -168
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/cmdline.py +0 -54
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/dbgcommands.py +0 -188
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/dlgappcore.py +0 -76
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/ModuleBrowser.py +0 -235
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/__init__.py +0 -105
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/color/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/color/coloreditor.py +0 -646
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/configui.py +0 -299
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/document.py +0 -379
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/editor.py +0 -511
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/frame.py +0 -74
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/template.py +0 -59
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/vss.py +0 -104
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/help.py +0 -173
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/interact.py +0 -995
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/intpyapp.py +0 -552
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/intpydde.py +0 -65
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/scriptutils.py +0 -684
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/sgrepmdi.py +0 -749
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/startup.py +0 -70
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/stdin.py +0 -172
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/toolmenu.py +0 -279
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/window.py +0 -14
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/winout.py +0 -589
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/AutoExpand.py +0 -95
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/AutoIndent.py +0 -536
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/CallTips.py +0 -216
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/FormatParagraph.py +0 -166
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/IdleHistory.py +0 -87
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/PyParse.py +0 -585
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/__init__.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/activex.py +0 -79
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/afxres.py +0 -501
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/dialog.py +0 -277
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/docview.py +0 -151
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/object.py +0 -66
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/thread.py +0 -25
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/window.py +0 -50
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/IDLEenvironment.py +0 -593
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/__init__.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/bindings.py +0 -180
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/config.py +0 -363
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/configui.py +0 -291
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/control.py +0 -565
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/document.py +0 -312
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/find.py +0 -511
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/formatter.py +0 -704
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/keycodes.py +0 -190
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/scintillacon.py +0 -3083
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/view.py +0 -841
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/TraceCollector.py +0 -79
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/browseProjects.py +0 -323
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/browser.py +0 -494
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/hierlist.py +0 -353
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/regedit.py +0 -382
- py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/regpy.py +0 -80
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/BackupRead_BackupWrite.py +0 -119
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/BackupSeek_streamheaders.py +0 -137
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/CopyFileEx.py +0 -57
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/CreateFileTransacted_MiniVersion.py +0 -122
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/EvtFormatMessage.py +0 -83
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/EvtSubscribe_pull.py +0 -28
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/EvtSubscribe_push.py +0 -32
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/FileSecurityTest.py +0 -137
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/GetSaveFileName.py +0 -43
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/NetValidatePasswordPolicy.py +0 -127
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/OpenEncryptedFileRaw.py +0 -66
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/RegCreateKeyTransacted.py +0 -60
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/RegRestoreKey.py +0 -71
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/SystemParametersInfo.py +0 -210
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/c_extension/setup.py +0 -26
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/dde/ddeclient.py +0 -18
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/dde/ddeserver.py +0 -42
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/desktopmanager.py +0 -246
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/eventLogDemo.py +0 -143
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/getfilever.py +0 -33
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/mmapfile_demo.py +0 -101
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/pipes/cat.py +0 -17
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/pipes/runproc.py +0 -114
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/print_desktop.py +0 -113
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/rastest.py +0 -166
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/GetTokenInformation.py +0 -110
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/account_rights.py +0 -49
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/explicit_entries.py +0 -170
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/get_policy_info.py +0 -39
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/list_rights.py +0 -35
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/localized_names.py +0 -70
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/lsaregevent.py +0 -14
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/lsastore.py +0 -12
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/query_information.py +0 -25
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/regsave_sa.py +0 -61
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/regsecurity.py +0 -36
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sa_inherit.py +0 -8
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/security_enums.py +0 -336
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/set_file_audit.py +0 -106
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/set_file_owner.py +0 -73
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/set_policy_info.py +0 -25
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setkernelobjectsecurity.py +0 -134
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setnamedsecurityinfo.py +0 -131
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setsecurityinfo.py +0 -131
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setuserobjectsecurity.py +0 -102
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/fetch_url.py +0 -158
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/simple_auth.py +0 -72
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/socket_server.py +0 -199
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/validate_password.py +0 -41
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/service/nativePipeTestService.py +0 -63
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/service/pipeTestService.py +0 -185
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/service/pipeTestServiceClient.py +0 -158
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/service/serviceEvents.py +0 -98
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/timer_demo.py +0 -72
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32clipboardDemo.py +0 -155
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32clipboard_bitmapdemo.py +0 -117
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32comport_demo.py +0 -174
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32console_demo.py +0 -132
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32cred_demo.py +0 -82
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32fileDemo.py +0 -41
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_demo.py +0 -177
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_devicenotify.py +0 -106
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_dialog.py +0 -445
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_menu.py +0 -464
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_taskbar.py +0 -136
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32netdemo.py +0 -272
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32rcparser_demo.py +0 -86
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32servicedemo.py +0 -23
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32ts_logoff_disconnected.py +0 -25
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32wnet/testwnet.py +0 -123
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32wnet/winnetwk.py +0 -100
- py2docfx/venv/venv1/Lib/site-packages/win32/Demos/winprocess.py +0 -230
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/_win32verstamp_pywin32ctypes.py +0 -164
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/afxres.py +0 -8
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/commctrl.py +0 -1551
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/mmsystem.py +0 -956
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/netbios.py +0 -293
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/ntsecuritycon.py +0 -731
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/pywin32_bootstrap.py +0 -21
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/pywin32_testutil.py +0 -291
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/pywintypes.py +0 -124
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/rasutil.py +0 -40
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/regcheck.py +0 -161
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/regutil.py +0 -395
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/sspi.py +0 -413
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/sspicon.py +0 -477
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win2kras.py +0 -14
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32con.py +0 -5064
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32cryptcon.py +0 -1922
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32evtlogutil.py +0 -225
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32gui_struct.py +0 -957
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32inetcon.py +0 -1086
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32netcon.py +0 -627
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32pdhquery.py +0 -570
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32pdhutil.py +0 -212
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32rcparser.py +0 -674
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32serviceutil.py +0 -1073
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32timezone.py +0 -1201
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32traceutil.py +0 -59
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32verstamp.py +0 -235
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/winerror.py +0 -7362
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/winioctlcon.py +0 -1079
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/winnt.py +0 -1347
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/winperf.py +0 -236
- py2docfx/venv/venv1/Lib/site-packages/win32/lib/winxptheme.py +0 -8
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/ControlService.py +0 -594
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/VersionStamp/BrandProject.py +0 -97
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/VersionStamp/bulkstamp.py +0 -156
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/VersionStamp/vssutil.py +0 -201
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/backupEventLog.py +0 -46
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/h2py.py +0 -194
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/killProcName.py +0 -62
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/pywin32_postinstall.py +0 -733
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/pywin32_testall.py +0 -120
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/rasutil.py +0 -98
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/regsetup.py +0 -607
- py2docfx/venv/venv1/Lib/site-packages/win32/scripts/setup_d.py +0 -111
- py2docfx/venv/venv1/Lib/site-packages/win32/test/handles.py +0 -175
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_clipboard.py +0 -137
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_exceptions.py +0 -213
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_odbc.py +0 -264
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_pywintypes.py +0 -111
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_security.py +0 -166
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_sspi.py +0 -229
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32api.py +0 -273
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32clipboard.py +0 -59
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32cred.py +0 -91
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32crypt.py +0 -144
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32event.py +0 -119
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32file.py +0 -1096
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32gui.py +0 -227
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32guistruct.py +0 -333
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32inet.py +0 -108
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32net.py +0 -23
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32pipe.py +0 -148
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32print.py +0 -24
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32profile.py +0 -19
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32rcparser.py +0 -70
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32timezone.py +0 -16
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32trace.py +0 -366
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32ts.py +0 -19
- py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32wnet.py +0 -174
- py2docfx/venv/venv1/Lib/site-packages/win32/test/testall.py +0 -223
- py2docfx/venv/venv1/Lib/site-packages/win32/winxpgui.py +0 -13
- py2docfx/venv/venv1/Lib/site-packages/win32com/__init__.py +0 -134
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/CLSIDToClass.py +0 -60
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/__init__.py +0 -717
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/build.py +0 -771
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/combrowse.py +0 -604
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/connect.py +0 -48
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/dynamic.py +0 -699
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/gencache.py +0 -825
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/genpy.py +0 -1350
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/makepy.py +0 -453
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/selecttlb.py +0 -182
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/tlbrowse.py +0 -277
- py2docfx/venv/venv1/Lib/site-packages/win32com/client/util.py +0 -103
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/connect.py +0 -96
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/dump_clipboard.py +0 -74
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/eventsApartmentThreaded.py +0 -98
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/eventsFreeThreaded.py +0 -92
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/excelAddin.py +0 -169
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/excelRTDServer.py +0 -434
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/iebutton.py +0 -214
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/ietoolbar.py +0 -368
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/outlookAddin.py +0 -135
- py2docfx/venv/venv1/Lib/site-packages/win32com/demos/trybag.py +0 -78
- py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/__init__.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/makegw.py +0 -618
- py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/makegwenum.py +0 -331
- py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/makegwparse.py +0 -1017
- py2docfx/venv/venv1/Lib/site-packages/win32com/olectl.py +0 -70
- py2docfx/venv/venv1/Lib/site-packages/win32com/server/__init__.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/win32com/server/connect.py +0 -85
- py2docfx/venv/venv1/Lib/site-packages/win32com/server/dispatcher.py +0 -239
- py2docfx/venv/venv1/Lib/site-packages/win32com/server/exception.py +0 -99
- py2docfx/venv/venv1/Lib/site-packages/win32com/server/factory.py +0 -26
- py2docfx/venv/venv1/Lib/site-packages/win32com/server/localserver.py +0 -53
- py2docfx/venv/venv1/Lib/site-packages/win32com/server/policy.py +0 -803
- py2docfx/venv/venv1/Lib/site-packages/win32com/server/register.py +0 -677
- py2docfx/venv/venv1/Lib/site-packages/win32com/server/util.py +0 -229
- py2docfx/venv/venv1/Lib/site-packages/win32com/servers/PythonTools.py +0 -47
- py2docfx/venv/venv1/Lib/site-packages/win32com/servers/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/win32com/servers/dictionary.py +0 -133
- py2docfx/venv/venv1/Lib/site-packages/win32com/servers/interp.py +0 -59
- py2docfx/venv/venv1/Lib/site-packages/win32com/servers/perfmon.py +0 -36
- py2docfx/venv/venv1/Lib/site-packages/win32com/servers/test_pycomtest.py +0 -181
- py2docfx/venv/venv1/Lib/site-packages/win32com/storagecon.py +0 -142
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/GenTestScripts.py +0 -95
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/__init__.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/daodump.py +0 -88
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/errorSemantics.py +0 -243
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/pippo_server.py +0 -96
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/policySemantics.py +0 -115
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testADOEvents.py +0 -100
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testAXScript.py +0 -44
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testAccess.py +0 -185
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testArrays.py +0 -99
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testClipboard.py +0 -169
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testCollections.py +0 -159
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testConversionErrors.py +0 -35
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testDCOM.py +0 -50
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testDates.py +0 -74
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testDictionary.py +0 -101
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testDynamic.py +0 -83
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testExchange.py +0 -121
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testExplorer.py +0 -139
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testGIT.py +0 -142
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testGatewayAddresses.py +0 -149
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testIterators.py +0 -140
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testMSOffice.py +0 -184
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testMSOfficeEvents.py +0 -138
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testMarshal.py +0 -160
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testPersist.py +0 -227
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testPippo.py +0 -80
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testPyComTest.py +0 -918
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testROT.py +0 -29
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testServers.py +0 -51
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testShell.py +0 -272
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testStorage.py +0 -88
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testStreams.py +0 -147
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testWMI.py +0 -18
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testall.py +0 -320
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testmakepy.py +0 -54
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testvb.py +0 -583
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testvbscript_regexp.py +0 -40
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/testxslt.py +0 -34
- py2docfx/venv/venv1/Lib/site-packages/win32com/test/util.py +0 -262
- py2docfx/venv/venv1/Lib/site-packages/win32com/universal.py +0 -224
- py2docfx/venv/venv1/Lib/site-packages/win32com/util.py +0 -35
- py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/__init__.py +0 -113
- py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/adsicon.py +0 -340
- py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/demos/objectPicker.py +0 -68
- py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/demos/scp.py +0 -565
- py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/demos/search.py +0 -151
- py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/demos/test.py +0 -274
- py2docfx/venv/venv1/Lib/site-packages/win32comext/authorization/__init__.py +0 -6
- py2docfx/venv/venv1/Lib/site-packages/win32comext/authorization/demos/EditSecurity.py +0 -229
- py2docfx/venv/venv1/Lib/site-packages/win32comext/authorization/demos/EditServiceSecurity.py +0 -219
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axcontrol/__init__.py +0 -4
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/__init__.py +0 -4
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/adb.py +0 -467
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/codecontainer.py +0 -279
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/contexts.py +0 -58
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/debugger.py +0 -238
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/documents.py +0 -135
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/dump.py +0 -57
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/expressions.py +0 -212
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/gateways.py +0 -583
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/stackframe.py +0 -178
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/util.py +0 -98
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/__init__.py +0 -4
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/asputil.py +0 -13
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/__init__.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/debug.py +0 -223
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/error.py +0 -262
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/framework.py +0 -1291
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/pydumper.py +0 -78
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/pyscript.py +0 -438
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/pyscript_rexec.py +0 -54
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/scriptdispatch.py +0 -103
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/server/__init__.py +0 -0
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/server/axsite.py +0 -145
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/test/leakTest.py +0 -185
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/test/testHost.py +0 -240
- py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/test/testHost4Dbg.py +0 -83
- py2docfx/venv/venv1/Lib/site-packages/win32comext/bits/__init__.py +0 -6
- py2docfx/venv/venv1/Lib/site-packages/win32comext/bits/test/show_all_jobs.py +0 -48
- py2docfx/venv/venv1/Lib/site-packages/win32comext/bits/test/test_bits.py +0 -119
- py2docfx/venv/venv1/Lib/site-packages/win32comext/directsound/__init__.py +0 -4
- py2docfx/venv/venv1/Lib/site-packages/win32comext/directsound/test/__init__.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/win32comext/directsound/test/ds_record.py +0 -60
- py2docfx/venv/venv1/Lib/site-packages/win32comext/directsound/test/ds_test.py +0 -402
- py2docfx/venv/venv1/Lib/site-packages/win32comext/ifilter/__init__.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/win32comext/ifilter/demo/filterDemo.py +0 -300
- py2docfx/venv/venv1/Lib/site-packages/win32comext/ifilter/ifiltercon.py +0 -110
- py2docfx/venv/venv1/Lib/site-packages/win32comext/internet/__init__.py +0 -4
- py2docfx/venv/venv1/Lib/site-packages/win32comext/internet/inetcon.py +0 -261
- py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/__init__.py +0 -21
- py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/demos/mapisend.py +0 -98
- py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/emsabtags.py +0 -875
- py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/mapitags.py +0 -1023
- py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/mapiutil.py +0 -211
- py2docfx/venv/venv1/Lib/site-packages/win32comext/propsys/__init__.py +0 -1
- py2docfx/venv/venv1/Lib/site-packages/win32comext/propsys/pscon.py +0 -838
- py2docfx/venv/venv1/Lib/site-packages/win32comext/propsys/test/testpropsys.py +0 -5
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/__init__.py +0 -4
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/IActiveDesktop.py +0 -83
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/IFileOperationProgressSink.py +0 -179
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/IShellLinkDataList.py +0 -67
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/ITransferAdviseSink.py +0 -93
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/IUniformResourceLocator.py +0 -56
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/browse_for_folder.py +0 -45
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/create_link.py +0 -73
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/dump_link.py +0 -58
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/explorer_browser.py +0 -143
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/column_provider.py +0 -125
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/context_menu.py +0 -122
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/copy_hook.py +0 -84
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/empty_volume_cache.py +0 -188
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/folder_view.py +0 -866
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/icon_handler.py +0 -81
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/shell_view.py +0 -971
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/shellexecuteex.py +0 -19
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/viewstate.py +0 -68
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/walk_shell_folders.py +0 -24
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/shellcon.py +0 -1615
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/test/testSHFileOperation.py +0 -75
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/test/testShellFolder.py +0 -21
- py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/test/testShellItem.py +0 -69
- py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/__init__.py +0 -6
- py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_addtask.py +0 -66
- py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_addtask_1.py +0 -68
- py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_addtask_2.py +0 -49
- py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_localsystem.py +0 -3
- py2docfx/venv/venv1/Scripts/pywin32_postinstall.py +0 -733
- py2docfx/venv/venv1/Scripts/pywin32_testall.py +0 -120
- {py2docfx-0.1.15rc2025477.dist-info → py2docfx-0.1.16.dev2051338.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.15rc2025477.dist-info → py2docfx-0.1.16.dev2051338.dist-info}/top_level.txt +0 -0
@@ -1,1291 +0,0 @@
|
|
1
|
-
"""AXScript Client Framework
|
2
|
-
|
3
|
-
This module provides a core framework for an ActiveX Scripting client.
|
4
|
-
Derived classes actually implement the AX Client itself, including the
|
5
|
-
scoping rules, etc.
|
6
|
-
|
7
|
-
There are classes defined for the engine itself, and for ScriptItems
|
8
|
-
"""
|
9
|
-
|
10
|
-
from __future__ import annotations
|
11
|
-
|
12
|
-
import re
|
13
|
-
import sys
|
14
|
-
from typing import NoReturn
|
15
|
-
|
16
|
-
import pythoncom # Need simple connection point support
|
17
|
-
import win32api
|
18
|
-
import win32com.client.connect
|
19
|
-
import win32com.server.util
|
20
|
-
import winerror
|
21
|
-
from win32com.axscript import axscript
|
22
|
-
from win32com.server.exception import COMException, IsCOMServerException
|
23
|
-
|
24
|
-
from . import error # axscript.client.error
|
25
|
-
|
26
|
-
|
27
|
-
def RemoveCR(text):
|
28
|
-
# No longer just "RemoveCR" - should be renamed to
|
29
|
-
# FixNewlines, or something. Idea is to fix arbitary newlines into
|
30
|
-
# something Python can compile...
|
31
|
-
return re.sub(r"(\r\n)|\r|(\n\r)", "\n", text)
|
32
|
-
|
33
|
-
|
34
|
-
SCRIPTTEXT_FORCEEXECUTION = -2147483648 # 0x80000000
|
35
|
-
SCRIPTTEXT_ISEXPRESSION = 0x00000020
|
36
|
-
SCRIPTTEXT_ISPERSISTENT = 0x00000040
|
37
|
-
|
38
|
-
|
39
|
-
state_map = {
|
40
|
-
axscript.SCRIPTSTATE_UNINITIALIZED: "SCRIPTSTATE_UNINITIALIZED",
|
41
|
-
axscript.SCRIPTSTATE_INITIALIZED: "SCRIPTSTATE_INITIALIZED",
|
42
|
-
axscript.SCRIPTSTATE_STARTED: "SCRIPTSTATE_STARTED",
|
43
|
-
axscript.SCRIPTSTATE_CONNECTED: "SCRIPTSTATE_CONNECTED",
|
44
|
-
axscript.SCRIPTSTATE_DISCONNECTED: "SCRIPTSTATE_DISCONNECTED",
|
45
|
-
axscript.SCRIPTSTATE_CLOSED: "SCRIPTSTATE_CLOSED",
|
46
|
-
}
|
47
|
-
|
48
|
-
|
49
|
-
def profile(fn, *args):
|
50
|
-
import profile
|
51
|
-
|
52
|
-
prof = profile.Profile()
|
53
|
-
try:
|
54
|
-
# roll on 1.6 :-)
|
55
|
-
# return prof.runcall(fn, *args)
|
56
|
-
return prof.runcall(*(fn,) + args)
|
57
|
-
finally:
|
58
|
-
import pstats
|
59
|
-
|
60
|
-
# Damn - really want to send this to Excel!
|
61
|
-
# width, list = pstats.Stats(prof).strip_dirs().get_print_list([])
|
62
|
-
pstats.Stats(prof).strip_dirs().sort_stats("time").print_stats()
|
63
|
-
|
64
|
-
|
65
|
-
class SafeOutput:
|
66
|
-
softspace = 1
|
67
|
-
|
68
|
-
def __init__(self, redir=None):
|
69
|
-
if redir is None:
|
70
|
-
redir = sys.stdout
|
71
|
-
self.redir = redir
|
72
|
-
|
73
|
-
def write(self, message):
|
74
|
-
try:
|
75
|
-
self.redir.write(message)
|
76
|
-
except:
|
77
|
-
win32api.OutputDebugString(message)
|
78
|
-
|
79
|
-
def flush(self):
|
80
|
-
pass
|
81
|
-
|
82
|
-
def close(self):
|
83
|
-
pass
|
84
|
-
|
85
|
-
|
86
|
-
# Make sure we have a valid sys.stdout/stderr, otherwise out
|
87
|
-
# print and trace statements may raise an exception
|
88
|
-
def MakeValidSysOuts():
|
89
|
-
if not isinstance(sys.stdout, SafeOutput):
|
90
|
-
sys.stdout = sys.stderr = SafeOutput()
|
91
|
-
# and for the sake of working around something I can't understand...
|
92
|
-
# prevent keyboard interrupts from killing IIS
|
93
|
-
import signal
|
94
|
-
|
95
|
-
def noOp(a, b):
|
96
|
-
# it would be nice to get to the bottom of this, so a warning to
|
97
|
-
# the debug console can't hurt.
|
98
|
-
print("WARNING: Ignoring keyboard interrupt from ActiveScripting engine")
|
99
|
-
|
100
|
-
# If someone else has already redirected, then assume they know what they are doing!
|
101
|
-
if signal.getsignal(signal.SIGINT) == signal.default_int_handler:
|
102
|
-
try:
|
103
|
-
signal.signal(signal.SIGINT, noOp)
|
104
|
-
except ValueError:
|
105
|
-
# Not the main thread - can't do much.
|
106
|
-
pass
|
107
|
-
|
108
|
-
|
109
|
-
def trace(*args):
|
110
|
-
"""A function used instead of "print" for debugging output."""
|
111
|
-
for arg in args:
|
112
|
-
print(arg, end=" ")
|
113
|
-
print()
|
114
|
-
|
115
|
-
|
116
|
-
def RaiseAssert(scode, desc) -> NoReturn:
|
117
|
-
"""A debugging function that raises an exception considered an "Assertion"."""
|
118
|
-
print("**************** ASSERTION FAILED *******************")
|
119
|
-
print(desc)
|
120
|
-
raise COMException(desc, scode)
|
121
|
-
|
122
|
-
|
123
|
-
class AXScriptCodeBlock:
|
124
|
-
"""An object which represents a chunk of code in an AX Script"""
|
125
|
-
|
126
|
-
def __init__(
|
127
|
-
self,
|
128
|
-
name: str,
|
129
|
-
codeText: str,
|
130
|
-
sourceContextCookie: int,
|
131
|
-
startLineNumber: int,
|
132
|
-
flags,
|
133
|
-
):
|
134
|
-
self.name = name
|
135
|
-
self.codeText = codeText
|
136
|
-
self.codeObject = None
|
137
|
-
self.sourceContextCookie = sourceContextCookie
|
138
|
-
self.startLineNumber = startLineNumber
|
139
|
-
self.flags = flags
|
140
|
-
self.beenExecuted = 0
|
141
|
-
|
142
|
-
def GetFileName(self):
|
143
|
-
# Gets the "file name" for Python - uses <...> so Python doesn't think
|
144
|
-
# it is a real file.
|
145
|
-
return "<%s>" % self.name
|
146
|
-
|
147
|
-
def GetDisplayName(self):
|
148
|
-
return self.name
|
149
|
-
|
150
|
-
def GetLineNo(self, no: int):
|
151
|
-
pos = -1
|
152
|
-
for i in range(no - 1):
|
153
|
-
pos = self.codeText.find("\n", pos + 1)
|
154
|
-
if pos == -1:
|
155
|
-
pos = len(self.codeText)
|
156
|
-
epos = self.codeText.find("\n", pos + 1)
|
157
|
-
if epos == -1:
|
158
|
-
epos = len(self.codeText)
|
159
|
-
return self.codeText[pos + 1 : epos].strip()
|
160
|
-
|
161
|
-
|
162
|
-
class Event:
|
163
|
-
"""A single event for a ActiveX named object."""
|
164
|
-
|
165
|
-
def __init__(self):
|
166
|
-
self.name = "<None>"
|
167
|
-
|
168
|
-
def __repr__(self):
|
169
|
-
return "<%s at %d: %s>" % (self.__class__.__name__, id(self), self.name)
|
170
|
-
|
171
|
-
def Reset(self):
|
172
|
-
pass
|
173
|
-
|
174
|
-
def Close(self):
|
175
|
-
pass
|
176
|
-
|
177
|
-
def Build(self, typeinfo, funcdesc):
|
178
|
-
self.dispid = funcdesc[0]
|
179
|
-
self.name = typeinfo.GetNames(self.dispid)[0]
|
180
|
-
|
181
|
-
|
182
|
-
# print("Event.Build() - Event Name is ", self.name)
|
183
|
-
|
184
|
-
|
185
|
-
class EventSink:
|
186
|
-
"""A set of events against an item. Note this is a COM client for connection points."""
|
187
|
-
|
188
|
-
_public_methods_: list[str] = []
|
189
|
-
|
190
|
-
def __init__(self, myItem, coDispatch):
|
191
|
-
self.events = {}
|
192
|
-
self.connection = None
|
193
|
-
self.coDispatch = coDispatch
|
194
|
-
self.myScriptItem = myItem
|
195
|
-
self.myInvokeMethod = myItem.GetEngine().ProcessScriptItemEvent
|
196
|
-
self.iid = None
|
197
|
-
|
198
|
-
def Reset(self):
|
199
|
-
self.Disconnect()
|
200
|
-
|
201
|
-
def Close(self):
|
202
|
-
self.iid = None
|
203
|
-
self.myScriptItem = None
|
204
|
-
self.myInvokeMethod = None
|
205
|
-
self.coDispatch = None
|
206
|
-
for event in self.events.values():
|
207
|
-
event.Reset()
|
208
|
-
self.events = {}
|
209
|
-
self.Disconnect()
|
210
|
-
|
211
|
-
# COM Connection point methods.
|
212
|
-
def _query_interface_(self, iid):
|
213
|
-
if iid == self.iid:
|
214
|
-
return win32com.server.util.wrap(self)
|
215
|
-
|
216
|
-
def _invoke_(self, dispid, lcid, wFlags, args):
|
217
|
-
try:
|
218
|
-
event = self.events[dispid]
|
219
|
-
except:
|
220
|
-
raise COMException(scode=winerror.DISP_E_MEMBERNOTFOUND)
|
221
|
-
# print("Invoke for ", event, "on", self.myScriptItem, " - calling", self.myInvokeMethod)
|
222
|
-
return self.myInvokeMethod(self.myScriptItem, event, lcid, wFlags, args)
|
223
|
-
|
224
|
-
def GetSourceTypeInfo(self, typeinfo):
|
225
|
-
"""Gets the typeinfo for the Source Events for the passed typeinfo"""
|
226
|
-
attr = typeinfo.GetTypeAttr()
|
227
|
-
cFuncs = attr[6]
|
228
|
-
typeKind = attr[5]
|
229
|
-
if typeKind not in [pythoncom.TKIND_COCLASS, pythoncom.TKIND_INTERFACE]:
|
230
|
-
RaiseAssert(
|
231
|
-
winerror.E_UNEXPECTED, "The typeKind of the object is unexpected"
|
232
|
-
)
|
233
|
-
cImplType = attr[8]
|
234
|
-
for i in range(cImplType):
|
235
|
-
# Look for the [source, default] interface on the coclass
|
236
|
-
# that isn't marked as restricted.
|
237
|
-
flags = typeinfo.GetImplTypeFlags(i)
|
238
|
-
flagsNeeded = (
|
239
|
-
pythoncom.IMPLTYPEFLAG_FDEFAULT | pythoncom.IMPLTYPEFLAG_FSOURCE
|
240
|
-
)
|
241
|
-
if (flags & (flagsNeeded | pythoncom.IMPLTYPEFLAG_FRESTRICTED)) == (
|
242
|
-
flagsNeeded
|
243
|
-
):
|
244
|
-
# Get the handle to the implemented interface.
|
245
|
-
href = typeinfo.GetRefTypeOfImplType(i)
|
246
|
-
return typeinfo.GetRefTypeInfo(href)
|
247
|
-
|
248
|
-
def BuildEvents(self):
|
249
|
-
# See if it is an extender object.
|
250
|
-
try:
|
251
|
-
mainTypeInfo = self.coDispatch.QueryInterface(
|
252
|
-
axscript.IID_IProvideMultipleClassInfo
|
253
|
-
)
|
254
|
-
isMulti = 1
|
255
|
-
numTypeInfos = mainTypeInfo.GetMultiTypeInfoCount()
|
256
|
-
except pythoncom.com_error:
|
257
|
-
isMulti = 0
|
258
|
-
numTypeInfos = 1
|
259
|
-
try:
|
260
|
-
mainTypeInfo = self.coDispatch.QueryInterface(
|
261
|
-
pythoncom.IID_IProvideClassInfo
|
262
|
-
)
|
263
|
-
except pythoncom.com_error:
|
264
|
-
numTypeInfos = 0
|
265
|
-
# Create an event handler for the item.
|
266
|
-
for item in range(numTypeInfos):
|
267
|
-
if isMulti:
|
268
|
-
typeinfo, flags = mainTypeInfo.GetInfoOfIndex(
|
269
|
-
item, axscript.MULTICLASSINFO_GETTYPEINFO
|
270
|
-
)
|
271
|
-
else:
|
272
|
-
typeinfo = mainTypeInfo.GetClassInfo()
|
273
|
-
sourceType = self.GetSourceTypeInfo(typeinfo)
|
274
|
-
cFuncs = 0
|
275
|
-
if sourceType:
|
276
|
-
attr = sourceType.GetTypeAttr()
|
277
|
-
self.iid = attr[0]
|
278
|
-
cFuncs = attr[6]
|
279
|
-
for i in range(cFuncs):
|
280
|
-
funcdesc = sourceType.GetFuncDesc(i)
|
281
|
-
event = Event()
|
282
|
-
event.Build(sourceType, funcdesc)
|
283
|
-
self.events[event.dispid] = event
|
284
|
-
|
285
|
-
def Connect(self):
|
286
|
-
if self.connection is not None or self.iid is None:
|
287
|
-
return
|
288
|
-
# trace("Connect for sink item", self.myScriptItem.name, "with IID",str(self.iid))
|
289
|
-
self.connection = win32com.client.connect.SimpleConnection(
|
290
|
-
self.coDispatch, self, self.iid
|
291
|
-
)
|
292
|
-
|
293
|
-
def Disconnect(self):
|
294
|
-
if self.connection:
|
295
|
-
try:
|
296
|
-
self.connection.Disconnect()
|
297
|
-
except pythoncom.com_error:
|
298
|
-
pass # Ignore disconnection errors.
|
299
|
-
self.connection = None
|
300
|
-
|
301
|
-
|
302
|
-
class ScriptItem:
|
303
|
-
"""An item (or subitem) that is exposed to the ActiveX script"""
|
304
|
-
|
305
|
-
def __init__(self, parentItem, name, dispatch, flags):
|
306
|
-
self.parentItem = parentItem
|
307
|
-
self.dispatch = dispatch
|
308
|
-
self.name = name
|
309
|
-
self.flags = flags
|
310
|
-
self.eventSink = None
|
311
|
-
self.subItems = {}
|
312
|
-
self.createdConnections = 0
|
313
|
-
self.isRegistered = 0
|
314
|
-
|
315
|
-
# trace("Creating ScriptItem", name, "of parent", parentItem,"with dispatch", dispatch)
|
316
|
-
|
317
|
-
def __repr__(self):
|
318
|
-
flagsDesc = ""
|
319
|
-
if self.flags is not None and self.flags & axscript.SCRIPTITEM_GLOBALMEMBERS:
|
320
|
-
flagsDesc = "/Global"
|
321
|
-
return "<%s at %d: %s%s>" % (
|
322
|
-
self.__class__.__name__,
|
323
|
-
id(self),
|
324
|
-
self.name,
|
325
|
-
flagsDesc,
|
326
|
-
)
|
327
|
-
|
328
|
-
def _dump_(self, level):
|
329
|
-
flagDescs = []
|
330
|
-
if self.flags is not None and self.flags & axscript.SCRIPTITEM_GLOBALMEMBERS:
|
331
|
-
flagDescs.append("GLOBAL!")
|
332
|
-
if self.flags is None or self.flags & axscript.SCRIPTITEM_ISVISIBLE == 0:
|
333
|
-
flagDescs.append("NOT VISIBLE")
|
334
|
-
if self.flags is not None and self.flags & axscript.SCRIPTITEM_ISSOURCE:
|
335
|
-
flagDescs.append("EVENT SINK")
|
336
|
-
if self.flags is not None and self.flags & axscript.SCRIPTITEM_CODEONLY:
|
337
|
-
flagDescs.append("CODE ONLY")
|
338
|
-
print(" " * level, "Name=", self.name, ", flags=", "/".join(flagDescs), self)
|
339
|
-
for subItem in self.subItems.values():
|
340
|
-
subItem._dump_(level + 1)
|
341
|
-
|
342
|
-
def Reset(self):
|
343
|
-
self.Disconnect()
|
344
|
-
if self.eventSink:
|
345
|
-
self.eventSink.Reset()
|
346
|
-
self.isRegistered = 0
|
347
|
-
for subItem in self.subItems.values():
|
348
|
-
subItem.Reset()
|
349
|
-
|
350
|
-
def Close(self):
|
351
|
-
self.Reset()
|
352
|
-
self.dispatch = None
|
353
|
-
self.parentItem = None
|
354
|
-
if self.eventSink:
|
355
|
-
self.eventSink.Close()
|
356
|
-
self.eventSink = None
|
357
|
-
for subItem in self.subItems.values():
|
358
|
-
subItem.Close()
|
359
|
-
self.subItems = []
|
360
|
-
self.createdConnections = 0
|
361
|
-
|
362
|
-
def Register(self):
|
363
|
-
if self.isRegistered:
|
364
|
-
return
|
365
|
-
# Get the type info to use to build this item.
|
366
|
-
# if not self.dispatch:
|
367
|
-
# id = self.parentItem.dispatch.GetIDsOfNames(self.name)
|
368
|
-
# print("DispID of me is", id)
|
369
|
-
# result = self.parentItem.dispatch.Invoke(id, 0, pythoncom.DISPATCH_PROPERTYGET,1)
|
370
|
-
# if isinstance(result, pythoncom.TypeIIDs[pythoncom.IID_IDispatch]):
|
371
|
-
# self.dispatch = result
|
372
|
-
# else:
|
373
|
-
# print("*** No dispatch")
|
374
|
-
# return
|
375
|
-
# print("**** Made dispatch")
|
376
|
-
self.isRegistered = 1
|
377
|
-
# Register the sub-items.
|
378
|
-
for item in self.subItems.values():
|
379
|
-
if not item.isRegistered:
|
380
|
-
item.Register()
|
381
|
-
|
382
|
-
def IsGlobal(self):
|
383
|
-
return self.flags & axscript.SCRIPTITEM_GLOBALMEMBERS
|
384
|
-
|
385
|
-
def IsVisible(self):
|
386
|
-
return (
|
387
|
-
self.flags & (axscript.SCRIPTITEM_ISVISIBLE | axscript.SCRIPTITEM_ISSOURCE)
|
388
|
-
) != 0
|
389
|
-
|
390
|
-
def GetEngine(self):
|
391
|
-
item = self
|
392
|
-
while item.parentItem.__class__ == self.__class__:
|
393
|
-
item = item.parentItem
|
394
|
-
return item.parentItem
|
395
|
-
|
396
|
-
def _GetFullItemName(self):
|
397
|
-
ret = self.name
|
398
|
-
if self.parentItem:
|
399
|
-
try:
|
400
|
-
ret = self.parentItem._GetFullItemName() + "." + ret
|
401
|
-
except AttributeError:
|
402
|
-
pass
|
403
|
-
return ret
|
404
|
-
|
405
|
-
def GetSubItemClass(self):
|
406
|
-
return self.__class__
|
407
|
-
|
408
|
-
def GetSubItem(self, name):
|
409
|
-
return self.subItems[name.lower()]
|
410
|
-
|
411
|
-
def GetCreateSubItem(self, parentItem, name, dispatch, flags):
|
412
|
-
keyName = name.lower()
|
413
|
-
try:
|
414
|
-
rc = self.subItems[keyName]
|
415
|
-
# No changes allowed to existing flags.
|
416
|
-
if not rc.flags is None and not flags is None and rc.flags != flags:
|
417
|
-
raise COMException(scode=winerror.E_INVALIDARG)
|
418
|
-
# Existing item must not have a dispatch.
|
419
|
-
if not rc.dispatch is None and not dispatch is None:
|
420
|
-
raise COMException(scode=winerror.E_INVALIDARG)
|
421
|
-
rc.flags = flags # Setup the real flags.
|
422
|
-
rc.dispatch = dispatch
|
423
|
-
except KeyError:
|
424
|
-
rc = self.subItems[keyName] = self.GetSubItemClass()(
|
425
|
-
parentItem, name, dispatch, flags
|
426
|
-
)
|
427
|
-
return rc
|
428
|
-
|
429
|
-
# if self.dispatch is None:
|
430
|
-
# RaiseAssert(winerror.E_UNEXPECTED, "??")
|
431
|
-
|
432
|
-
def CreateConnections(self):
|
433
|
-
# Create (but do not connect to) the connection points.
|
434
|
-
if self.createdConnections:
|
435
|
-
return
|
436
|
-
self.createdConnections = 1
|
437
|
-
# Nothing to do unless this is an event source
|
438
|
-
# This flags means self, _and_ children, are connectable.
|
439
|
-
if self.flags & axscript.SCRIPTITEM_ISSOURCE:
|
440
|
-
self.BuildEvents()
|
441
|
-
self.FindBuildSubItemEvents()
|
442
|
-
|
443
|
-
def Connect(self):
|
444
|
-
# Connect to the already created connection points.
|
445
|
-
if self.eventSink:
|
446
|
-
self.eventSink.Connect()
|
447
|
-
for subItem in self.subItems.values():
|
448
|
-
subItem.Connect()
|
449
|
-
|
450
|
-
def Disconnect(self):
|
451
|
-
# Disconnect from the connection points.
|
452
|
-
if self.eventSink:
|
453
|
-
self.eventSink.Disconnect()
|
454
|
-
for subItem in self.subItems.values():
|
455
|
-
subItem.Disconnect()
|
456
|
-
|
457
|
-
def BuildEvents(self):
|
458
|
-
if self.eventSink is not None or self.dispatch is None:
|
459
|
-
RaiseAssert(
|
460
|
-
winerror.E_UNEXPECTED,
|
461
|
-
"Item already has built events, or no dispatch available?",
|
462
|
-
)
|
463
|
-
|
464
|
-
# trace("BuildEvents for named item", self._GetFullItemName())
|
465
|
-
self.eventSink = EventSink(self, self.dispatch)
|
466
|
-
self.eventSink.BuildEvents()
|
467
|
-
|
468
|
-
def FindBuildSubItemEvents(self):
|
469
|
-
# Called during connection to event source. Seeks out and connects to
|
470
|
-
# all children. As per the AX spec, this is not recursive
|
471
|
-
# (ie, children sub-items are not seeked)
|
472
|
-
try:
|
473
|
-
multiTypeInfo = self.dispatch.QueryInterface(
|
474
|
-
axscript.IID_IProvideMultipleClassInfo
|
475
|
-
)
|
476
|
-
numTypeInfos = multiTypeInfo.GetMultiTypeInfoCount()
|
477
|
-
except pythoncom.com_error:
|
478
|
-
return
|
479
|
-
for item in range(numTypeInfos):
|
480
|
-
typeinfo, flags = multiTypeInfo.GetInfoOfIndex(
|
481
|
-
item, axscript.MULTICLASSINFO_GETTYPEINFO
|
482
|
-
)
|
483
|
-
defaultType = self.GetDefaultSourceTypeInfo(typeinfo)
|
484
|
-
index = 0
|
485
|
-
while 1:
|
486
|
-
try:
|
487
|
-
fdesc = defaultType.GetFuncDesc(index)
|
488
|
-
except pythoncom.com_error:
|
489
|
-
break # No more funcs
|
490
|
-
index += 1
|
491
|
-
dispid = fdesc[0]
|
492
|
-
funckind = fdesc[3]
|
493
|
-
invkind = fdesc[4]
|
494
|
-
elemdesc = fdesc[8]
|
495
|
-
funcflags = fdesc[9]
|
496
|
-
try:
|
497
|
-
isSubObject = (
|
498
|
-
not (funcflags & pythoncom.FUNCFLAG_FRESTRICTED)
|
499
|
-
and funckind == pythoncom.FUNC_DISPATCH
|
500
|
-
and invkind == pythoncom.INVOKE_PROPERTYGET
|
501
|
-
and elemdesc[0][0] == pythoncom.VT_PTR
|
502
|
-
and elemdesc[0][1][0] == pythoncom.VT_USERDEFINED
|
503
|
-
)
|
504
|
-
except:
|
505
|
-
isSubObject = 0
|
506
|
-
if isSubObject:
|
507
|
-
try:
|
508
|
-
# We found a sub-object.
|
509
|
-
names = typeinfo.GetNames(dispid)
|
510
|
-
result = self.dispatch.Invoke(
|
511
|
-
dispid, 0x0, pythoncom.DISPATCH_PROPERTYGET, 1
|
512
|
-
)
|
513
|
-
# IE has an interesting problem - there are lots of synonyms for the same object. Eg
|
514
|
-
# in a simple form, "window.top", "window.window", "window.parent", "window.self"
|
515
|
-
# all refer to the same object. Our event implementation code does not differentiate
|
516
|
-
# eg, "window_onload" will fire for *all* objects named "window". Thus,
|
517
|
-
# "window" and "window.window" will fire the same event handler :(
|
518
|
-
# One option would be to check if the sub-object is indeed the
|
519
|
-
# parent object - however, this would stop "top_onload" from firing,
|
520
|
-
# as no event handler for "top" would work.
|
521
|
-
# I think we simply need to connect to a *single* event handler.
|
522
|
-
# As use in IE is deprecated, I am not solving this now.
|
523
|
-
if isinstance(
|
524
|
-
result, pythoncom.TypeIIDs[pythoncom.IID_IDispatch]
|
525
|
-
):
|
526
|
-
name = names[0]
|
527
|
-
subObj = self.GetCreateSubItem(
|
528
|
-
self, name, result, axscript.SCRIPTITEM_ISVISIBLE
|
529
|
-
)
|
530
|
-
# print(
|
531
|
-
# "subobj",
|
532
|
-
# name,
|
533
|
-
# "flags are",
|
534
|
-
# subObj.flags,
|
535
|
-
# "mydisp=",
|
536
|
-
# self.dispatch,
|
537
|
-
# "result disp=",
|
538
|
-
# result,
|
539
|
-
# "compare=",
|
540
|
-
# self.dispatch == result,
|
541
|
-
# )
|
542
|
-
subObj.BuildEvents()
|
543
|
-
subObj.Register()
|
544
|
-
except pythoncom.com_error:
|
545
|
-
pass
|
546
|
-
|
547
|
-
def GetDefaultSourceTypeInfo(self, typeinfo):
|
548
|
-
"""Gets the typeinfo for the Default Dispatch for the passed typeinfo"""
|
549
|
-
attr = typeinfo.GetTypeAttr()
|
550
|
-
cFuncs = attr[6]
|
551
|
-
typeKind = attr[5]
|
552
|
-
if typeKind not in [pythoncom.TKIND_COCLASS, pythoncom.TKIND_INTERFACE]:
|
553
|
-
RaiseAssert(
|
554
|
-
winerror.E_UNEXPECTED, "The typeKind of the object is unexpected"
|
555
|
-
)
|
556
|
-
cImplType = attr[8]
|
557
|
-
for i in range(cImplType):
|
558
|
-
# Look for the [source, default] interface on the coclass
|
559
|
-
# that isn't marked as restricted.
|
560
|
-
flags = typeinfo.GetImplTypeFlags(i)
|
561
|
-
if (
|
562
|
-
flags
|
563
|
-
& (
|
564
|
-
pythoncom.IMPLTYPEFLAG_FDEFAULT
|
565
|
-
| pythoncom.IMPLTYPEFLAG_FSOURCE
|
566
|
-
| pythoncom.IMPLTYPEFLAG_FRESTRICTED
|
567
|
-
)
|
568
|
-
) == pythoncom.IMPLTYPEFLAG_FDEFAULT:
|
569
|
-
# Get the handle to the implemented interface.
|
570
|
-
href = typeinfo.GetRefTypeOfImplType(i)
|
571
|
-
defTypeInfo = typeinfo.GetRefTypeInfo(href)
|
572
|
-
attr = defTypeInfo.GetTypeAttr()
|
573
|
-
typeKind = attr[5]
|
574
|
-
typeFlags = attr[11]
|
575
|
-
if (
|
576
|
-
typeKind == pythoncom.TKIND_INTERFACE
|
577
|
-
and typeFlags & pythoncom.TYPEFLAG_FDUAL
|
578
|
-
):
|
579
|
-
# Get corresponding Disp interface
|
580
|
-
# -1 is a special value which does this for us.
|
581
|
-
href = typeinfo.GetRefTypeOfImplType(-1)
|
582
|
-
return defTypeInfo.GetRefTypeInfo(href)
|
583
|
-
else:
|
584
|
-
return defTypeInfo
|
585
|
-
|
586
|
-
|
587
|
-
IActiveScriptMethods = [
|
588
|
-
"SetScriptSite",
|
589
|
-
"GetScriptSite",
|
590
|
-
"SetScriptState",
|
591
|
-
"GetScriptState",
|
592
|
-
"Close",
|
593
|
-
"AddNamedItem",
|
594
|
-
"AddTypeLib",
|
595
|
-
"GetScriptDispatch",
|
596
|
-
"GetCurrentScriptThreadID",
|
597
|
-
"GetScriptThreadID",
|
598
|
-
"GetScriptThreadState",
|
599
|
-
"InterruptScriptThread",
|
600
|
-
"Clone",
|
601
|
-
]
|
602
|
-
IActiveScriptParseMethods = ["InitNew", "AddScriptlet", "ParseScriptText"]
|
603
|
-
IObjectSafetyMethods = ["GetInterfaceSafetyOptions", "SetInterfaceSafetyOptions"]
|
604
|
-
|
605
|
-
# ActiveScriptParseProcedure is a new interface with IIS4/IE4.
|
606
|
-
IActiveScriptParseProcedureMethods = ["ParseProcedureText"]
|
607
|
-
|
608
|
-
|
609
|
-
class COMScript:
|
610
|
-
"""An ActiveX Scripting engine base class.
|
611
|
-
|
612
|
-
This class implements the required COM interfaces for ActiveX scripting.
|
613
|
-
"""
|
614
|
-
|
615
|
-
_public_methods_ = (
|
616
|
-
IActiveScriptMethods
|
617
|
-
+ IActiveScriptParseMethods
|
618
|
-
+ IObjectSafetyMethods
|
619
|
-
+ IActiveScriptParseProcedureMethods
|
620
|
-
)
|
621
|
-
_com_interfaces_ = [
|
622
|
-
axscript.IID_IActiveScript,
|
623
|
-
axscript.IID_IActiveScriptParse,
|
624
|
-
axscript.IID_IObjectSafety,
|
625
|
-
] # , axscript.IID_IActiveScriptParseProcedure]
|
626
|
-
|
627
|
-
def __init__(self):
|
628
|
-
# Make sure we can print/trace wihout an exception!
|
629
|
-
MakeValidSysOuts()
|
630
|
-
# trace("AXScriptEngine object created", self)
|
631
|
-
self.baseThreadId = -1
|
632
|
-
self.debugManager = None
|
633
|
-
self.threadState = axscript.SCRIPTTHREADSTATE_NOTINSCRIPT
|
634
|
-
self.scriptState = axscript.SCRIPTSTATE_UNINITIALIZED
|
635
|
-
self.scriptSite = None
|
636
|
-
self.safetyOptions = 0
|
637
|
-
self.lcid = 0
|
638
|
-
self.subItems = {}
|
639
|
-
self.scriptCodeBlocks: dict[str, AXScriptCodeBlock] = {}
|
640
|
-
|
641
|
-
def _query_interface_(self, iid):
|
642
|
-
if self.debugManager:
|
643
|
-
return self.debugManager._query_interface_for_debugger_(iid)
|
644
|
-
# trace("ScriptEngine QI - unknown IID", iid)
|
645
|
-
return 0
|
646
|
-
|
647
|
-
# IActiveScriptParse
|
648
|
-
def InitNew(self):
|
649
|
-
if self.scriptSite is not None:
|
650
|
-
self.SetScriptState(axscript.SCRIPTSTATE_INITIALIZED)
|
651
|
-
|
652
|
-
def AddScriptlet(
|
653
|
-
self,
|
654
|
-
defaultName,
|
655
|
-
code,
|
656
|
-
itemName,
|
657
|
-
subItemName,
|
658
|
-
eventName,
|
659
|
-
delimiter,
|
660
|
-
sourceContextCookie,
|
661
|
-
startLineNumber,
|
662
|
-
):
|
663
|
-
# trace ("AddScriptlet", defaultName, code, itemName, subItemName, eventName, delimiter, sourceContextCookie, startLineNumber)
|
664
|
-
self.DoAddScriptlet(
|
665
|
-
defaultName,
|
666
|
-
code,
|
667
|
-
itemName,
|
668
|
-
subItemName,
|
669
|
-
eventName,
|
670
|
-
delimiter,
|
671
|
-
sourceContextCookie,
|
672
|
-
startLineNumber,
|
673
|
-
)
|
674
|
-
|
675
|
-
def ParseScriptText(
|
676
|
-
self,
|
677
|
-
code,
|
678
|
-
itemName,
|
679
|
-
context,
|
680
|
-
delimiter,
|
681
|
-
sourceContextCookie,
|
682
|
-
startLineNumber,
|
683
|
-
flags,
|
684
|
-
bWantResult,
|
685
|
-
):
|
686
|
-
# trace ("ParseScriptText", code[:20],"...", itemName, context, delimiter, sourceContextCookie, startLineNumber, flags, bWantResult)
|
687
|
-
if (
|
688
|
-
bWantResult
|
689
|
-
or self.scriptState == axscript.SCRIPTSTATE_STARTED
|
690
|
-
or self.scriptState == axscript.SCRIPTSTATE_CONNECTED
|
691
|
-
or self.scriptState == axscript.SCRIPTSTATE_DISCONNECTED
|
692
|
-
):
|
693
|
-
flags |= SCRIPTTEXT_FORCEEXECUTION
|
694
|
-
else:
|
695
|
-
flags &= ~SCRIPTTEXT_FORCEEXECUTION
|
696
|
-
|
697
|
-
if flags & SCRIPTTEXT_FORCEEXECUTION:
|
698
|
-
# About to execute the code.
|
699
|
-
self.RegisterNewNamedItems()
|
700
|
-
return self.DoParseScriptText(
|
701
|
-
code, sourceContextCookie, startLineNumber, bWantResult, flags
|
702
|
-
)
|
703
|
-
|
704
|
-
#
|
705
|
-
# IActiveScriptParseProcedure
|
706
|
-
def ParseProcedureText(
|
707
|
-
self,
|
708
|
-
code,
|
709
|
-
formalParams,
|
710
|
-
procName,
|
711
|
-
itemName,
|
712
|
-
unkContext,
|
713
|
-
delimiter,
|
714
|
-
contextCookie,
|
715
|
-
startingLineNumber,
|
716
|
-
flags,
|
717
|
-
):
|
718
|
-
trace(
|
719
|
-
"ParseProcedureText",
|
720
|
-
code,
|
721
|
-
formalParams,
|
722
|
-
procName,
|
723
|
-
itemName,
|
724
|
-
unkContext,
|
725
|
-
delimiter,
|
726
|
-
contextCookie,
|
727
|
-
startingLineNumber,
|
728
|
-
flags,
|
729
|
-
)
|
730
|
-
# NOTE - this is never called, as we have disabled this interface.
|
731
|
-
# Problem is, once enabled all even code comes via here, rather than AddScriptlet.
|
732
|
-
# However, the "procName" is always an empty string - ie, itemName is the object whose event we are handling,
|
733
|
-
# but no idea what the specific event is!?
|
734
|
-
# Problem is disabling this block is that AddScriptlet is _not_ passed
|
735
|
-
# <SCRIPT for="whatever" event="onClick" language="Python">
|
736
|
-
# (but even for those blocks, the "onClick" information is still missing!?!?!?)
|
737
|
-
|
738
|
-
# self.DoAddScriptlet(None, code, itemName, subItemName, eventName, delimiter,sourceContextCookie, startLineNumber)
|
739
|
-
return None
|
740
|
-
|
741
|
-
#
|
742
|
-
# IActiveScript
|
743
|
-
def SetScriptSite(self, site):
|
744
|
-
# We should still work with an existing site (or so MSXML believes :)
|
745
|
-
self.scriptSite = site
|
746
|
-
if self.debugManager is not None:
|
747
|
-
self.debugManager.Close()
|
748
|
-
import traceback
|
749
|
-
|
750
|
-
try:
|
751
|
-
import win32com.axdebug.axdebug # see if the core exists.
|
752
|
-
|
753
|
-
from . import debug
|
754
|
-
|
755
|
-
self.debugManager = debug.DebugManager(self)
|
756
|
-
except pythoncom.com_error:
|
757
|
-
# COM errors will occur if the debugger interface has never been
|
758
|
-
# seen on the target system
|
759
|
-
trace("Debugging interfaces not available - debugging is disabled..")
|
760
|
-
self.debugManager = None
|
761
|
-
except ImportError:
|
762
|
-
trace(
|
763
|
-
"Debugging extensions (axdebug) module does not exist - debugging is disabled.."
|
764
|
-
)
|
765
|
-
self.debugManager = None
|
766
|
-
except:
|
767
|
-
traceback.print_exc()
|
768
|
-
trace(
|
769
|
-
"*** Debugger Manager could not initialize - {}: {}".format(
|
770
|
-
sys.exc_info()[0], sys.exc_info()[1]
|
771
|
-
)
|
772
|
-
)
|
773
|
-
self.debugManager = None
|
774
|
-
|
775
|
-
try:
|
776
|
-
self.lcid = site.GetLCID()
|
777
|
-
except pythoncom.com_error:
|
778
|
-
self.lcid = win32api.GetUserDefaultLCID()
|
779
|
-
self.Reset()
|
780
|
-
|
781
|
-
def GetScriptSite(self, iid):
|
782
|
-
if self.scriptSite is None:
|
783
|
-
raise COMException(scode=winerror.S_FALSE)
|
784
|
-
return self.scriptSite.QueryInterface(iid)
|
785
|
-
|
786
|
-
def SetScriptState(self, state):
|
787
|
-
# print(f"SetScriptState with {state_map.get(state)} - currentstate = {state_map.get(self.scriptState)}"
|
788
|
-
if state == self.scriptState:
|
789
|
-
return
|
790
|
-
# If closed, allow no other state transitions
|
791
|
-
if self.scriptState == axscript.SCRIPTSTATE_CLOSED:
|
792
|
-
raise COMException(scode=winerror.E_INVALIDARG)
|
793
|
-
|
794
|
-
if state == axscript.SCRIPTSTATE_INITIALIZED:
|
795
|
-
# Re-initialize - shutdown then reset.
|
796
|
-
if self.scriptState in [
|
797
|
-
axscript.SCRIPTSTATE_CONNECTED,
|
798
|
-
axscript.SCRIPTSTATE_STARTED,
|
799
|
-
]:
|
800
|
-
self.Stop()
|
801
|
-
elif state == axscript.SCRIPTSTATE_STARTED:
|
802
|
-
if self.scriptState == axscript.SCRIPTSTATE_CONNECTED:
|
803
|
-
self.Disconnect()
|
804
|
-
if self.scriptState == axscript.SCRIPTSTATE_DISCONNECTED:
|
805
|
-
self.Reset()
|
806
|
-
self.Run()
|
807
|
-
self.ChangeScriptState(axscript.SCRIPTSTATE_STARTED)
|
808
|
-
elif state == axscript.SCRIPTSTATE_CONNECTED:
|
809
|
-
if self.scriptState in [
|
810
|
-
axscript.SCRIPTSTATE_UNINITIALIZED,
|
811
|
-
axscript.SCRIPTSTATE_INITIALIZED,
|
812
|
-
]:
|
813
|
-
self.ChangeScriptState(
|
814
|
-
axscript.SCRIPTSTATE_STARTED
|
815
|
-
) # report transition through started
|
816
|
-
self.Run()
|
817
|
-
if self.scriptState == axscript.SCRIPTSTATE_STARTED:
|
818
|
-
self.Connect()
|
819
|
-
self.ChangeScriptState(state)
|
820
|
-
elif state == axscript.SCRIPTSTATE_DISCONNECTED:
|
821
|
-
if self.scriptState == axscript.SCRIPTSTATE_CONNECTED:
|
822
|
-
self.Disconnect()
|
823
|
-
elif state == axscript.SCRIPTSTATE_CLOSED:
|
824
|
-
self.Close()
|
825
|
-
elif state == axscript.SCRIPTSTATE_UNINITIALIZED:
|
826
|
-
if self.scriptState == axscript.SCRIPTSTATE_STARTED:
|
827
|
-
self.Stop()
|
828
|
-
if self.scriptState == axscript.SCRIPTSTATE_CONNECTED:
|
829
|
-
self.Disconnect()
|
830
|
-
if self.scriptState == axscript.SCRIPTSTATE_DISCONNECTED:
|
831
|
-
self.Reset()
|
832
|
-
self.ChangeScriptState(state)
|
833
|
-
else:
|
834
|
-
raise COMException(scode=winerror.E_INVALIDARG)
|
835
|
-
|
836
|
-
def GetScriptState(self):
|
837
|
-
return self.scriptState
|
838
|
-
|
839
|
-
def Close(self):
|
840
|
-
# trace("Close")
|
841
|
-
if self.scriptState in [
|
842
|
-
axscript.SCRIPTSTATE_CONNECTED,
|
843
|
-
axscript.SCRIPTSTATE_DISCONNECTED,
|
844
|
-
]:
|
845
|
-
self.Stop()
|
846
|
-
if self.scriptState in [
|
847
|
-
axscript.SCRIPTSTATE_CONNECTED,
|
848
|
-
axscript.SCRIPTSTATE_DISCONNECTED,
|
849
|
-
axscript.SCRIPTSTATE_INITIALIZED,
|
850
|
-
axscript.SCRIPTSTATE_STARTED,
|
851
|
-
]:
|
852
|
-
pass # engine.close??
|
853
|
-
if self.scriptState in [
|
854
|
-
axscript.SCRIPTSTATE_UNINITIALIZED,
|
855
|
-
axscript.SCRIPTSTATE_CONNECTED,
|
856
|
-
axscript.SCRIPTSTATE_DISCONNECTED,
|
857
|
-
axscript.SCRIPTSTATE_INITIALIZED,
|
858
|
-
axscript.SCRIPTSTATE_STARTED,
|
859
|
-
]:
|
860
|
-
self.ChangeScriptState(axscript.SCRIPTSTATE_CLOSED)
|
861
|
-
# Completely reset all named items (including persistent)
|
862
|
-
for item in self.subItems.values():
|
863
|
-
item.Close()
|
864
|
-
self.subItems = {}
|
865
|
-
self.baseThreadId = -1
|
866
|
-
if self.debugManager:
|
867
|
-
self.debugManager.Close()
|
868
|
-
self.debugManager = None
|
869
|
-
self.scriptSite = None
|
870
|
-
self.scriptCodeBlocks = {}
|
871
|
-
self.persistLoaded = 0
|
872
|
-
|
873
|
-
def AddNamedItem(self, name, flags):
|
874
|
-
if self.scriptSite is None:
|
875
|
-
raise COMException(scode=winerror.E_INVALIDARG)
|
876
|
-
try:
|
877
|
-
unknown = self.scriptSite.GetItemInfo(name, axscript.SCRIPTINFO_IUNKNOWN)[0]
|
878
|
-
dispatch = unknown.QueryInterface(pythoncom.IID_IDispatch)
|
879
|
-
except pythoncom.com_error:
|
880
|
-
raise COMException(
|
881
|
-
scode=winerror.E_NOINTERFACE,
|
882
|
-
desc="Object has no dispatch interface available.",
|
883
|
-
)
|
884
|
-
newItem = self.subItems[name] = self.GetNamedItemClass()(
|
885
|
-
self, name, dispatch, flags
|
886
|
-
)
|
887
|
-
if newItem.IsGlobal():
|
888
|
-
newItem.CreateConnections()
|
889
|
-
|
890
|
-
def GetScriptDispatch(self, name):
|
891
|
-
# Base classes should override.
|
892
|
-
raise COMException(scode=winerror.E_NOTIMPL)
|
893
|
-
|
894
|
-
def GetCurrentScriptThreadID(self):
|
895
|
-
return self.baseThreadId
|
896
|
-
|
897
|
-
def GetScriptThreadID(self, win32ThreadId):
|
898
|
-
if self.baseThreadId == -1:
|
899
|
-
raise COMException(scode=winerror.E_UNEXPECTED)
|
900
|
-
if self.baseThreadId != win32ThreadId:
|
901
|
-
raise COMException(scode=winerror.E_INVALIDARG)
|
902
|
-
return self.baseThreadId
|
903
|
-
|
904
|
-
def GetScriptThreadState(self, scriptThreadId):
|
905
|
-
if self.baseThreadId == -1:
|
906
|
-
raise COMException(scode=winerror.E_UNEXPECTED)
|
907
|
-
if scriptThreadId != self.baseThreadId:
|
908
|
-
raise COMException(scode=winerror.E_INVALIDARG)
|
909
|
-
return self.threadState
|
910
|
-
|
911
|
-
def AddTypeLib(self, uuid, major, minor, flags):
|
912
|
-
# Get the win32com gencache to register this library.
|
913
|
-
from win32com.client import gencache
|
914
|
-
|
915
|
-
gencache.EnsureModule(uuid, self.lcid, major, minor, bForDemand=1)
|
916
|
-
|
917
|
-
# This is never called by the C++ framework - it does magic.
|
918
|
-
# See PyGActiveScript.cpp
|
919
|
-
# def InterruptScriptThread(self, stidThread, exc_info, flags):
|
920
|
-
# raise COMException("Not Implemented", scode=winerror.E_NOTIMPL)
|
921
|
-
|
922
|
-
def Clone(self):
|
923
|
-
raise COMException("Not Implemented", scode=winerror.E_NOTIMPL)
|
924
|
-
|
925
|
-
#
|
926
|
-
# IObjectSafety
|
927
|
-
|
928
|
-
# Note that IE seems to insist we say we support all the flags, even tho
|
929
|
-
# we don't accept them all. If unknown flags come in, they are ignored, and never
|
930
|
-
# reflected in GetInterfaceSafetyOptions and the QIs obviously fail, but still IE
|
931
|
-
# allows our engine to initialize.
|
932
|
-
def SetInterfaceSafetyOptions(self, iid, optionsMask, enabledOptions):
|
933
|
-
# trace ("SetInterfaceSafetyOptions", iid, optionsMask, enabledOptions)
|
934
|
-
if optionsMask & enabledOptions == 0:
|
935
|
-
return
|
936
|
-
|
937
|
-
# See comments above.
|
938
|
-
# if (optionsMask & enabledOptions & \
|
939
|
-
# ~(axscript.INTERFACESAFE_FOR_UNTRUSTED_DATA | axscript.INTERFACESAFE_FOR_UNTRUSTED_CALLER)):
|
940
|
-
# # request for options we don't understand
|
941
|
-
# RaiseAssert(scode=winerror.E_FAIL, desc="Unknown safety options")
|
942
|
-
|
943
|
-
if iid in [
|
944
|
-
pythoncom.IID_IPersist,
|
945
|
-
pythoncom.IID_IPersistStream,
|
946
|
-
pythoncom.IID_IPersistStreamInit,
|
947
|
-
axscript.IID_IActiveScript,
|
948
|
-
axscript.IID_IActiveScriptParse,
|
949
|
-
]:
|
950
|
-
supported = self._GetSupportedInterfaceSafetyOptions()
|
951
|
-
self.safetyOptions = supported & optionsMask & enabledOptions
|
952
|
-
else:
|
953
|
-
raise COMException(scode=winerror.E_NOINTERFACE)
|
954
|
-
|
955
|
-
def _GetSupportedInterfaceSafetyOptions(self):
|
956
|
-
return 0
|
957
|
-
|
958
|
-
def GetInterfaceSafetyOptions(self, iid):
|
959
|
-
if iid in [
|
960
|
-
pythoncom.IID_IPersist,
|
961
|
-
pythoncom.IID_IPersistStream,
|
962
|
-
pythoncom.IID_IPersistStreamInit,
|
963
|
-
axscript.IID_IActiveScript,
|
964
|
-
axscript.IID_IActiveScriptParse,
|
965
|
-
]:
|
966
|
-
supported = self._GetSupportedInterfaceSafetyOptions()
|
967
|
-
return supported, self.safetyOptions
|
968
|
-
else:
|
969
|
-
raise COMException(scode=winerror.E_NOINTERFACE)
|
970
|
-
|
971
|
-
#
|
972
|
-
# Other helpers.
|
973
|
-
def ExecutePendingScripts(self):
|
974
|
-
self.RegisterNewNamedItems()
|
975
|
-
self.DoExecutePendingScripts()
|
976
|
-
|
977
|
-
def ProcessScriptItemEvent(self, item, event, lcid, wFlags, args):
|
978
|
-
# trace("ProcessScriptItemEvent", item, event, lcid, wFlags, args)
|
979
|
-
self.RegisterNewNamedItems()
|
980
|
-
return self.DoProcessScriptItemEvent(item, event, lcid, wFlags, args)
|
981
|
-
|
982
|
-
def _DumpNamedItems_(self):
|
983
|
-
for item in self.subItems.values():
|
984
|
-
item._dump_(0)
|
985
|
-
|
986
|
-
def ResetNamedItems(self):
|
987
|
-
# Due to the way we work, we re-create persistent ones.
|
988
|
-
existing = self.subItems
|
989
|
-
self.subItems = {}
|
990
|
-
for item in existing.values():
|
991
|
-
item.Close()
|
992
|
-
if item.flags & axscript.SCRIPTITEM_ISPERSISTENT:
|
993
|
-
self.AddNamedItem(item.name, item.flags)
|
994
|
-
|
995
|
-
def GetCurrentSafetyOptions(self):
|
996
|
-
return self.safetyOptions
|
997
|
-
|
998
|
-
def ProcessNewNamedItemsConnections(self):
|
999
|
-
# Process all sub-items.
|
1000
|
-
for item in self.subItems.values():
|
1001
|
-
if not item.createdConnections: # Fast-track!
|
1002
|
-
item.CreateConnections()
|
1003
|
-
|
1004
|
-
def RegisterNewNamedItems(self):
|
1005
|
-
# Register all sub-items.
|
1006
|
-
for item in self.subItems.values():
|
1007
|
-
if not item.isRegistered: # Fast-track!
|
1008
|
-
self.RegisterNamedItem(item)
|
1009
|
-
|
1010
|
-
def RegisterNamedItem(self, item):
|
1011
|
-
item.Register()
|
1012
|
-
|
1013
|
-
def CheckConnectedOrDisconnected(self):
|
1014
|
-
if self.scriptState in [
|
1015
|
-
axscript.SCRIPTSTATE_CONNECTED,
|
1016
|
-
axscript.SCRIPTSTATE_DISCONNECTED,
|
1017
|
-
]:
|
1018
|
-
return
|
1019
|
-
RaiseAssert(
|
1020
|
-
winerror.E_UNEXPECTED,
|
1021
|
-
"Not connected or disconnected - %d" % self.scriptState,
|
1022
|
-
)
|
1023
|
-
|
1024
|
-
def Connect(self):
|
1025
|
-
self.ProcessNewNamedItemsConnections()
|
1026
|
-
self.RegisterNewNamedItems()
|
1027
|
-
self.ConnectEventHandlers()
|
1028
|
-
|
1029
|
-
def Run(self):
|
1030
|
-
# trace("AXScript running...")
|
1031
|
-
if (
|
1032
|
-
self.scriptState != axscript.SCRIPTSTATE_INITIALIZED
|
1033
|
-
and self.scriptState != axscript.SCRIPTSTATE_STARTED
|
1034
|
-
):
|
1035
|
-
raise COMException(scode=winerror.E_UNEXPECTED)
|
1036
|
-
# self._DumpNamedItems_()
|
1037
|
-
self.ExecutePendingScripts()
|
1038
|
-
self.DoRun()
|
1039
|
-
|
1040
|
-
def Stop(self):
|
1041
|
-
# Stop all executing scripts, and disconnect.
|
1042
|
-
if self.scriptState == axscript.SCRIPTSTATE_CONNECTED:
|
1043
|
-
self.Disconnect()
|
1044
|
-
# Reset back to initialized.
|
1045
|
-
self.Reset()
|
1046
|
-
|
1047
|
-
def Disconnect(self):
|
1048
|
-
self.CheckConnectedOrDisconnected()
|
1049
|
-
try:
|
1050
|
-
self.DisconnectEventHandlers()
|
1051
|
-
except pythoncom.com_error:
|
1052
|
-
# Ignore errors when disconnecting.
|
1053
|
-
pass
|
1054
|
-
|
1055
|
-
self.ChangeScriptState(axscript.SCRIPTSTATE_DISCONNECTED)
|
1056
|
-
|
1057
|
-
def ConnectEventHandlers(self):
|
1058
|
-
# trace ("Connecting to event handlers")
|
1059
|
-
for item in self.subItems.values():
|
1060
|
-
item.Connect()
|
1061
|
-
self.ChangeScriptState(axscript.SCRIPTSTATE_CONNECTED)
|
1062
|
-
|
1063
|
-
def DisconnectEventHandlers(self):
|
1064
|
-
# trace ("Disconnecting from event handlers")
|
1065
|
-
for item in self.subItems.values():
|
1066
|
-
item.Disconnect()
|
1067
|
-
|
1068
|
-
def Reset(self):
|
1069
|
-
# Keeping persistent engine state, reset back an initialized state
|
1070
|
-
self.ResetNamedItems()
|
1071
|
-
self.ChangeScriptState(axscript.SCRIPTSTATE_INITIALIZED)
|
1072
|
-
|
1073
|
-
def ChangeScriptState(self, state):
|
1074
|
-
# print(f" ChangeScriptState with {state_map.get(state)} - currentstate = {state_map.get(self.scriptState)}")
|
1075
|
-
self.DisableInterrupts()
|
1076
|
-
try:
|
1077
|
-
self.scriptState = state
|
1078
|
-
try:
|
1079
|
-
if self.scriptSite:
|
1080
|
-
self.scriptSite.OnStateChange(state)
|
1081
|
-
except pythoncom.com_error as xxx_todo_changeme:
|
1082
|
-
(hr, desc, exc, arg) = xxx_todo_changeme.args
|
1083
|
-
finally:
|
1084
|
-
self.EnableInterrupts()
|
1085
|
-
|
1086
|
-
# This stack frame is debugged - therefore we do as little as possible in it.
|
1087
|
-
def _ApplyInScriptedSection(self, fn, args):
|
1088
|
-
if self.debugManager:
|
1089
|
-
self.debugManager.OnEnterScript()
|
1090
|
-
if self.debugManager.adb.appDebugger:
|
1091
|
-
return self.debugManager.adb.runcall(fn, *args)
|
1092
|
-
else:
|
1093
|
-
return fn(*args)
|
1094
|
-
else:
|
1095
|
-
return fn(*args)
|
1096
|
-
|
1097
|
-
def ApplyInScriptedSection(self, codeBlock: AXScriptCodeBlock | None, fn, args):
|
1098
|
-
self.BeginScriptedSection()
|
1099
|
-
try:
|
1100
|
-
try:
|
1101
|
-
# print("ApplyInSS", codeBlock, fn, args)
|
1102
|
-
return self._ApplyInScriptedSection(fn, args)
|
1103
|
-
finally:
|
1104
|
-
if self.debugManager:
|
1105
|
-
self.debugManager.OnLeaveScript()
|
1106
|
-
self.EndScriptedSection()
|
1107
|
-
except:
|
1108
|
-
self.HandleException(codeBlock)
|
1109
|
-
|
1110
|
-
# This stack frame is debugged - therefore we do as little as possible in it.
|
1111
|
-
def _CompileInScriptedSection(self, code, name, type):
|
1112
|
-
if self.debugManager:
|
1113
|
-
self.debugManager.OnEnterScript()
|
1114
|
-
return compile(code, name, type)
|
1115
|
-
|
1116
|
-
def CompileInScriptedSection(
|
1117
|
-
self, codeBlock: AXScriptCodeBlock, type, realCode=None
|
1118
|
-
):
|
1119
|
-
if codeBlock.codeObject is not None: # already compiled
|
1120
|
-
return 1
|
1121
|
-
if realCode is None:
|
1122
|
-
code = codeBlock.codeText
|
1123
|
-
else:
|
1124
|
-
code = realCode
|
1125
|
-
name = codeBlock.GetFileName()
|
1126
|
-
self.BeginScriptedSection()
|
1127
|
-
try:
|
1128
|
-
try:
|
1129
|
-
codeObject = self._CompileInScriptedSection(RemoveCR(code), name, type)
|
1130
|
-
codeBlock.codeObject = codeObject
|
1131
|
-
return 1
|
1132
|
-
finally:
|
1133
|
-
if self.debugManager:
|
1134
|
-
self.debugManager.OnLeaveScript()
|
1135
|
-
self.EndScriptedSection()
|
1136
|
-
except:
|
1137
|
-
self.HandleException(codeBlock)
|
1138
|
-
|
1139
|
-
# This stack frame is debugged - therefore we do as little as possible in it.
|
1140
|
-
def _ExecInScriptedSection(self, codeObject, globals, locals=None):
|
1141
|
-
if self.debugManager:
|
1142
|
-
self.debugManager.OnEnterScript()
|
1143
|
-
if self.debugManager.adb.appDebugger:
|
1144
|
-
return self.debugManager.adb.run(codeObject, globals, locals)
|
1145
|
-
else:
|
1146
|
-
exec(codeObject, globals, locals)
|
1147
|
-
else:
|
1148
|
-
exec(codeObject, globals, locals)
|
1149
|
-
|
1150
|
-
def ExecInScriptedSection(self, codeBlock: AXScriptCodeBlock, globals, locals=None):
|
1151
|
-
if locals is None:
|
1152
|
-
locals = globals
|
1153
|
-
assert (
|
1154
|
-
not codeBlock.beenExecuted
|
1155
|
-
), "This code block should not have been executed"
|
1156
|
-
codeBlock.beenExecuted = 1
|
1157
|
-
self.BeginScriptedSection()
|
1158
|
-
try:
|
1159
|
-
try:
|
1160
|
-
self._ExecInScriptedSection(codeBlock.codeObject, globals, locals)
|
1161
|
-
finally:
|
1162
|
-
if self.debugManager:
|
1163
|
-
self.debugManager.OnLeaveScript()
|
1164
|
-
self.EndScriptedSection()
|
1165
|
-
except:
|
1166
|
-
self.HandleException(codeBlock)
|
1167
|
-
|
1168
|
-
def _EvalInScriptedSection(self, codeBlock, globals, locals=None):
|
1169
|
-
if self.debugManager:
|
1170
|
-
self.debugManager.OnEnterScript()
|
1171
|
-
if self.debugManager.adb.appDebugger:
|
1172
|
-
return self.debugManager.adb.runeval(codeBlock, globals, locals)
|
1173
|
-
else:
|
1174
|
-
return eval(codeBlock, globals, locals)
|
1175
|
-
else:
|
1176
|
-
return eval(codeBlock, globals, locals)
|
1177
|
-
|
1178
|
-
def EvalInScriptedSection(self, codeBlock, globals, locals=None):
|
1179
|
-
if locals is None:
|
1180
|
-
locals = globals
|
1181
|
-
assert (
|
1182
|
-
not codeBlock.beenExecuted
|
1183
|
-
), "This code block should not have been executed"
|
1184
|
-
codeBlock.beenExecuted = 1
|
1185
|
-
self.BeginScriptedSection()
|
1186
|
-
try:
|
1187
|
-
try:
|
1188
|
-
return self._EvalInScriptedSection(
|
1189
|
-
codeBlock.codeObject, globals, locals
|
1190
|
-
)
|
1191
|
-
finally:
|
1192
|
-
if self.debugManager:
|
1193
|
-
self.debugManager.OnLeaveScript()
|
1194
|
-
self.EndScriptedSection()
|
1195
|
-
except:
|
1196
|
-
self.HandleException(codeBlock)
|
1197
|
-
|
1198
|
-
def HandleException(self, codeBlock: AXScriptCodeBlock | None) -> NoReturn:
|
1199
|
-
"""Never returns - raises a ComException"""
|
1200
|
-
exc_type, exc_value, *_ = sys.exc_info()
|
1201
|
-
# If a SERVER exception, re-raise it. If a client side COM error, it is
|
1202
|
-
# likely to have originated from the script code itself, and therefore
|
1203
|
-
# needs to be reported like any other exception.
|
1204
|
-
if IsCOMServerException(exc_type):
|
1205
|
-
# Ensure the traceback doesn't cause a cycle.
|
1206
|
-
raise
|
1207
|
-
# It could be an error by another script.
|
1208
|
-
if (
|
1209
|
-
isinstance(exc_value, pythoncom.com_error)
|
1210
|
-
and exc_value.hresult == axscript.SCRIPT_E_REPORTED
|
1211
|
-
):
|
1212
|
-
# Ensure the traceback doesn't cause a cycle.
|
1213
|
-
raise COMException(scode=exc_value.hresult)
|
1214
|
-
|
1215
|
-
exception = error.AXScriptException(self, codeBlock, exc_value=exc_value)
|
1216
|
-
|
1217
|
-
# Ensure the traceback doesn't cause a cycle.
|
1218
|
-
result_exception = error.ProcessAXScriptException(
|
1219
|
-
self.scriptSite, self.debugManager, exception
|
1220
|
-
)
|
1221
|
-
if result_exception is not None:
|
1222
|
-
try:
|
1223
|
-
self.scriptSite.OnScriptTerminate(None, result_exception)
|
1224
|
-
except pythoncom.com_error:
|
1225
|
-
pass # Ignore errors telling engine we stopped.
|
1226
|
-
# reset ourselves to 'connected' so further events continue to fire.
|
1227
|
-
self.SetScriptState(axscript.SCRIPTSTATE_CONNECTED)
|
1228
|
-
raise result_exception
|
1229
|
-
# I think that in some cases this should just return - but the code
|
1230
|
-
# that could return None above is disabled, so it never happens.
|
1231
|
-
RaiseAssert(
|
1232
|
-
winerror.E_UNEXPECTED, "Don't have an exception to raise to the caller!"
|
1233
|
-
)
|
1234
|
-
|
1235
|
-
def BeginScriptedSection(self):
|
1236
|
-
if self.scriptSite is None:
|
1237
|
-
raise COMException(scode=winerror.E_UNEXPECTED)
|
1238
|
-
self.scriptSite.OnEnterScript()
|
1239
|
-
|
1240
|
-
def EndScriptedSection(self):
|
1241
|
-
if self.scriptSite is None:
|
1242
|
-
raise COMException(scode=winerror.E_UNEXPECTED)
|
1243
|
-
self.scriptSite.OnLeaveScript()
|
1244
|
-
|
1245
|
-
def DisableInterrupts(self):
|
1246
|
-
pass
|
1247
|
-
|
1248
|
-
def EnableInterrupts(self):
|
1249
|
-
pass
|
1250
|
-
|
1251
|
-
def GetNamedItem(self, name):
|
1252
|
-
try:
|
1253
|
-
return self.subItems[name]
|
1254
|
-
except KeyError:
|
1255
|
-
raise COMException(scode=winerror.E_INVALIDARG)
|
1256
|
-
|
1257
|
-
def GetNamedItemClass(self):
|
1258
|
-
return ScriptItem
|
1259
|
-
|
1260
|
-
def _AddScriptCodeBlock(self, codeBlock):
|
1261
|
-
self.scriptCodeBlocks[codeBlock.GetFileName()] = codeBlock
|
1262
|
-
if self.debugManager:
|
1263
|
-
self.debugManager.AddScriptBlock(codeBlock)
|
1264
|
-
|
1265
|
-
|
1266
|
-
if __name__ == "__main__":
|
1267
|
-
print("This is a framework class - please use pyscript.py etc")
|
1268
|
-
|
1269
|
-
|
1270
|
-
def dumptypeinfo(typeinfo):
|
1271
|
-
return
|
1272
|
-
attr = typeinfo.GetTypeAttr()
|
1273
|
-
# Loop over all methods
|
1274
|
-
print("Methods")
|
1275
|
-
for j in range(attr[6]):
|
1276
|
-
fdesc = list(typeinfo.GetFuncDesc(j))
|
1277
|
-
id = fdesc[0]
|
1278
|
-
try:
|
1279
|
-
names = typeinfo.GetNames(id)
|
1280
|
-
except pythoncom.ole_error:
|
1281
|
-
names = None
|
1282
|
-
doc = typeinfo.GetDocumentation(id)
|
1283
|
-
|
1284
|
-
print(" ", names, "has attr", fdesc)
|
1285
|
-
|
1286
|
-
# Loop over all variables (ie, properties)
|
1287
|
-
print("Variables")
|
1288
|
-
for j in range(attr[7]):
|
1289
|
-
fdesc = list(typeinfo.GetVarDesc(j))
|
1290
|
-
names = typeinfo.GetNames(id)
|
1291
|
-
print(" ", names, "has attr", fdesc)
|