[Python.NET] Getting started with Python for .NET

Liam Corrigan Liam.Corrigan at allenvanguard.com
Wed Nov 7 14:42:18 CET 2012

You do not need to add the extension in the AddReference call.
Just clr.AddReference("DotNet4Class")
From DotNet4Class import *


Message: 1
Date: Tue, 6 Nov 2012 19:08:59 +0000 (UTC)
From: Anneka Boccio <adp at cypress.com>
To: pythondotnet at python.org
Subject: [Python.NET] Getting started with Python for .NET
Message-ID: <loom.20121106T200549-162 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii

I'm completely new to Python for .Net, and I actually have very little experience with Python and no experience with C#.  So please forgive me if my question seems very basic.

I'm using Python 2.7.3, and I downloaded
pythonnet-2.0-alpha2-clr2.0_131_py27_UCS2 and unzipped it into a folder named pyfornet_test, which also contains the dll I'm trying to use (called

Then I run this:
import sys
import os
import clr

Which gives me this error:
System.IO.FileNotFoundException: Unable to find assembly 'DotNet4Class.dll'.
   at Python.Runtime.CLRModule.AddReference(String name) in C:\Users\Barton\Documents\Visual Studio 2008\Projects\PyShar p\trunk\pythonnet\src\runtime\moduleobject.cs:line 375

Any advice would be much appreciated. Thank you!


Subject: Digest Footer

PythonDotNet mailing list
PythonDotNet at python.org


End of PythonDotNet Digest, Vol 103, Issue 7

This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes.

More information about the PythonDotNet mailing list