How to Import the Toolkits

At the beginning of most Python programs, functionality that resides in other files is imported with the import statement. Built-in modules are usually imported like the following:

import os, sys

Then functionality from those modules can be called by prefixing the method name with the module name as in sys.stdout.write() or os.exit(0).

OpenEye toolkits reside in the openeye module. For example, OEChem TK can be imported as:

from openeye import oechem

This causes all methods and objects in the openeye.oechem namespace to be pulled directly into the current script’s oechem namespace. Once the package is imported, objects can be created and methods can be called using the oechem prefix, (e.g. oechem.OEGraphMol()).