Re: [Python.NET] Getting started with Python for .NET
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@cypress.com> To: pythondotnet@python.org Subject: [Python.NET] Getting started with Python for .NET Message-ID: <loom.20121106T200549-162@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 DotNet4Class.dll) Then I run this: import sys import os import clr sys.path.append(r"C:\pyfornet_test") clr.AddReference("DotNet4Class.dll") 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@python.org http://mail.python.org/mailman/listinfo/pythondotnet ------------------------------ 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.
participants (1)
-
Liam Corrigan