[IronPython] Hosting IronPython in Powershell

Curt Hagenlocher curt at hagenlocher.org
Tue Dec 30 21:43:55 CET 2008


This is a PowerShell error.  The DLR hosting interfaces overload Execute
(and other methods) with generic and non-generic versions, and it appears
that PowerShell won't allow calling of the generic version.  For this to
work, you'll need to find a way to force PowerShell to use the non-generic
overload.  I'm afraid my PS skills aren't up to that task.

On Tue, Dec 30, 2008 at 12:39 PM, Stephen Ng <stephen at theleengs.com> wrote:

> Thanks, dropping all the dlls from the IronPython2 directory into the GAC
> gets me a little further (adding to the path didn't work).  Sorry to need to
> be led by the hand...now I get:
> PS C:\Program Files\IronPython 2.0>
> [reflection.assembly]::loadFrom("C:\Program Files\IronPython
> 2.0\IronPython.dll")
>
> GAC    Version        Location
> ---    -------        --------
> True   v2.0.50727
> C:\WINDOWS\assembly\GAC_MSIL\IronPython\2.0.0.0__31bf3...
>
> PS C:\Program Files\IronPython 2.0> $py =
> [IronPython.Hosting.Python]::CreateEngine()
> PS C:\Program Files\IronPython 2.0> $py.Execute("3")
> Exception calling "Execute" with "1" argument(s): "Late bound operations
> cannot
>  be performed on types or methods for which ContainsGenericParameters is
> true."
> At line:1 char:12
> + $py.Execute( <<<< "3")
> PS C:\Program Files\IronPython 2.0> $py.Execute("print 'hello world!'")
> Exception calling "Execute" with "1" argument(s): "Late bound operations
> cannot be performed on types or methods for which ContainsGenericParameters
> is true."
> At line:1 char:12
> + $py.Execute( <<<< "print 'hello world!'")
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20081230/4c3dd6b7/attachment.html>


More information about the Ironpython-users mailing list