Using .Net classes

ANDi allows the usage of arbitrary .Net classes, since the Python interpreter is IronPython. Thus, procedures that require higher performance can be created using .Net classes such as:

  1. Cryptography

  2. User Interfaces via Windows Forms

  3. Math

  4. System services

  5. Etc.

The class library of .Net can be found in the official place.

Note

Be aware to add the corresponding imports. The syntax must be also according to .Net

Dialog for selecting a file

import clr
clr.AddReference("System.Windows.Forms")
from System.Windows.Forms import OpenFileDialog, DialogResult

dialog = OpenFileDialog()
dialog.Filter = "Trace files (*.pcap;*.asc)|*.pcap;*.asc"

if dialog.ShowDialog() == DialogResult.OK:
  print(dialog.FileName)
else:
  print("No file selected")
../_images/.Net.png