[Python.NET] How to use python object from powershell drectly?

Seungweon Park swpark71 at gmail.com
Wed May 1 17:04:05 CEST 2013

In order to test if it is possible, I try to load assembly
Python.Runtime.dll from Powershell.
Once open powershell prompt, and tried to load Python.Runtime.dll, but I
got following error in Windows 2008 R2 x64.

I compiled pythonnet with 32bit and Pyton 2.7.3 (32bit) installed.
(nPython.exe works fine in dos propmpt though, copied nPython.exe,
Python.Runtime.dll, clr.pyd into C:\Python27).
Is there something I missed? or anything I need to check? looks like I need
to load some assemblies before Python.Runtime.dll, or environment settings
to load Python 2.7.3.

Thank you,

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS C:\Python27>
Exception calling "LoadFrom" with "1" argument(s): "Could not load file or
assembly 'file:///C:\Python27\Python.Runtime.dll' or one of its
dependencies. An attempt was made to load a program with an incorrect
At line:1 char:39
+ [System.Reflection.Assembly]::LoadFrom <<<<
    + CategoryInfo          : NotSpecified: (:) [],
    + FullyQualifiedErrorId : DotNetMethodException

PS C:\Python27>

On Tue, Apr 30, 2013 at 3:06 PM, Seungweon Park <swpark71 at gmail.com> wrote:

> Hi,
> I'd like to call python method, or receive python object (method) directly
> from powershell. Is it possible using python.net?
> Thanks,
> Spark.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20130501/a914dd7d/attachment.html>

More information about the PythonDotNet mailing list