GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add support for DLR types · Issue #72 · pythonnet/pythonnet

Add support for DLR types #72

New issue
Copy link
New issue
Copy link
Open
Open
Add support for DLR types#72
Copy link

Description

@filmor
filmor
opened on Apr 16, 2015
Issue body actions

Using this it's possible to implement all required functionality in a separate DLR meta-class. I've already tried to do this in Python but sadly the .NET types (or their representation in Python-space) are not patchable.

Activity

  1. filmor commented on Apr 20, 2015

    @filmor
    filmor
    on Apr 20, 2015
    MemberAuthor
    More actions

    Indeed I have now found a way around this, check out this gist: https://gist.github.com/filmor/58f5099f96570c64b1d3

    The implementation of the member access is done by basically translating the code that the C# compiler produces when accessing dynamic properties to Python.

    Note: Strictly speaking this does not implement full support, as it only helps classes that derive from DynamicObject, not those that only implement IDynamicMetaObjectProvider.

    Reacted by Denis Akhiyarov and jiajiawei
    Reacted by Denis Akhiyarov and jiajiawei
  2. den-run-ai commented on Apr 15, 2016

    @den-run-ai
    den-run-ai
    on Apr 15, 2016
    Contributor
    More actions

    @filmor what is the use case for exposing DLR types in python?

  3. filmor commented on Apr 15, 2016

    @filmor
    filmor
    on Apr 15, 2016
    MemberAuthor
    More actions

    My particular use case is a configuration library that allows for constructs like:

    string proxy = c.proxy.http;
    

    where c is a dynamic object of which the members are implicitly created by reading from the config. It allows us to pass partial configuration around easily and reduces string-littering.

  4. den-run-ai commented on Jun 13, 2016

    @den-run-ai
    den-run-ai
    on Jun 13, 2016
    Contributor
    More actions

    @filmor can this be used to access dynamic attributes of COM objects? if yes, can you provide minimal example?

  5. den-run-ai
    added
    enhancement
    decision
    on Sep 5, 2016
  6. den-run-ai commented on Sep 6, 2016

    @den-run-ai
    den-run-ai
    on Sep 6, 2016
    Contributor
    More actions

    @filmor here is my first attempt at using com objects from pythonnet:

    https://gist.github.com/denfromufa/ec559b5af41060c5ac318f7f59d8b415#file-excel_interop_vsto-ipynb

  7. den-run-ai commented on Jul 5, 2017

    @den-run-ai
    den-run-ai
    on Jul 5, 2017
    Contributor
    More actions

    @filmor how would you add support for IDynamicMetaObjectProvider?

  8. den-run-ai commented on Jul 5, 2017

    @den-run-ai
    den-run-ai
    on Jul 5, 2017
    Contributor
    More actions

    This looks really powerful library:

    https://github.com/ekonbenefits/dynamitey/wiki/UsageReallyLateBinding

  9. filmor
    removed
    decision
    on Jun 9, 2020
  10. filmor
    removed
    enhancement
    on Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.