Python with .NET

  • Python for .NET (pythonnet)
    • work with Python 2+, Python 3+ for Unicode
    • Only Python interactive window in Visual Studio support intellisense.
  • IronPython
    • only work with Python 2
    • Python Tools for Visual Studio supports intellisense in code editor.

Both use the same machnism to read .NET code

import sys
import clr
 
sys.path.append("path/to/dll-or-exe-file")
 
clr.AddReference("ClassLibrary1")
 
from ClassLibrary1 import Class1
 
c = Class1()

To print Unicode string, set font of console windows:

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s