pymel.core.language.OptionVarDict

digraph inheritanceeaabe65d2a { rankdir=TB; ranksep=0.15; nodesep=0.15; size="8.0, 12.0"; "Container" [shape=box,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=8,style="setlinewidth(0.5)",height=0.25]; "Iterable" [shape=box,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=8,style="setlinewidth(0.5)",height=0.25]; "Mapping" [shape=box,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=8,style="setlinewidth(0.5)",height=0.25]; "Sized" -> "Mapping" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Iterable" -> "Mapping" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Container" -> "Mapping" [arrowsize=0.5,style="setlinewidth(0.5)"]; "MutableMapping" [shape=box,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=8,style="setlinewidth(0.5)",height=0.25]; "Mapping" -> "MutableMapping" [arrowsize=0.5,style="setlinewidth(0.5)"]; "OptionVarDict" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="#pymel.core.language.OptionVarDict",style="setlinewidth(0.5)",tooltip="A dictionary-like class for accessing and modifying optionVars.",height=0.25,shape=box,fontsize=8]; "MutableMapping" -> "OptionVarDict" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Sized" [shape=box,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=8,style="setlinewidth(0.5)",height=0.25]; }

class OptionVarDict

A dictionary-like class for accessing and modifying optionVars.

>>> from pymel.all import *
>>> optionVar['test'] = 'dooder'
>>> optionVar['test']
u'dooder'
>>> if 'numbers' not in env.optionVars:
...     optionVar['numbers'] = [1,24,7]
>>> optionVar['numbers'].appendVar( 9 )
>>> numArray = optionVar.pop('numbers')
>>> print numArray
[1L, 24L, 7L, 9L]
>>> optionVar.has_key('numbers') # previous pop removed the key
False
has_key(key)
iterkeys()
keys()
pop(key)