py2docfx 0.1.15.dev2025736__py3-none-any.whl → 0.1.15.dev2038808__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 +34 -21
- py2docfx/docfx_yaml/tests/test_method_arguments.py +7 -1
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_core_metadata.py +21 -5
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +2 -0
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/ccompiler.py +5 -2
- py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/__init__.py +27 -8
- 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 +48 -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 +115 -9
- 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/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/setuptools/_core_metadata.py +21 -5
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +2 -0
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/ccompiler.py +5 -2
- py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/__init__.py +27 -8
- 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 +48 -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 +115 -9
- 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/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-0.1.15.dev2025736.dist-info → py2docfx-0.1.15.dev2038808.dist-info}/METADATA +1 -1
- {py2docfx-0.1.15.dev2025736.dist-info → py2docfx-0.1.15.dev2038808.dist-info}/RECORD +136 -593
- py2docfx/docfx_yaml/tests/test_process_doctree.py +0 -120
- 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.15.dev2025736.dist-info → py2docfx-0.1.15.dev2038808.dist-info}/WHEEL +0 -0
- {py2docfx-0.1.15.dev2025736.dist-info → py2docfx-0.1.15.dev2038808.dist-info}/top_level.txt +0 -0
@@ -1,1350 +0,0 @@
|
|
1
|
-
"""genpy.py - The worker for makepy. See makepy.py for more details
|
2
|
-
|
3
|
-
This code was moved simply to speed Python in normal circumstances. As the makepy.py
|
4
|
-
is normally run from the command line, it reparses the code each time. Now makepy
|
5
|
-
is nothing more than the command line handler and public interface.
|
6
|
-
|
7
|
-
The makepy command line etc handling is also getting large enough in its own right!
|
8
|
-
"""
|
9
|
-
|
10
|
-
# NOTE - now supports a "demand" mechanism - the top-level is a package, and
|
11
|
-
# each class etc can be made individually.
|
12
|
-
# This should eventually become the default.
|
13
|
-
# Then the old non-package technique should be removed.
|
14
|
-
# There should be no b/w compat issues, and will just help clean the code.
|
15
|
-
# This will be done once the new "demand" mechanism gets a good workout.
|
16
|
-
import os
|
17
|
-
import sys
|
18
|
-
import time
|
19
|
-
from itertools import chain
|
20
|
-
|
21
|
-
import pythoncom
|
22
|
-
|
23
|
-
from . import build, gencache
|
24
|
-
|
25
|
-
makepy_version = "0.5.01" # Written to generated file.
|
26
|
-
|
27
|
-
GEN_FULL = "full"
|
28
|
-
GEN_DEMAND_BASE = "demand(base)"
|
29
|
-
GEN_DEMAND_CHILD = "demand(child)"
|
30
|
-
|
31
|
-
# This map is used purely for the users benefit -it shows the
|
32
|
-
# raw, underlying type of Alias/Enums, etc. The COM implementation
|
33
|
-
# does not use this map at runtime - all Alias/Enum have already
|
34
|
-
# been translated.
|
35
|
-
mapVTToTypeString = {
|
36
|
-
pythoncom.VT_I2: "int",
|
37
|
-
pythoncom.VT_I4: "int",
|
38
|
-
pythoncom.VT_R4: "float",
|
39
|
-
pythoncom.VT_R8: "float",
|
40
|
-
pythoncom.VT_BSTR: "str",
|
41
|
-
pythoncom.VT_BOOL: "int",
|
42
|
-
pythoncom.VT_VARIANT: "type",
|
43
|
-
pythoncom.VT_I1: "int",
|
44
|
-
pythoncom.VT_UI1: "int",
|
45
|
-
pythoncom.VT_UI2: "int",
|
46
|
-
pythoncom.VT_UI4: "int",
|
47
|
-
pythoncom.VT_I8: "int",
|
48
|
-
pythoncom.VT_UI8: "int",
|
49
|
-
pythoncom.VT_INT: "int",
|
50
|
-
pythoncom.VT_DATE: "datetime.date",
|
51
|
-
pythoncom.VT_UINT: "int",
|
52
|
-
}
|
53
|
-
|
54
|
-
|
55
|
-
# Given a propget function's arg desc, return the default parameters for all
|
56
|
-
# params bar the first. Eg, then Python does a:
|
57
|
-
# object.Property = "foo"
|
58
|
-
# Python can only pass the "foo" value. If the property has
|
59
|
-
# multiple args, and the rest have default values, this allows
|
60
|
-
# Python to correctly pass those defaults.
|
61
|
-
def MakeDefaultArgsForPropertyPut(argsDesc):
|
62
|
-
ret = []
|
63
|
-
for desc in argsDesc[1:]:
|
64
|
-
default = build.MakeDefaultArgRepr(desc)
|
65
|
-
if default is None:
|
66
|
-
break
|
67
|
-
ret.append(default)
|
68
|
-
return tuple(ret)
|
69
|
-
|
70
|
-
|
71
|
-
def MakeMapLineEntry(dispid, wFlags, retType, argTypes, user, resultCLSID):
|
72
|
-
# Strip the default value
|
73
|
-
argTypes = tuple([what[:2] for what in argTypes])
|
74
|
-
return '(%s, %d, %s, %s, "%s", %s)' % (
|
75
|
-
dispid,
|
76
|
-
wFlags,
|
77
|
-
retType[:2],
|
78
|
-
argTypes,
|
79
|
-
user,
|
80
|
-
resultCLSID,
|
81
|
-
)
|
82
|
-
|
83
|
-
|
84
|
-
def MakeEventMethodName(eventName):
|
85
|
-
if eventName[:2] == "On":
|
86
|
-
return eventName
|
87
|
-
else:
|
88
|
-
return "On" + eventName
|
89
|
-
|
90
|
-
|
91
|
-
def WriteSinkEventMap(obj, stream):
|
92
|
-
print("\t_dispid_to_func_ = {", file=stream)
|
93
|
-
for entry in chain(
|
94
|
-
obj.propMapGet.values(),
|
95
|
-
obj.propMapPut.values(),
|
96
|
-
obj.mapFuncs.values(),
|
97
|
-
):
|
98
|
-
memid = entry.desc.memid
|
99
|
-
print(
|
100
|
-
'\t\t%9d : "%s",' % (memid, MakeEventMethodName(entry.names[0])),
|
101
|
-
file=stream,
|
102
|
-
)
|
103
|
-
print("\t\t}", file=stream)
|
104
|
-
|
105
|
-
|
106
|
-
# MI is used to join my writable helpers, and the OLE
|
107
|
-
# classes.
|
108
|
-
class WritableItem:
|
109
|
-
def __lt__(self, other):
|
110
|
-
if self.order == other.order:
|
111
|
-
return self.doc < other.doc
|
112
|
-
return self.order < other.order
|
113
|
-
|
114
|
-
def __repr__(self):
|
115
|
-
return f"OleItem: doc={self.doc!r}, order={self.order}"
|
116
|
-
|
117
|
-
|
118
|
-
class RecordItem(build.OleItem, WritableItem):
|
119
|
-
order = 9
|
120
|
-
typename = "RECORD"
|
121
|
-
|
122
|
-
def __init__(self, typeInfo, typeAttr, doc=None, bForUser=1):
|
123
|
-
## sys.stderr.write("Record %s: size %s\n" % (doc,typeAttr.cbSizeInstance))
|
124
|
-
## sys.stderr.write(" cVars = %s\n" % (typeAttr.cVars,))
|
125
|
-
## for i in range(typeAttr.cVars):
|
126
|
-
## vdesc = typeInfo.GetVarDesc(i)
|
127
|
-
## sys.stderr.write(" Var %d has value %s, type %d, desc=%s\n" % (i, vdesc.value, vdesc.varkind, vdesc.elemdescVar))
|
128
|
-
## sys.stderr.write(" Doc is %s\n" % (typeInfo.GetDocumentation(vdesc.memid),))
|
129
|
-
|
130
|
-
build.OleItem.__init__(self, doc)
|
131
|
-
self.clsid = typeAttr[0]
|
132
|
-
|
133
|
-
def WriteClass(self, generator):
|
134
|
-
pass
|
135
|
-
|
136
|
-
|
137
|
-
# Given an enum, write all aliases for it.
|
138
|
-
# (no longer necessary for new style code, but still used for old code.
|
139
|
-
def WriteAliasesForItem(item, aliasItems, stream):
|
140
|
-
for alias in aliasItems.values():
|
141
|
-
if item.doc and alias.aliasDoc and (alias.aliasDoc[0] == item.doc[0]):
|
142
|
-
alias.WriteAliasItem(aliasItems, stream)
|
143
|
-
|
144
|
-
|
145
|
-
class AliasItem(build.OleItem, WritableItem):
|
146
|
-
order = 2
|
147
|
-
typename = "ALIAS"
|
148
|
-
|
149
|
-
def __init__(self, typeinfo, attr, doc=None, bForUser=1):
|
150
|
-
build.OleItem.__init__(self, doc)
|
151
|
-
|
152
|
-
ai = attr[14]
|
153
|
-
self.attr = attr
|
154
|
-
# XXX - This is a hack - why tuples? Need to resolve?
|
155
|
-
if isinstance(ai, tuple) and isinstance(ai[1], int):
|
156
|
-
href = ai[1]
|
157
|
-
alinfo = typeinfo.GetRefTypeInfo(href)
|
158
|
-
self.aliasDoc = alinfo.GetDocumentation(-1)
|
159
|
-
self.aliasAttr = alinfo.GetTypeAttr()
|
160
|
-
else:
|
161
|
-
self.aliasDoc = None
|
162
|
-
self.aliasAttr = None
|
163
|
-
|
164
|
-
def WriteAliasItem(self, aliasDict, stream):
|
165
|
-
# we could have been written as part of an alias dependency
|
166
|
-
if self.bWritten:
|
167
|
-
return
|
168
|
-
|
169
|
-
if self.aliasDoc:
|
170
|
-
depName = self.aliasDoc[0]
|
171
|
-
if depName in aliasDict:
|
172
|
-
aliasDict[depName].WriteAliasItem(aliasDict, stream)
|
173
|
-
print(self.doc[0] + " = " + depName, file=stream)
|
174
|
-
else:
|
175
|
-
ai = self.attr[14]
|
176
|
-
if isinstance(ai, int):
|
177
|
-
try:
|
178
|
-
typeStr = mapVTToTypeString[ai]
|
179
|
-
print(f"# {self.doc[0]}={typeStr}", file=stream)
|
180
|
-
except KeyError:
|
181
|
-
print(
|
182
|
-
self.doc[0] + " = None # Can't convert alias info " + str(ai),
|
183
|
-
file=stream,
|
184
|
-
)
|
185
|
-
print(file=stream)
|
186
|
-
self.bWritten = 1
|
187
|
-
|
188
|
-
|
189
|
-
class EnumerationItem(build.OleItem, WritableItem):
|
190
|
-
order = 1
|
191
|
-
typename = "ENUMERATION"
|
192
|
-
|
193
|
-
def __init__(self, typeinfo, attr, doc=None, bForUser=1):
|
194
|
-
build.OleItem.__init__(self, doc)
|
195
|
-
|
196
|
-
self.clsid = attr[0]
|
197
|
-
self.mapVars = {}
|
198
|
-
typeFlags = attr[11]
|
199
|
-
self.hidden = (
|
200
|
-
typeFlags & pythoncom.TYPEFLAG_FHIDDEN
|
201
|
-
or typeFlags & pythoncom.TYPEFLAG_FRESTRICTED
|
202
|
-
)
|
203
|
-
|
204
|
-
for j in range(attr[7]):
|
205
|
-
vdesc = typeinfo.GetVarDesc(j)
|
206
|
-
name = typeinfo.GetNames(vdesc[0])[0]
|
207
|
-
self.mapVars[name] = build.MapEntry(vdesc)
|
208
|
-
|
209
|
-
# def WriteEnumerationHeaders(self, aliasItems, stream):
|
210
|
-
# enumName = self.doc[0]
|
211
|
-
# print(f"{enumName}=constants # Compatibility with previous versions.", file=stream)
|
212
|
-
# WriteAliasesForItem(self, aliasItems)
|
213
|
-
|
214
|
-
def WriteEnumerationItems(self, stream):
|
215
|
-
num = 0
|
216
|
-
enumName = self.doc[0]
|
217
|
-
# Write in name alpha order
|
218
|
-
for name in sorted(self.mapVars):
|
219
|
-
entry = self.mapVars[name]
|
220
|
-
vdesc = entry.desc
|
221
|
-
if vdesc[4] == pythoncom.VAR_CONST:
|
222
|
-
val = vdesc[1]
|
223
|
-
|
224
|
-
use = repr(val)
|
225
|
-
# Make sure the repr of the value is valid python syntax
|
226
|
-
# still could cause an error on import if it contains a module or type name
|
227
|
-
# not available in the global namespace
|
228
|
-
try:
|
229
|
-
compile(use, "<makepy>", "eval")
|
230
|
-
except SyntaxError:
|
231
|
-
# At least add the repr as a string, so it can be investigated further
|
232
|
-
# Sanitize it, in case the repr contains its own quotes. (??? line breaks too ???)
|
233
|
-
use = use.replace('"', "'")
|
234
|
-
use = (
|
235
|
-
f'"{use}" # This VARIANT type cannot be converted automatically'
|
236
|
-
)
|
237
|
-
print(
|
238
|
-
"\t%-30s=%-10s # from enum %s"
|
239
|
-
% (build.MakePublicAttributeName(name, True), use, enumName),
|
240
|
-
file=stream,
|
241
|
-
)
|
242
|
-
num += 1
|
243
|
-
return num
|
244
|
-
|
245
|
-
|
246
|
-
class VTableItem(build.VTableItem, WritableItem):
|
247
|
-
order = 4
|
248
|
-
|
249
|
-
def WriteClass(self, generator):
|
250
|
-
self.WriteVTableMap(generator)
|
251
|
-
self.bWritten = 1
|
252
|
-
|
253
|
-
def WriteVTableMap(self, generator):
|
254
|
-
stream = generator.file
|
255
|
-
print(
|
256
|
-
"%s_vtables_dispatch_ = %d" % (self.python_name, self.bIsDispatch),
|
257
|
-
file=stream,
|
258
|
-
)
|
259
|
-
print(f"{self.python_name}_vtables_ = [", file=stream)
|
260
|
-
for v in self.vtableFuncs:
|
261
|
-
names, dispid, desc = v
|
262
|
-
assert desc.desckind == pythoncom.DESCKIND_FUNCDESC
|
263
|
-
arg_reprs = []
|
264
|
-
# more hoops so we don't generate huge lines.
|
265
|
-
item_num = 0
|
266
|
-
print("\t((", end=" ", file=stream)
|
267
|
-
for name in names:
|
268
|
-
print(repr(name), ",", end=" ", file=stream)
|
269
|
-
item_num += 1
|
270
|
-
if item_num % 5 == 0:
|
271
|
-
print("\n\t\t\t", end=" ", file=stream)
|
272
|
-
print(
|
273
|
-
"), %d, (%r, %r, [" % (dispid, desc.memid, desc.scodeArray),
|
274
|
-
end=" ",
|
275
|
-
file=stream,
|
276
|
-
)
|
277
|
-
for arg in desc.args:
|
278
|
-
item_num += 1
|
279
|
-
if item_num % 5 == 0:
|
280
|
-
print("\n\t\t\t", end=" ", file=stream)
|
281
|
-
defval = build.MakeDefaultArgRepr(arg)
|
282
|
-
if arg[3] is None:
|
283
|
-
arg3_repr = None
|
284
|
-
else:
|
285
|
-
arg3_repr = repr(arg[3])
|
286
|
-
print(
|
287
|
-
repr((arg[0], arg[1], defval, arg3_repr)), ",", end=" ", file=stream
|
288
|
-
)
|
289
|
-
print("],", end=" ", file=stream)
|
290
|
-
print(repr(desc.funckind), ",", end=" ", file=stream)
|
291
|
-
print(repr(desc.invkind), ",", end=" ", file=stream)
|
292
|
-
print(repr(desc.callconv), ",", end=" ", file=stream)
|
293
|
-
print(repr(desc.cParamsOpt), ",", end=" ", file=stream)
|
294
|
-
print(repr(desc.oVft), ",", end=" ", file=stream)
|
295
|
-
print(repr(desc.rettype), ",", end=" ", file=stream)
|
296
|
-
print(repr(desc.wFuncFlags), ",", end=" ", file=stream)
|
297
|
-
print(")),", file=stream)
|
298
|
-
print("]", file=stream)
|
299
|
-
print(file=stream)
|
300
|
-
|
301
|
-
|
302
|
-
class DispatchItem(build.DispatchItem, WritableItem):
|
303
|
-
order = 3
|
304
|
-
|
305
|
-
def __init__(self, typeinfo, attr, doc=None):
|
306
|
-
build.DispatchItem.__init__(self, typeinfo, attr, doc)
|
307
|
-
self.type_attr = attr
|
308
|
-
self.coclass_clsid = None
|
309
|
-
|
310
|
-
def WriteClass(self, generator):
|
311
|
-
if (
|
312
|
-
not self.bIsDispatch
|
313
|
-
and not self.type_attr.typekind == pythoncom.TKIND_DISPATCH
|
314
|
-
):
|
315
|
-
return
|
316
|
-
# This is pretty screwey - now we have vtable support we
|
317
|
-
# should probably rethink this (ie, maybe write both sides for sinks, etc)
|
318
|
-
if self.bIsSink:
|
319
|
-
self.WriteEventSinkClassHeader(generator)
|
320
|
-
self.WriteCallbackClassBody(generator)
|
321
|
-
else:
|
322
|
-
self.WriteClassHeader(generator)
|
323
|
-
self.WriteClassBody(generator)
|
324
|
-
print(file=generator.file)
|
325
|
-
self.bWritten = 1
|
326
|
-
|
327
|
-
def WriteClassHeader(self, generator):
|
328
|
-
generator.checkWriteDispatchBaseClass()
|
329
|
-
doc = self.doc
|
330
|
-
stream = generator.file
|
331
|
-
print("class " + self.python_name + "(DispatchBaseClass):", file=stream)
|
332
|
-
if doc[1]:
|
333
|
-
print("\t" + build._makeDocString(doc[1]), file=stream)
|
334
|
-
try:
|
335
|
-
progId = pythoncom.ProgIDFromCLSID(self.clsid)
|
336
|
-
print(
|
337
|
-
"\t# This class is creatable by the name '%s'" % (progId), file=stream
|
338
|
-
)
|
339
|
-
except pythoncom.com_error:
|
340
|
-
pass
|
341
|
-
print(f"\tCLSID = {self.clsid!r}", file=stream)
|
342
|
-
if self.coclass_clsid is None:
|
343
|
-
print("\tcoclass_clsid = None", file=stream)
|
344
|
-
else:
|
345
|
-
print(f"\tcoclass_clsid = {self.coclass_clsid!r}", file=stream)
|
346
|
-
print(file=stream)
|
347
|
-
self.bWritten = 1
|
348
|
-
|
349
|
-
def WriteEventSinkClassHeader(self, generator):
|
350
|
-
generator.checkWriteEventBaseClass()
|
351
|
-
doc = self.doc
|
352
|
-
stream = generator.file
|
353
|
-
print("class " + self.python_name + ":", file=stream)
|
354
|
-
if doc[1]:
|
355
|
-
print("\t" + build._makeDocString(doc[1]), file=stream)
|
356
|
-
try:
|
357
|
-
progId = pythoncom.ProgIDFromCLSID(self.clsid)
|
358
|
-
print(
|
359
|
-
"\t# This class is creatable by the name '%s'" % (progId), file=stream
|
360
|
-
)
|
361
|
-
except pythoncom.com_error:
|
362
|
-
pass
|
363
|
-
print(f"\tCLSID = CLSID_Sink = {self.clsid!r}", file=stream)
|
364
|
-
if self.coclass_clsid is None:
|
365
|
-
print("\tcoclass_clsid = None", file=stream)
|
366
|
-
else:
|
367
|
-
print(f"\tcoclass_clsid = {self.coclass_clsid!r}", file=stream)
|
368
|
-
print("\t_public_methods_ = [] # For COM Server support", file=stream)
|
369
|
-
WriteSinkEventMap(self, stream)
|
370
|
-
print(file=stream)
|
371
|
-
print("\tdef __init__(self, oobj = None):", file=stream)
|
372
|
-
print("\t\tif oobj is None:", file=stream)
|
373
|
-
print("\t\t\tself._olecp = None", file=stream)
|
374
|
-
print("\t\telse:", file=stream)
|
375
|
-
print("\t\t\timport win32com.server.util", file=stream)
|
376
|
-
print(
|
377
|
-
"\t\t\tfrom win32com.server.policy import EventHandlerPolicy", file=stream
|
378
|
-
)
|
379
|
-
print(
|
380
|
-
"\t\t\tcpc=oobj._oleobj_.QueryInterface(pythoncom.IID_IConnectionPointContainer)",
|
381
|
-
file=stream,
|
382
|
-
)
|
383
|
-
print("\t\t\tcp=cpc.FindConnectionPoint(self.CLSID_Sink)", file=stream)
|
384
|
-
print(
|
385
|
-
"\t\t\tcookie=cp.Advise(win32com.server.util.wrap(self, usePolicy=EventHandlerPolicy))",
|
386
|
-
file=stream,
|
387
|
-
)
|
388
|
-
print("\t\t\tself._olecp,self._olecp_cookie = cp,cookie", file=stream)
|
389
|
-
print("\tdef __del__(self):", file=stream)
|
390
|
-
print("\t\ttry:", file=stream)
|
391
|
-
print("\t\t\tself.close()", file=stream)
|
392
|
-
print("\t\texcept pythoncom.com_error:", file=stream)
|
393
|
-
print("\t\t\tpass", file=stream)
|
394
|
-
print("\tdef close(self):", file=stream)
|
395
|
-
print("\t\tif self._olecp is not None:", file=stream)
|
396
|
-
print(
|
397
|
-
"\t\t\tcp,cookie,self._olecp,self._olecp_cookie = self._olecp,self._olecp_cookie,None,None",
|
398
|
-
file=stream,
|
399
|
-
)
|
400
|
-
print("\t\t\tcp.Unadvise(cookie)", file=stream)
|
401
|
-
print("\tdef _query_interface_(self, iid):", file=stream)
|
402
|
-
print("\t\timport win32com.server.util", file=stream)
|
403
|
-
print(
|
404
|
-
"\t\tif iid==self.CLSID_Sink: return win32com.server.util.wrap(self)",
|
405
|
-
file=stream,
|
406
|
-
)
|
407
|
-
print(file=stream)
|
408
|
-
self.bWritten = 1
|
409
|
-
|
410
|
-
def WriteCallbackClassBody(self, generator):
|
411
|
-
stream = generator.file
|
412
|
-
print("\t# Event Handlers", file=stream)
|
413
|
-
print(
|
414
|
-
"\t# If you create handlers, they should have the following prototypes:",
|
415
|
-
file=stream,
|
416
|
-
)
|
417
|
-
for entry in chain(
|
418
|
-
self.propMapGet.values(), self.propMapPut.values(), self.mapFuncs.values()
|
419
|
-
):
|
420
|
-
fdesc = entry.desc
|
421
|
-
methName = MakeEventMethodName(entry.names[0])
|
422
|
-
print(
|
423
|
-
"#\tdef "
|
424
|
-
+ methName
|
425
|
-
+ "(self"
|
426
|
-
+ build.BuildCallList(
|
427
|
-
fdesc,
|
428
|
-
entry.names,
|
429
|
-
"defaultNamedOptArg",
|
430
|
-
"defaultNamedNotOptArg",
|
431
|
-
"defaultUnnamedArg",
|
432
|
-
"pythoncom.Missing",
|
433
|
-
is_comment=True,
|
434
|
-
)
|
435
|
-
+ "):",
|
436
|
-
file=stream,
|
437
|
-
)
|
438
|
-
if entry.doc and entry.doc[1]:
|
439
|
-
print("#\t\t" + build._makeDocString(entry.doc[1]), file=stream)
|
440
|
-
print(file=stream)
|
441
|
-
self.bWritten = 1
|
442
|
-
|
443
|
-
def WriteClassBody(self, generator):
|
444
|
-
stream = generator.file
|
445
|
-
specialItems = {
|
446
|
-
"count": None,
|
447
|
-
"item": None,
|
448
|
-
"value": None,
|
449
|
-
"_newenum": None,
|
450
|
-
} # If found, will end up with (entry, invoke_tupe)
|
451
|
-
# Write in alpha order.
|
452
|
-
for name in sorted(self.mapFuncs):
|
453
|
-
entry = self.mapFuncs[name]
|
454
|
-
assert entry.desc.desckind == pythoncom.DESCKIND_FUNCDESC
|
455
|
-
# skip [restricted] methods, unless it is the
|
456
|
-
# enumerator (which, being part of the "system",
|
457
|
-
# we know about and can use)
|
458
|
-
dispid = entry.desc.memid
|
459
|
-
if (
|
460
|
-
entry.desc.wFuncFlags & pythoncom.FUNCFLAG_FRESTRICTED
|
461
|
-
and dispid != pythoncom.DISPID_NEWENUM
|
462
|
-
):
|
463
|
-
continue
|
464
|
-
# If not accessible via IDispatch, then we can't use it here.
|
465
|
-
if entry.desc.funckind != pythoncom.FUNC_DISPATCH:
|
466
|
-
continue
|
467
|
-
if dispid == pythoncom.DISPID_VALUE:
|
468
|
-
lkey = "value"
|
469
|
-
elif dispid == pythoncom.DISPID_NEWENUM:
|
470
|
-
specialItems["_newenum"] = (entry, entry.desc.invkind, None)
|
471
|
-
continue # Don't build this one now!
|
472
|
-
else:
|
473
|
-
lkey = name.lower()
|
474
|
-
if (
|
475
|
-
lkey in specialItems and specialItems[lkey] is None
|
476
|
-
): # remember if a special one.
|
477
|
-
specialItems[lkey] = (entry, entry.desc.invkind, None)
|
478
|
-
if generator.bBuildHidden or not entry.hidden:
|
479
|
-
if entry.GetResultName():
|
480
|
-
print("\t# Result is of type " + entry.GetResultName(), file=stream)
|
481
|
-
if entry.wasProperty:
|
482
|
-
print(
|
483
|
-
"\t# The method %s is actually a property, but must be used as a method to correctly pass the arguments"
|
484
|
-
% name,
|
485
|
-
file=stream,
|
486
|
-
)
|
487
|
-
ret = self.MakeFuncMethod(entry, build.MakePublicAttributeName(name))
|
488
|
-
for line in ret:
|
489
|
-
print(line, file=stream)
|
490
|
-
print("\t_prop_map_get_ = {", file=stream)
|
491
|
-
for key in sorted(self.propMap):
|
492
|
-
entry = self.propMap[key]
|
493
|
-
if generator.bBuildHidden or not entry.hidden:
|
494
|
-
resultName = entry.GetResultName()
|
495
|
-
if resultName:
|
496
|
-
print(
|
497
|
-
f"\t\t# Property '{key}' is an object of type '{resultName}'",
|
498
|
-
file=stream,
|
499
|
-
)
|
500
|
-
lkey = key.lower()
|
501
|
-
details = entry.desc
|
502
|
-
resultDesc = details[2]
|
503
|
-
argDesc = ()
|
504
|
-
mapEntry = MakeMapLineEntry(
|
505
|
-
details.memid,
|
506
|
-
pythoncom.DISPATCH_PROPERTYGET,
|
507
|
-
resultDesc,
|
508
|
-
argDesc,
|
509
|
-
key,
|
510
|
-
entry.GetResultCLSIDStr(),
|
511
|
-
)
|
512
|
-
|
513
|
-
if details.memid == pythoncom.DISPID_VALUE:
|
514
|
-
lkey = "value"
|
515
|
-
elif details.memid == pythoncom.DISPID_NEWENUM:
|
516
|
-
lkey = "_newenum"
|
517
|
-
else:
|
518
|
-
lkey = key.lower()
|
519
|
-
if (
|
520
|
-
lkey in specialItems and specialItems[lkey] is None
|
521
|
-
): # remember if a special one.
|
522
|
-
specialItems[lkey] = (
|
523
|
-
entry,
|
524
|
-
pythoncom.DISPATCH_PROPERTYGET,
|
525
|
-
mapEntry,
|
526
|
-
)
|
527
|
-
# All special methods, except _newenum, are written
|
528
|
-
# "normally". This is a mess!
|
529
|
-
if details.memid == pythoncom.DISPID_NEWENUM:
|
530
|
-
continue
|
531
|
-
|
532
|
-
print(
|
533
|
-
f'\t\t"{build.MakePublicAttributeName(key)}": {mapEntry},',
|
534
|
-
file=stream,
|
535
|
-
)
|
536
|
-
for key in sorted(self.propMapGet):
|
537
|
-
entry = self.propMapGet[key]
|
538
|
-
if generator.bBuildHidden or not entry.hidden:
|
539
|
-
if entry.GetResultName():
|
540
|
-
print(
|
541
|
-
"\t\t# Method '{}' returns object of type '{}'".format(
|
542
|
-
key, entry.GetResultName()
|
543
|
-
),
|
544
|
-
file=stream,
|
545
|
-
)
|
546
|
-
details = entry.desc
|
547
|
-
assert details.desckind == pythoncom.DESCKIND_FUNCDESC
|
548
|
-
lkey = key.lower()
|
549
|
-
argDesc = details[2]
|
550
|
-
resultDesc = details[8]
|
551
|
-
mapEntry = MakeMapLineEntry(
|
552
|
-
details[0],
|
553
|
-
pythoncom.DISPATCH_PROPERTYGET,
|
554
|
-
resultDesc,
|
555
|
-
argDesc,
|
556
|
-
key,
|
557
|
-
entry.GetResultCLSIDStr(),
|
558
|
-
)
|
559
|
-
if details.memid == pythoncom.DISPID_VALUE:
|
560
|
-
lkey = "value"
|
561
|
-
elif details.memid == pythoncom.DISPID_NEWENUM:
|
562
|
-
lkey = "_newenum"
|
563
|
-
else:
|
564
|
-
lkey = key.lower()
|
565
|
-
if (
|
566
|
-
lkey in specialItems and specialItems[lkey] is None
|
567
|
-
): # remember if a special one.
|
568
|
-
specialItems[lkey] = (
|
569
|
-
entry,
|
570
|
-
pythoncom.DISPATCH_PROPERTYGET,
|
571
|
-
mapEntry,
|
572
|
-
)
|
573
|
-
# All special methods, except _newenum, are written
|
574
|
-
# "normally". This is a mess!
|
575
|
-
if details.memid == pythoncom.DISPID_NEWENUM:
|
576
|
-
continue
|
577
|
-
print(
|
578
|
-
f'\t\t"{build.MakePublicAttributeName(key)}": {mapEntry},',
|
579
|
-
file=stream,
|
580
|
-
)
|
581
|
-
|
582
|
-
print("\t}", file=stream)
|
583
|
-
|
584
|
-
print("\t_prop_map_put_ = {", file=stream)
|
585
|
-
# These are "Invoke" args
|
586
|
-
for key in sorted(self.propMap):
|
587
|
-
entry = self.propMap[key]
|
588
|
-
if generator.bBuildHidden or not entry.hidden:
|
589
|
-
lkey = key.lower()
|
590
|
-
details = entry.desc
|
591
|
-
# If default arg is None, write an empty tuple
|
592
|
-
defArgDesc = build.MakeDefaultArgRepr(details[2])
|
593
|
-
if defArgDesc is None:
|
594
|
-
defArgDesc = ""
|
595
|
-
else:
|
596
|
-
defArgDesc += ","
|
597
|
-
print(
|
598
|
-
'\t\t"%s" : ((%s, LCID, %d, 0),(%s)),'
|
599
|
-
% (
|
600
|
-
build.MakePublicAttributeName(key),
|
601
|
-
details[0],
|
602
|
-
pythoncom.DISPATCH_PROPERTYPUT,
|
603
|
-
defArgDesc,
|
604
|
-
),
|
605
|
-
file=stream,
|
606
|
-
)
|
607
|
-
|
608
|
-
for key in sorted(self.propMapPut):
|
609
|
-
entry = self.propMapPut[key]
|
610
|
-
if generator.bBuildHidden or not entry.hidden:
|
611
|
-
details = entry.desc
|
612
|
-
defArgDesc = MakeDefaultArgsForPropertyPut(details[2])
|
613
|
-
print(
|
614
|
-
'\t\t"%s": ((%s, LCID, %d, 0),%s),'
|
615
|
-
% (
|
616
|
-
build.MakePublicAttributeName(key),
|
617
|
-
details[0],
|
618
|
-
details[4],
|
619
|
-
defArgDesc,
|
620
|
-
),
|
621
|
-
file=stream,
|
622
|
-
)
|
623
|
-
print("\t}", file=stream)
|
624
|
-
|
625
|
-
if specialItems["value"]:
|
626
|
-
entry, invoketype, propArgs = specialItems["value"]
|
627
|
-
if propArgs is None:
|
628
|
-
typename = "method"
|
629
|
-
ret = self.MakeFuncMethod(entry, "__call__")
|
630
|
-
else:
|
631
|
-
typename = "property"
|
632
|
-
ret = [
|
633
|
-
"\tdef __call__(self):\n\t\treturn self._ApplyTypes_(*%s)"
|
634
|
-
% propArgs
|
635
|
-
]
|
636
|
-
print(
|
637
|
-
f"\t# Default {typename} for this class is '{entry.names[0]}'",
|
638
|
-
file=stream,
|
639
|
-
)
|
640
|
-
for line in ret:
|
641
|
-
print(line, file=stream)
|
642
|
-
print("\tdef __str__(self, *args):", file=stream)
|
643
|
-
print("\t\treturn str(self.__call__(*args))", file=stream)
|
644
|
-
print("\tdef __int__(self, *args):", file=stream)
|
645
|
-
print("\t\treturn int(self.__call__(*args))", file=stream)
|
646
|
-
|
647
|
-
# _NewEnum (DISPID_NEWENUM) does not appear in typelib for many office objects,
|
648
|
-
# but it can still be retrieved at runtime, so always create __iter__.
|
649
|
-
# Also, some of those same objects use 1-based indexing, causing the old-style
|
650
|
-
# __getitem__ iteration to fail for index 0 where the dynamic iteration succeeds.
|
651
|
-
if specialItems["_newenum"]:
|
652
|
-
enumEntry, invoketype, propArgs = specialItems["_newenum"]
|
653
|
-
assert enumEntry.desc.desckind == pythoncom.DESCKIND_FUNCDESC
|
654
|
-
invkind = enumEntry.desc.invkind
|
655
|
-
# ??? Wouldn't this be the resultCLSID for the iterator itself, rather than the resultCLSID
|
656
|
-
# for the result of each Next() call, which is what it's used for ???
|
657
|
-
resultCLSID = enumEntry.GetResultCLSIDStr()
|
658
|
-
else:
|
659
|
-
invkind = pythoncom.DISPATCH_METHOD | pythoncom.DISPATCH_PROPERTYGET
|
660
|
-
resultCLSID = "None"
|
661
|
-
# If we don't have a good CLSID for the enum result, assume it is the same as the Item() method.
|
662
|
-
if resultCLSID == "None" and "Item" in self.mapFuncs:
|
663
|
-
resultCLSID = self.mapFuncs["Item"].GetResultCLSIDStr()
|
664
|
-
print("\tdef __iter__(self):", file=stream)
|
665
|
-
print('\t\t"Return a Python iterator for this object"', file=stream)
|
666
|
-
print("\t\ttry:", file=stream)
|
667
|
-
print(
|
668
|
-
"\t\t\tob = self._oleobj_.InvokeTypes(%d,LCID,%d,(13, 10),())"
|
669
|
-
% (pythoncom.DISPID_NEWENUM, invkind),
|
670
|
-
file=stream,
|
671
|
-
)
|
672
|
-
print("\t\texcept pythoncom.error:", file=stream)
|
673
|
-
print(
|
674
|
-
'\t\t\traise TypeError("This object does not support enumeration")',
|
675
|
-
file=stream,
|
676
|
-
)
|
677
|
-
# Iterator is wrapped as PyIEnumVariant, and each result of __next__ is Dispatch'ed if necessary
|
678
|
-
print(
|
679
|
-
"\t\treturn win32com.client.util.Iterator(ob, %s)" % resultCLSID,
|
680
|
-
file=stream,
|
681
|
-
)
|
682
|
-
|
683
|
-
if specialItems["item"]:
|
684
|
-
entry, invoketype, propArgs = specialItems["item"]
|
685
|
-
resultCLSID = entry.GetResultCLSIDStr()
|
686
|
-
print(
|
687
|
-
"\t#This class has Item property/method which allows indexed access with the object[key] syntax.",
|
688
|
-
file=stream,
|
689
|
-
)
|
690
|
-
print(
|
691
|
-
"\t#Some objects will accept a string or other type of key in addition to integers.",
|
692
|
-
file=stream,
|
693
|
-
)
|
694
|
-
print(
|
695
|
-
"\t#Note that many Office objects do not use zero-based indexing.",
|
696
|
-
file=stream,
|
697
|
-
)
|
698
|
-
print("\tdef __getitem__(self, key):", file=stream)
|
699
|
-
print(
|
700
|
-
'\t\treturn self._get_good_object_(self._oleobj_.Invoke(*(%d, LCID, %d, 1, key)), "Item", %s)'
|
701
|
-
% (entry.desc.memid, invoketype, resultCLSID),
|
702
|
-
file=stream,
|
703
|
-
)
|
704
|
-
|
705
|
-
if specialItems["count"]:
|
706
|
-
entry, invoketype, propArgs = specialItems["count"]
|
707
|
-
if propArgs is None:
|
708
|
-
typename = "method"
|
709
|
-
ret = self.MakeFuncMethod(entry, "__len__")
|
710
|
-
else:
|
711
|
-
typename = "property"
|
712
|
-
ret = [
|
713
|
-
"\tdef __len__(self):\n\t\treturn self._ApplyTypes_(*%s)" % propArgs
|
714
|
-
]
|
715
|
-
print(
|
716
|
-
"\t#This class has Count() %s - allow len(ob) to provide this"
|
717
|
-
% (typename),
|
718
|
-
file=stream,
|
719
|
-
)
|
720
|
-
for line in ret:
|
721
|
-
print(line, file=stream)
|
722
|
-
# Also include a __bool__
|
723
|
-
print(
|
724
|
-
"\t#This class has a __len__ - this is needed so 'if object:' always returns TRUE.",
|
725
|
-
file=stream,
|
726
|
-
)
|
727
|
-
print("\tdef __bool__(self):", file=stream)
|
728
|
-
print("\t\treturn True", file=stream)
|
729
|
-
|
730
|
-
|
731
|
-
class CoClassItem(build.OleItem, WritableItem):
|
732
|
-
order = 5
|
733
|
-
typename = "COCLASS"
|
734
|
-
|
735
|
-
def __init__(self, typeinfo, attr, doc=None, sources=[], interfaces=[], bForUser=1):
|
736
|
-
build.OleItem.__init__(self, doc)
|
737
|
-
self.clsid = attr[0]
|
738
|
-
self.sources = sources
|
739
|
-
self.interfaces = interfaces
|
740
|
-
self.bIsDispatch = 1 # Pretend it is so it is written to the class map.
|
741
|
-
|
742
|
-
def WriteClass(self, generator):
|
743
|
-
generator.checkWriteCoClassBaseClass()
|
744
|
-
doc = self.doc
|
745
|
-
stream = generator.file
|
746
|
-
if generator.generate_type == GEN_DEMAND_CHILD:
|
747
|
-
# Some special imports we must setup.
|
748
|
-
referenced_items = []
|
749
|
-
for ref, flag in self.sources:
|
750
|
-
referenced_items.append(ref)
|
751
|
-
for ref, flag in self.interfaces:
|
752
|
-
referenced_items.append(ref)
|
753
|
-
print("import sys", file=stream)
|
754
|
-
for ref in referenced_items:
|
755
|
-
print(
|
756
|
-
f"__import__('{generator.base_mod_name}.{ref.python_name}')",
|
757
|
-
file=stream,
|
758
|
-
)
|
759
|
-
print(
|
760
|
-
"{} = sys.modules['{}.{}'].{}".format(
|
761
|
-
ref.python_name,
|
762
|
-
generator.base_mod_name,
|
763
|
-
ref.python_name,
|
764
|
-
ref.python_name,
|
765
|
-
),
|
766
|
-
file=stream,
|
767
|
-
)
|
768
|
-
# And pretend we have written it - the name is now available as if we had!
|
769
|
-
ref.bWritten = 1
|
770
|
-
try:
|
771
|
-
progId = pythoncom.ProgIDFromCLSID(self.clsid)
|
772
|
-
print("# This CoClass is known by the name '%s'" % (progId), file=stream)
|
773
|
-
except pythoncom.com_error:
|
774
|
-
pass
|
775
|
-
print(
|
776
|
-
"class %s(CoClassBaseClass): # A CoClass" % (self.python_name), file=stream
|
777
|
-
)
|
778
|
-
if doc and doc[1]:
|
779
|
-
print("\t# " + doc[1], file=stream)
|
780
|
-
print(f"\tCLSID = {self.clsid!r}", file=stream)
|
781
|
-
print("\tcoclass_sources = [", file=stream)
|
782
|
-
defItem = None
|
783
|
-
for item, flag in self.sources:
|
784
|
-
if flag & pythoncom.IMPLTYPEFLAG_FDEFAULT:
|
785
|
-
defItem = item
|
786
|
-
# If we have written a Python class, reference the name -
|
787
|
-
# otherwise just the IID.
|
788
|
-
if item.bWritten:
|
789
|
-
key = item.python_name
|
790
|
-
else:
|
791
|
-
key = f"'{item.clsid}'" # really the iid.
|
792
|
-
print(f"\t\t{key},", file=stream)
|
793
|
-
print("\t]", file=stream)
|
794
|
-
if defItem:
|
795
|
-
if defItem.bWritten:
|
796
|
-
defName = defItem.python_name
|
797
|
-
else:
|
798
|
-
defName = f"'{defItem.clsid}'" # really the iid.
|
799
|
-
print(f"\tdefault_source = {defName}", file=stream)
|
800
|
-
print("\tcoclass_interfaces = [", file=stream)
|
801
|
-
defItem = None
|
802
|
-
for item, flag in self.interfaces:
|
803
|
-
if flag & pythoncom.IMPLTYPEFLAG_FDEFAULT: # and dual:
|
804
|
-
defItem = item
|
805
|
-
# If we have written a class, reference its name, otherwise the IID
|
806
|
-
if item.bWritten:
|
807
|
-
key = item.python_name
|
808
|
-
else:
|
809
|
-
key = f"'{item.clsid}'" # really the iid.
|
810
|
-
print(f"\t\t{key},", file=stream)
|
811
|
-
print("\t]", file=stream)
|
812
|
-
if defItem:
|
813
|
-
if defItem.bWritten:
|
814
|
-
defName = defItem.python_name
|
815
|
-
else:
|
816
|
-
defName = f"'{defItem.clsid}'" # really the iid.
|
817
|
-
print(f"\tdefault_interface = {defName}", file=stream)
|
818
|
-
self.bWritten = 1
|
819
|
-
print(file=stream)
|
820
|
-
|
821
|
-
|
822
|
-
class GeneratorProgress:
|
823
|
-
def __init__(self):
|
824
|
-
pass
|
825
|
-
|
826
|
-
def Starting(self, tlb_desc):
|
827
|
-
"""Called when the process starts."""
|
828
|
-
self.tlb_desc = tlb_desc
|
829
|
-
|
830
|
-
def Finished(self):
|
831
|
-
"""Called when the process is complete."""
|
832
|
-
|
833
|
-
def SetDescription(self, desc, maxticks=None):
|
834
|
-
"""We are entering a major step. If maxticks, then this
|
835
|
-
is how many ticks we expect to make until finished
|
836
|
-
"""
|
837
|
-
|
838
|
-
def Tick(self, desc=None):
|
839
|
-
"""Minor progress step. Can provide new description if necessary"""
|
840
|
-
|
841
|
-
def VerboseProgress(self, desc):
|
842
|
-
"""Verbose/Debugging output."""
|
843
|
-
|
844
|
-
def LogWarning(self, desc):
|
845
|
-
"""If a warning is generated"""
|
846
|
-
|
847
|
-
def LogBeginGenerate(self, filename):
|
848
|
-
pass
|
849
|
-
|
850
|
-
def Close(self):
|
851
|
-
pass
|
852
|
-
|
853
|
-
|
854
|
-
class Generator:
|
855
|
-
def __init__(
|
856
|
-
self,
|
857
|
-
typelib,
|
858
|
-
sourceFilename,
|
859
|
-
progressObject,
|
860
|
-
bBuildHidden=1,
|
861
|
-
):
|
862
|
-
self.bHaveWrittenDispatchBaseClass = 0
|
863
|
-
self.bHaveWrittenCoClassBaseClass = 0
|
864
|
-
self.bHaveWrittenEventBaseClass = 0
|
865
|
-
self.typelib = typelib
|
866
|
-
self.sourceFilename = sourceFilename
|
867
|
-
self.bBuildHidden = bBuildHidden
|
868
|
-
self.progress = progressObject
|
869
|
-
# These 2 are later additions and most of the code still 'print's...
|
870
|
-
self.file = None
|
871
|
-
|
872
|
-
def CollectOleItemInfosFromType(self):
|
873
|
-
ret = []
|
874
|
-
for i in range(self.typelib.GetTypeInfoCount()):
|
875
|
-
info = self.typelib.GetTypeInfo(i)
|
876
|
-
infotype = self.typelib.GetTypeInfoType(i)
|
877
|
-
doc = self.typelib.GetDocumentation(i)
|
878
|
-
attr = info.GetTypeAttr()
|
879
|
-
ret.append((info, infotype, doc, attr))
|
880
|
-
return ret
|
881
|
-
|
882
|
-
def _Build_CoClass(self, type_info_tuple):
|
883
|
-
info, infotype, doc, attr = type_info_tuple
|
884
|
-
# find the source and dispinterfaces for the coclass
|
885
|
-
child_infos = []
|
886
|
-
for j in range(attr[8]):
|
887
|
-
flags = info.GetImplTypeFlags(j)
|
888
|
-
try:
|
889
|
-
refType = info.GetRefTypeInfo(info.GetRefTypeOfImplType(j))
|
890
|
-
except pythoncom.com_error:
|
891
|
-
# Can't load a dependent typelib?
|
892
|
-
continue
|
893
|
-
refAttr = refType.GetTypeAttr()
|
894
|
-
child_infos.append(
|
895
|
-
(
|
896
|
-
info,
|
897
|
-
refAttr.typekind,
|
898
|
-
refType,
|
899
|
-
refType.GetDocumentation(-1),
|
900
|
-
refAttr,
|
901
|
-
flags,
|
902
|
-
)
|
903
|
-
)
|
904
|
-
|
905
|
-
# Done generating children - now the CoClass itself.
|
906
|
-
newItem = CoClassItem(info, attr, doc)
|
907
|
-
return newItem, child_infos
|
908
|
-
|
909
|
-
def _Build_CoClassChildren(self, coclass, coclass_info, oleItems, vtableItems):
|
910
|
-
sources = {}
|
911
|
-
interfaces = {}
|
912
|
-
for info, info_type, refType, doc, refAttr, flags in coclass_info:
|
913
|
-
# sys.stderr.write("Attr typeflags for coclass referenced object %s=%d (%d), typekind=%d\n" % (name, refAttr.wTypeFlags, refAttr.wTypeFlags & pythoncom.TYPEFLAG_FDUAL,refAttr.typekind))
|
914
|
-
if refAttr.typekind == pythoncom.TKIND_DISPATCH or (
|
915
|
-
refAttr.typekind == pythoncom.TKIND_INTERFACE
|
916
|
-
and refAttr[11] & pythoncom.TYPEFLAG_FDISPATCHABLE
|
917
|
-
):
|
918
|
-
clsid = refAttr[0]
|
919
|
-
if clsid in oleItems:
|
920
|
-
dispItem = oleItems[clsid]
|
921
|
-
else:
|
922
|
-
dispItem = DispatchItem(refType, refAttr, doc)
|
923
|
-
oleItems[dispItem.clsid] = dispItem
|
924
|
-
dispItem.coclass_clsid = coclass.clsid
|
925
|
-
if flags & pythoncom.IMPLTYPEFLAG_FSOURCE:
|
926
|
-
dispItem.bIsSink = 1
|
927
|
-
sources[dispItem.clsid] = (dispItem, flags)
|
928
|
-
else:
|
929
|
-
interfaces[dispItem.clsid] = (dispItem, flags)
|
930
|
-
# If dual interface, make do that too.
|
931
|
-
if clsid not in vtableItems and refAttr[11] & pythoncom.TYPEFLAG_FDUAL:
|
932
|
-
refType = refType.GetRefTypeInfo(refType.GetRefTypeOfImplType(-1))
|
933
|
-
refAttr = refType.GetTypeAttr()
|
934
|
-
assert (
|
935
|
-
refAttr.typekind == pythoncom.TKIND_INTERFACE
|
936
|
-
), "must be interface bynow!"
|
937
|
-
vtableItem = VTableItem(refType, refAttr, doc)
|
938
|
-
vtableItems[clsid] = vtableItem
|
939
|
-
coclass.sources = list(sources.values())
|
940
|
-
coclass.interfaces = list(interfaces.values())
|
941
|
-
|
942
|
-
def _Build_Interface(self, type_info_tuple):
|
943
|
-
info, infotype, doc, attr = type_info_tuple
|
944
|
-
oleItem = vtableItem = None
|
945
|
-
if infotype == pythoncom.TKIND_DISPATCH or (
|
946
|
-
infotype == pythoncom.TKIND_INTERFACE
|
947
|
-
and attr[11] & pythoncom.TYPEFLAG_FDISPATCHABLE
|
948
|
-
):
|
949
|
-
oleItem = DispatchItem(info, attr, doc)
|
950
|
-
# If this DISPATCH interface dual, then build that too.
|
951
|
-
if attr.wTypeFlags & pythoncom.TYPEFLAG_FDUAL:
|
952
|
-
# Get the vtable interface
|
953
|
-
refhtype = info.GetRefTypeOfImplType(-1)
|
954
|
-
info = info.GetRefTypeInfo(refhtype)
|
955
|
-
attr = info.GetTypeAttr()
|
956
|
-
infotype = pythoncom.TKIND_INTERFACE
|
957
|
-
else:
|
958
|
-
infotype = None
|
959
|
-
assert infotype in [
|
960
|
-
None,
|
961
|
-
pythoncom.TKIND_INTERFACE,
|
962
|
-
], "Must be a real interface at this point"
|
963
|
-
if infotype == pythoncom.TKIND_INTERFACE:
|
964
|
-
vtableItem = VTableItem(info, attr, doc)
|
965
|
-
return oleItem, vtableItem
|
966
|
-
|
967
|
-
def BuildOleItemsFromType(self):
|
968
|
-
assert self.bBuildHidden, "This code doesn't look at the hidden flag - I thought everyone set it true!?!?!"
|
969
|
-
oleItems = {}
|
970
|
-
enumItems = {}
|
971
|
-
recordItems = {}
|
972
|
-
vtableItems = {}
|
973
|
-
|
974
|
-
for type_info_tuple in self.CollectOleItemInfosFromType():
|
975
|
-
info, infotype, doc, attr = type_info_tuple
|
976
|
-
clsid = attr[0]
|
977
|
-
if infotype == pythoncom.TKIND_ENUM or infotype == pythoncom.TKIND_MODULE:
|
978
|
-
newItem = EnumerationItem(info, attr, doc)
|
979
|
-
enumItems[newItem.doc[0]] = newItem
|
980
|
-
# We never hide interfaces (MSAccess, for example, nominates interfaces as
|
981
|
-
# hidden, assuming that you only ever use them via the CoClass)
|
982
|
-
elif infotype in [pythoncom.TKIND_DISPATCH, pythoncom.TKIND_INTERFACE]:
|
983
|
-
if clsid not in oleItems:
|
984
|
-
oleItem, vtableItem = self._Build_Interface(type_info_tuple)
|
985
|
-
oleItems[clsid] = oleItem # Even "None" goes in here.
|
986
|
-
if vtableItem is not None:
|
987
|
-
vtableItems[clsid] = vtableItem
|
988
|
-
elif (
|
989
|
-
infotype == pythoncom.TKIND_RECORD or infotype == pythoncom.TKIND_UNION
|
990
|
-
):
|
991
|
-
newItem = RecordItem(info, attr, doc)
|
992
|
-
recordItems[newItem.clsid] = newItem
|
993
|
-
elif infotype == pythoncom.TKIND_ALIAS:
|
994
|
-
# We don't care about alias' - handled intrinsicly.
|
995
|
-
continue
|
996
|
-
elif infotype == pythoncom.TKIND_COCLASS:
|
997
|
-
newItem, child_infos = self._Build_CoClass(type_info_tuple)
|
998
|
-
self._Build_CoClassChildren(newItem, child_infos, oleItems, vtableItems)
|
999
|
-
oleItems[newItem.clsid] = newItem
|
1000
|
-
else:
|
1001
|
-
self.progress.LogWarning("Unknown TKIND found: %d" % infotype)
|
1002
|
-
|
1003
|
-
return oleItems, enumItems, recordItems, vtableItems
|
1004
|
-
|
1005
|
-
def open_writer(self, filename, encoding="utf-8"):
|
1006
|
-
# A place to put code to open a file with the appropriate encoding.
|
1007
|
-
# Does *not* set self.file - just opens and returns a file.
|
1008
|
-
# Actually returns a handle to a temp file - finish_writer then deletes
|
1009
|
-
# the filename asked for and puts everything back in place. This
|
1010
|
-
# is so errors don't leave a 1/2 generated file around causing bizarre
|
1011
|
-
# errors later, and so that multiple processes writing the same file
|
1012
|
-
# don't step on each others' toes.
|
1013
|
-
# Could be a classmethod one day...
|
1014
|
-
temp_filename = self.get_temp_filename(filename)
|
1015
|
-
return open(temp_filename, "wt", encoding=encoding)
|
1016
|
-
|
1017
|
-
def finish_writer(self, filename, f, worked):
|
1018
|
-
f.close()
|
1019
|
-
temp_filename = self.get_temp_filename(filename)
|
1020
|
-
if worked:
|
1021
|
-
os.replace(temp_filename, filename)
|
1022
|
-
else:
|
1023
|
-
try:
|
1024
|
-
os.unlink(filename)
|
1025
|
-
os.unlink(temp_filename)
|
1026
|
-
except OSError:
|
1027
|
-
pass
|
1028
|
-
|
1029
|
-
def get_temp_filename(self, filename):
|
1030
|
-
return "%s.%d.temp" % (filename, os.getpid())
|
1031
|
-
|
1032
|
-
def generate(self, file, is_for_demand=0):
|
1033
|
-
if is_for_demand:
|
1034
|
-
self.generate_type = GEN_DEMAND_BASE
|
1035
|
-
else:
|
1036
|
-
self.generate_type = GEN_FULL
|
1037
|
-
self.file = file
|
1038
|
-
self.do_generate()
|
1039
|
-
self.file = None
|
1040
|
-
self.progress.Finished()
|
1041
|
-
|
1042
|
-
def do_gen_file_header(self):
|
1043
|
-
la = self.typelib.GetLibAttr()
|
1044
|
-
moduleDoc = self.typelib.GetDocumentation(-1)
|
1045
|
-
docDesc = ""
|
1046
|
-
if moduleDoc[1]:
|
1047
|
-
docDesc = moduleDoc[1]
|
1048
|
-
|
1049
|
-
# Reset all the 'per file' state
|
1050
|
-
self.bHaveWrittenDispatchBaseClass = 0
|
1051
|
-
self.bHaveWrittenCoClassBaseClass = 0
|
1052
|
-
self.bHaveWrittenEventBaseClass = 0
|
1053
|
-
# You must provide a file correctly configured for writing unicode.
|
1054
|
-
# We assert this is it may indicate somewhere in pywin32 that needs
|
1055
|
-
# upgrading.
|
1056
|
-
assert self.file.encoding, self.file
|
1057
|
-
encoding = self.file.encoding
|
1058
|
-
|
1059
|
-
print(f"# -*- coding: {encoding} -*-", file=self.file)
|
1060
|
-
print(f"# Created by makepy.py version {makepy_version}", file=self.file)
|
1061
|
-
print(
|
1062
|
-
"# By python version {}".format(sys.version.replace("\n", "-")),
|
1063
|
-
file=self.file,
|
1064
|
-
)
|
1065
|
-
if self.sourceFilename:
|
1066
|
-
print(
|
1067
|
-
f"# From type library '{os.path.split(self.sourceFilename)[1]}'",
|
1068
|
-
file=self.file,
|
1069
|
-
)
|
1070
|
-
print("# On %s" % time.ctime(time.time()), file=self.file)
|
1071
|
-
|
1072
|
-
print(build._makeDocString(docDesc), file=self.file)
|
1073
|
-
|
1074
|
-
print(f"makepy_version = {makepy_version!r}", file=self.file)
|
1075
|
-
print(f"python_version = 0x{sys.hexversion:x}", file=self.file)
|
1076
|
-
print(file=self.file)
|
1077
|
-
print(
|
1078
|
-
"import win32com.client.CLSIDToClass, pythoncom, pywintypes", file=self.file
|
1079
|
-
)
|
1080
|
-
print("import win32com.client.util", file=self.file)
|
1081
|
-
print("from pywintypes import IID", file=self.file)
|
1082
|
-
print("from win32com.client import Dispatch", file=self.file)
|
1083
|
-
print(file=self.file)
|
1084
|
-
print(
|
1085
|
-
"# The following 3 lines may need tweaking for the particular server",
|
1086
|
-
file=self.file,
|
1087
|
-
)
|
1088
|
-
print(
|
1089
|
-
"# Candidates are pythoncom.Missing, .Empty and .ArgNotFound",
|
1090
|
-
file=self.file,
|
1091
|
-
)
|
1092
|
-
print("defaultNamedOptArg=pythoncom.Empty", file=self.file)
|
1093
|
-
print("defaultNamedNotOptArg=pythoncom.Empty", file=self.file)
|
1094
|
-
print("defaultUnnamedArg=pythoncom.Empty", file=self.file)
|
1095
|
-
print(file=self.file)
|
1096
|
-
print(f"CLSID = {la[0]!r}", file=self.file)
|
1097
|
-
print(f"MajorVersion = {la[3]}", file=self.file)
|
1098
|
-
print(f"MinorVersion = {la[4]}", file=self.file)
|
1099
|
-
print(f"LibraryFlags = {la[5]}", file=self.file)
|
1100
|
-
print("LCID = " + hex(la[1]), file=self.file)
|
1101
|
-
print(file=self.file)
|
1102
|
-
|
1103
|
-
def do_generate(self):
|
1104
|
-
moduleDoc = self.typelib.GetDocumentation(-1)
|
1105
|
-
stream = self.file
|
1106
|
-
docDesc = ""
|
1107
|
-
if moduleDoc[1]:
|
1108
|
-
docDesc = moduleDoc[1]
|
1109
|
-
self.progress.Starting(docDesc)
|
1110
|
-
self.progress.SetDescription("Building definitions from type library...")
|
1111
|
-
|
1112
|
-
self.do_gen_file_header()
|
1113
|
-
|
1114
|
-
oleItems, enumItems, recordItems, vtableItems = self.BuildOleItemsFromType()
|
1115
|
-
|
1116
|
-
self.progress.SetDescription(
|
1117
|
-
"Generating...", len(oleItems) + len(enumItems) + len(vtableItems)
|
1118
|
-
)
|
1119
|
-
|
1120
|
-
# Generate the constants and their support.
|
1121
|
-
if enumItems:
|
1122
|
-
print("class constants:", file=stream)
|
1123
|
-
num_written = 0
|
1124
|
-
for oleitem in sorted(enumItems.values()):
|
1125
|
-
num_written += oleitem.WriteEnumerationItems(stream)
|
1126
|
-
self.progress.Tick()
|
1127
|
-
if not num_written:
|
1128
|
-
print("\tpass", file=stream)
|
1129
|
-
print(file=stream)
|
1130
|
-
|
1131
|
-
if self.generate_type == GEN_FULL:
|
1132
|
-
for oleitem in sorted(filter(None, oleItems.values())):
|
1133
|
-
self.progress.Tick()
|
1134
|
-
oleitem.WriteClass(self)
|
1135
|
-
|
1136
|
-
for oleitem in sorted(vtableItems.values()):
|
1137
|
-
self.progress.Tick()
|
1138
|
-
oleitem.WriteClass(self)
|
1139
|
-
else:
|
1140
|
-
self.progress.Tick(len(oleItems) + len(vtableItems))
|
1141
|
-
|
1142
|
-
print("RecordMap = {", file=stream)
|
1143
|
-
for record in recordItems.values():
|
1144
|
-
record_str = f"{record.doc[0]!r}: '{record.clsid}',"
|
1145
|
-
if record.clsid == pythoncom.IID_NULL:
|
1146
|
-
print(
|
1147
|
-
f"\t###{record_str}",
|
1148
|
-
"# Record disabled because it doesn't have a non-null GUID",
|
1149
|
-
file=stream,
|
1150
|
-
)
|
1151
|
-
else:
|
1152
|
-
print(f"\t{record_str}", file=stream)
|
1153
|
-
print("}", file=stream)
|
1154
|
-
print(file=stream)
|
1155
|
-
|
1156
|
-
# Write out _all_ my generated CLSID's in the map
|
1157
|
-
if self.generate_type == GEN_FULL:
|
1158
|
-
print("CLSIDToClassMap = {", file=stream)
|
1159
|
-
for item in oleItems.values():
|
1160
|
-
if item is not None and item.bWritten:
|
1161
|
-
print(
|
1162
|
-
f"\t'{item.clsid}' : {item.python_name},",
|
1163
|
-
file=stream,
|
1164
|
-
)
|
1165
|
-
print("}", file=stream)
|
1166
|
-
print("CLSIDToPackageMap = {}", file=stream)
|
1167
|
-
print(
|
1168
|
-
"win32com.client.CLSIDToClass.RegisterCLSIDsFromDict( CLSIDToClassMap )",
|
1169
|
-
file=stream,
|
1170
|
-
)
|
1171
|
-
print("VTablesToPackageMap = {}", file=stream)
|
1172
|
-
print("VTablesToClassMap = {", file=stream)
|
1173
|
-
for item in vtableItems.values():
|
1174
|
-
print(f"\t'{item.clsid}' : '{item.python_name}',", file=stream)
|
1175
|
-
print("}", file=stream)
|
1176
|
-
print(file=stream)
|
1177
|
-
|
1178
|
-
else:
|
1179
|
-
print("CLSIDToClassMap = {}", file=stream)
|
1180
|
-
print("CLSIDToPackageMap = {", file=stream)
|
1181
|
-
for item in oleItems.values():
|
1182
|
-
if item is not None:
|
1183
|
-
print(
|
1184
|
-
f"\t'{item.clsid}' : {item.python_name!r},",
|
1185
|
-
file=stream,
|
1186
|
-
)
|
1187
|
-
print("}", file=stream)
|
1188
|
-
print("VTablesToClassMap = {}", file=stream)
|
1189
|
-
print("VTablesToPackageMap = {", file=stream)
|
1190
|
-
for item in vtableItems.values():
|
1191
|
-
print(f"\t'{item.clsid}' : '{item.python_name}',", file=stream)
|
1192
|
-
print("}", file=stream)
|
1193
|
-
print(file=stream)
|
1194
|
-
|
1195
|
-
print(file=stream)
|
1196
|
-
# Bit of a hack - build a temp map of iteItems + vtableItems - coClasses
|
1197
|
-
map = {}
|
1198
|
-
for item in oleItems.values():
|
1199
|
-
if item is not None and not isinstance(item, CoClassItem):
|
1200
|
-
map[item.python_name] = item.clsid
|
1201
|
-
for item in vtableItems.values(): # No nones or CoClasses in this map
|
1202
|
-
map[item.python_name] = item.clsid
|
1203
|
-
|
1204
|
-
print("NamesToIIDMap = {", file=stream)
|
1205
|
-
for name, iid in map.items():
|
1206
|
-
print(f"\t'{name}' : '{iid}',", file=stream)
|
1207
|
-
print("}", file=stream)
|
1208
|
-
print(file=stream)
|
1209
|
-
|
1210
|
-
if enumItems:
|
1211
|
-
print(
|
1212
|
-
"win32com.client.constants.__dicts__.append(constants.__dict__)",
|
1213
|
-
file=stream,
|
1214
|
-
)
|
1215
|
-
print(file=stream)
|
1216
|
-
|
1217
|
-
def generate_child(self, child, dir):
|
1218
|
-
"Generate a single child. May force a few children to be built as we generate deps"
|
1219
|
-
self.generate_type = GEN_DEMAND_CHILD
|
1220
|
-
|
1221
|
-
la = self.typelib.GetLibAttr()
|
1222
|
-
lcid = la[1]
|
1223
|
-
clsid = la[0]
|
1224
|
-
major = la[3]
|
1225
|
-
minor = la[4]
|
1226
|
-
self.base_mod_name = (
|
1227
|
-
"win32com.gen_py." + str(clsid)[1:-1] + f"x{lcid}x{major}x{minor}"
|
1228
|
-
)
|
1229
|
-
try:
|
1230
|
-
# Process the type library's CoClass objects, looking for the
|
1231
|
-
# specified name, or where a child has the specified name.
|
1232
|
-
# This ensures that all interesting things (including event interfaces)
|
1233
|
-
# are generated correctly.
|
1234
|
-
oleItems = {}
|
1235
|
-
vtableItems = {}
|
1236
|
-
infos = self.CollectOleItemInfosFromType()
|
1237
|
-
found = 0
|
1238
|
-
for type_info_tuple in infos:
|
1239
|
-
info, infotype, doc, attr = type_info_tuple
|
1240
|
-
if infotype == pythoncom.TKIND_COCLASS:
|
1241
|
-
coClassItem, child_infos = self._Build_CoClass(type_info_tuple)
|
1242
|
-
found = build.MakePublicAttributeName(doc[0]) == child
|
1243
|
-
if not found:
|
1244
|
-
# OK, check the child interfaces
|
1245
|
-
for (
|
1246
|
-
info,
|
1247
|
-
info_type,
|
1248
|
-
refType,
|
1249
|
-
doc,
|
1250
|
-
refAttr,
|
1251
|
-
flags,
|
1252
|
-
) in child_infos:
|
1253
|
-
if build.MakePublicAttributeName(doc[0]) == child:
|
1254
|
-
found = 1
|
1255
|
-
break
|
1256
|
-
if found:
|
1257
|
-
oleItems[coClassItem.clsid] = coClassItem
|
1258
|
-
self._Build_CoClassChildren(
|
1259
|
-
coClassItem, child_infos, oleItems, vtableItems
|
1260
|
-
)
|
1261
|
-
break
|
1262
|
-
if not found:
|
1263
|
-
# Doesn't appear in a class defn - look in the interface objects for it
|
1264
|
-
for type_info_tuple in infos:
|
1265
|
-
info, infotype, doc, attr = type_info_tuple
|
1266
|
-
if infotype in [
|
1267
|
-
pythoncom.TKIND_INTERFACE,
|
1268
|
-
pythoncom.TKIND_DISPATCH,
|
1269
|
-
]:
|
1270
|
-
if build.MakePublicAttributeName(doc[0]) == child:
|
1271
|
-
found = 1
|
1272
|
-
oleItem, vtableItem = self._Build_Interface(type_info_tuple)
|
1273
|
-
oleItems[clsid] = oleItem # Even "None" goes in here.
|
1274
|
-
if vtableItem is not None:
|
1275
|
-
vtableItems[clsid] = vtableItem
|
1276
|
-
|
1277
|
-
assert (
|
1278
|
-
found
|
1279
|
-
), f"Can't find the '{child}' interface in the CoClasses, or the interfaces"
|
1280
|
-
# Make a map of iid: dispitem, vtableitem)
|
1281
|
-
items = {}
|
1282
|
-
for key, value in oleItems.items():
|
1283
|
-
items[key] = (value, None)
|
1284
|
-
for key, value in vtableItems.items():
|
1285
|
-
existing = items.get(key, None)
|
1286
|
-
if existing is not None:
|
1287
|
-
new_val = existing[0], value
|
1288
|
-
else:
|
1289
|
-
new_val = None, value
|
1290
|
-
items[key] = new_val
|
1291
|
-
|
1292
|
-
self.progress.SetDescription("Generating...", len(items))
|
1293
|
-
for oleitem, vtableitem in items.values():
|
1294
|
-
an_item = oleitem or vtableitem
|
1295
|
-
assert not self.file, "already have a file?"
|
1296
|
-
# like makepy.py, we gen to a .temp file so failure doesn't
|
1297
|
-
# leave a 1/2 generated mess.
|
1298
|
-
out_name = os.path.join(dir, an_item.python_name) + ".py"
|
1299
|
-
worked = False
|
1300
|
-
self.file = self.open_writer(out_name)
|
1301
|
-
try:
|
1302
|
-
if oleitem is not None:
|
1303
|
-
self.do_gen_child_item(oleitem)
|
1304
|
-
if vtableitem is not None:
|
1305
|
-
self.do_gen_child_item(vtableitem)
|
1306
|
-
self.progress.Tick()
|
1307
|
-
worked = True
|
1308
|
-
finally:
|
1309
|
-
with gencache.ModuleMutex(self.base_mod_name.split(".")[-1]):
|
1310
|
-
self.finish_writer(out_name, self.file, worked)
|
1311
|
-
self.file = None
|
1312
|
-
finally:
|
1313
|
-
self.progress.Finished()
|
1314
|
-
|
1315
|
-
def do_gen_child_item(self, oleitem):
|
1316
|
-
moduleDoc = self.typelib.GetDocumentation(-1)
|
1317
|
-
docDesc = ""
|
1318
|
-
if moduleDoc[1]:
|
1319
|
-
docDesc = moduleDoc[1]
|
1320
|
-
self.progress.Starting(docDesc)
|
1321
|
-
self.progress.SetDescription("Building definitions from type library...")
|
1322
|
-
self.do_gen_file_header()
|
1323
|
-
oleitem.WriteClass(self)
|
1324
|
-
if oleitem.bWritten:
|
1325
|
-
print(
|
1326
|
-
'win32com.client.CLSIDToClass.RegisterCLSID( "{}", {} )'.format(
|
1327
|
-
oleitem.clsid, oleitem.python_name
|
1328
|
-
),
|
1329
|
-
file=self.file,
|
1330
|
-
)
|
1331
|
-
|
1332
|
-
def checkWriteDispatchBaseClass(self):
|
1333
|
-
if not self.bHaveWrittenDispatchBaseClass:
|
1334
|
-
print("from win32com.client import DispatchBaseClass", file=self.file)
|
1335
|
-
self.bHaveWrittenDispatchBaseClass = 1
|
1336
|
-
|
1337
|
-
def checkWriteCoClassBaseClass(self):
|
1338
|
-
if not self.bHaveWrittenCoClassBaseClass:
|
1339
|
-
print("from win32com.client import CoClassBaseClass", file=self.file)
|
1340
|
-
self.bHaveWrittenCoClassBaseClass = 1
|
1341
|
-
|
1342
|
-
def checkWriteEventBaseClass(self):
|
1343
|
-
# Not a base class as such...
|
1344
|
-
if not self.bHaveWrittenEventBaseClass:
|
1345
|
-
# Nothing to do any more!
|
1346
|
-
self.bHaveWrittenEventBaseClass = 1
|
1347
|
-
|
1348
|
-
|
1349
|
-
if __name__ == "__main__":
|
1350
|
-
print("This is a worker module. Please use makepy to generate Python files.")
|