Monthly Archives: April 2018

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