def encode(path):
    'Convert relative or absolute `path` to cmdx Node\n\n    Fastest conversion from absolute path to Node\n\n    Arguments:\n        path (str): Absolute or relative path to DAG or DG node\n\n    '
    assert isinstance(path, string_types), ('%s was not string' % path)
    selectionList = om.MSelectionList()
    try:
        selectionList.add(path)
    except RuntimeError:
        raise ExistError(("'%s' does not exist" % path))
    mobj = selectionList.getDependNode(0)
    return Node(mobj)
Convert relative or absolute `path` to cmdx Node

Fastest conversion from absolute path to Node

Arguments:
    path (str): Absolute or relative path to DAG or DG node
def encode(path):
    'Convert relative or absolute `path` to cmdx Node\n\n    Fastest conversion from absolute path to Node\n\n    Arguments:\n        path (str): Absolute or relative path to DAG or DG node\n\n    '
    assert isinstance(path, string_types), ('%s was not string' % path)
    selectionList = om.MSelectionList()
    try:
        selectionList.add(path)
    except RuntimeError:
        raise ExistError(("'%s' does not exist" % path))
    mobj = selectionList.getDependNode(0)
    return Node(mobj)