Skip to content

Latest commit

 

History

History
114 lines (79 loc) · 2.95 KB

classad.rst

File metadata and controls

114 lines (79 loc) · 2.95 KB

classad API Reference

classad

Brian Bockelman <bbockelm@cse.unl.edu>

This page is an exhaustive reference of the API exposed by the classad module. It is not meant to be a tutorial for new users but rather a helpful guide for those who already understand the basic usage of the module.

ClassAd Representation

ClassAds are individually represented by the ClassAd class. Their attribute are key-value pairs, as in a standard Python dictionary. The keys are strings, and the values may be either Python primitives corresponding to ClassAd data types (string, bool, etc.) or ExprTree objects, which correspond to un-evaluated ClassAd expressions.

ClassAd

ClassAd.eval

ClassAd.lookup

ClassAd.printOld

ClassAd.printJson

ClassAd.flatten

ClassAd.matches

ClassAd.symmetricMatch

ClassAd.externalRefs

ClassAd.internalRefs

ClassAd.__eq__

ClassAd.__ne__

ExprTree

ExprTree.sameAs

ExprTree.eval

ExprTree.simplify

Value

Parsing and Creating ClassAds

classad provides a variety of utility functions that can help you construct ClassAd expressions and parse string representations of ClassAds.

parseAds

parseNext

parseOne

quote

unquote

Attribute

Function

Literal

lastError

register

registerLibrary

Parser Control

The behavior of parseAds, parseNext, and parseOne can be controlled by giving them different values of the Parser enumeration.

Parser

Utility Functions

version

Exceptions

For backwards-compatibility, the exceptions in this module inherit from the built-in exceptions raised in earlier (pre-v8.9.9) versions.

ClassAdException

ClassAdEnumError

ClassAdEvaluationError

ClassAdInternalError

ClassAdOSError

ClassAdParseError

ClassAdTypeError

ClassAdValueError

Deprecated Functions

The functions in this section are deprecated; new code should not use them and existing code should be rewritten to use their replacements.

parse

parseOld