Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think it would be a good idea to put some work into making the clr module we provide as (backwards?) compatible with IronPython as possible.
clr
This is the implementation: https://github.com/IronLanguages/main/blob/master/Languages/IronPython/IronPython/Runtime/ClrModule.cs
These are the public members
bool IsNetStandard
AddReference{,ToFile,ToFileAndPath,ByName,ByPartialName}
LoadAssembly{FromFileWithPath,FromFile,ByPartialName,ByName}
Use
import
GetString
GetBytes
SetCommandDispatcher
ImportExtensions
LoadTypeLibrary
AddReferenceToTypeLibrary
PublishTypeLibDesc
GetClrType
GetPythonType
Type
GetDynamicType
Reference
StrongBox
accepts
returns
Self
null
Dir
DirClr
dir
Convert
Compile{Modules,SubclassTypes}
GetSubclassedTypes
We could add stubs for all of these, raising NotImplementedError and port over everything that is simple or makes sense to us.
NotImplementedError
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think it would be a good idea to put some work into making the
clr
module we provide as (backwards?) compatible with IronPython as possible.This is the implementation: https://github.com/IronLanguages/main/blob/master/Languages/IronPython/IronPython/Runtime/ClrModule.cs
These are the public members
bool IsNetStandard
AddReference{,ToFile,ToFileAndPath,ByName,ByPartialName}
LoadAssembly{FromFileWithPath,FromFile,ByPartialName,ByName}
Use
(essentially a "generic"import
, we could map it directly to that)GetString
(decode .NET byte arrays as Latin1)GetBytes
(encode a .NET string as a byte array in Latin1)SetCommandDispatcher
(likely not applicable)ImportExtensions
(already requested by yours truly in Add support for clr.ImportExtensions #55)LoadTypeLibrary
,AddReferenceToTypeLibrary
,PublishTypeLibDesc
GetClrType
(Support clr.GetClrType() - as in IronPython #433)GetPythonType
(takes a .NETType
object and returns the corresponding wrapped Python type)GetDynamicType
(obsoleted, same asGetPythonType
)Reference
andStrongBox
(Failure in function selection according to parameters #226)accepts
(checks the argument types supplied to the decorated function, should be implementable in pure Python)returns
(validates the result type of a function, also easy in Python)Self
(always returnsnull
?!)Dir
andDirClr
(can both be mapped todir
in our case, I guess)Convert
(tries to convert the object to the passed type by casting explicitly event.Control as foo in ironpython #611 )Compile{Modules,SubclassTypes}
(not applicable in our case)GetSubclassedTypes
(returns a tuple of all types that have been subclassed, does not make sense in CPython)We could add stubs for all of these, raising
NotImplementedError
and port over everything that is simple or makes sense to us.The text was updated successfully, but these errors were encountered: