Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



Code Block
import it
def getCatalog(name):
    ''' return a catalog by name, if not found
        then create a new one.
    model =
    for cat in model.GetCatalogs():
        if cat.GetLabel() == name:
            return cat
    cat =
    return cat
If you editing heavily as you develop your code you might not want to keep quitting "it" to get it to reload We can't use python's reload() command because, for various reasons, is not loaded as a python module. We can fix this by not loading directly and instead using a intermediate loading script that does load import as a module.
First modify you it.ini file to point to the intermediate file: