Skip to content
Discussion options

You must be logged in to vote

Ok, thanks God. I got out the solution:

>>> import clr
>>> clr.AddReference(r'bin/Debug/ClassLibrary1')
>>>dir(clr)
['AddReference', 'ClassLibrary1', 'ClrLoader', 'FindAssembly', 'GetClrType', 'ListAssemblies', 'Microsoft', 'Python', 'System', '__class__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', '__version__', '_add_pending_namespaces', '_available_namespaces', '_extras', '_load_clr_module', 'clrmethod', 'clrproperty', 'getPreload', 'loader', 'setPreload', 't']

Now you could see that t is listed inside clr element. So you could reference t in global namespace as this: clr.t
That is all. Thank you.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ross-g
Comment options

Answer selected by cross-hello
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1698 on February 18, 2022 05:18.