Some useful external libraries

Sometimes, you need to import methods from IronPython or the Microsoft .NET Framework to help your script. The following table describes some libraries that you will find useful:

import clr

clr (common language runtime) is an IronPython module that provides some basic .NET functionalities, such as string methods

import re

Import this library if you want to use regular expressions

from System.Collections.Generic import Dictionary

Use this library to create dictionary objects, which are useful to store an indexed list

from System.Drawing import Color

Use this library to define your own custom colors

from System.Drawing import Font

Use this library to manipulate fonts

from System import Guid

Get TIBCO Spotfire – A Comprehensive Primer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.