DEncode

Encoding and decoding for dirac, Ids:

i -> int I -> long f -> float b -> bool s -> string z -> datetime n -> none l -> list t -> tuple d -> dictionary

DIRAC.Core.Utilities.DEncode.decode(data)

Generic decoding function

DIRAC.Core.Utilities.DEncode.decodeBool(data, i)

Decoding booleans

DIRAC.Core.Utilities.DEncode.decodeDateTime(data, i)

Decoding datetime

DIRAC.Core.Utilities.DEncode.decodeDict(data, i)

Decoding dictionary

DIRAC.Core.Utilities.DEncode.decodeFloat(data, i)

Decoding floats

DIRAC.Core.Utilities.DEncode.decodeInt(data, i)

Decoding ints

DIRAC.Core.Utilities.DEncode.decodeList(data, i)

Decoding list

DIRAC.Core.Utilities.DEncode.decodeLong(data, i)

Decoding longs

DIRAC.Core.Utilities.DEncode.decodeNone(_data, i)

Decoding None

DIRAC.Core.Utilities.DEncode.decodeString(data, i)

Decoding strings

DIRAC.Core.Utilities.DEncode.decodeTuple(data, i)

Decoding tuple

DIRAC.Core.Utilities.DEncode.decodeUnicode(data, i)

Decoding unicode strings

DIRAC.Core.Utilities.DEncode.encode(uObject)

Generic encoding function

DIRAC.Core.Utilities.DEncode.encodeBool(bValue, eList)

Encoding booleans

DIRAC.Core.Utilities.DEncode.encodeDateTime(oValue, eList)

Encoding datetime

DIRAC.Core.Utilities.DEncode.encodeDict(dValue, eList)

Encoding dictionary

DIRAC.Core.Utilities.DEncode.encodeFloat(iValue, eList)

Encoding floats

DIRAC.Core.Utilities.DEncode.encodeInt(iValue, eList)

Encoding ints

DIRAC.Core.Utilities.DEncode.encodeList(lValue, eList)

Encoding list

DIRAC.Core.Utilities.DEncode.encodeLong(iValue, eList)

Encoding longs

DIRAC.Core.Utilities.DEncode.encodeNone(_oValue, eList)

Encoding None

DIRAC.Core.Utilities.DEncode.encodeString(sValue, eList)

Encoding strings

DIRAC.Core.Utilities.DEncode.encodeTuple(lValue, eList)

Encoding tuple

DIRAC.Core.Utilities.DEncode.encodeUnicode(sValue, eList)

Encoding unicode strings

DIRAC.Core.Utilities.DEncode.ignoreEncodeWarning(meth)

Decorator to put around method that should not anymore throw warnings

Warning:

do not use around functions

Warning:

for a class method, put it after the @classmethod decorator

Parameters:

meth – decorated method

DIRAC.Core.Utilities.DEncode.printDebugCallstack(headerMessage)

Prints information about the current stack as well as the caller parameters. The purpose of this method is to track down all the places in DIRAC that might not survive the change to JSON encoding.

Some methods are ignored:

Parameters:

headerMessage – message to be displayed first

Returns:

None

class DIRAC.Core.Utilities.DEncode.types

Bases: object

BooleanType

alias of bool

DictType

alias of dict

FloatType

alias of float

IntType

alias of int

ListType

alias of list

LongType

alias of int

class NoneType

Bases: object

StringType

alias of str

TupleType

alias of tuple

UnicodeType

alias of str