Esempio n. 1
0
 def varExists(self, varName, autoCall=False, useDottedNotation=True):
     """Test if a variable name exists in the searchList."""
     try:
         valueFromSearchList(self.searchList(), varName.replace('$', ''), autoCall, useDottedNotation)
         return True
     except NotFound:
         return False
Esempio n. 2
0
 def varExists(self, varName, autoCall=False, useDottedNotation=True):
     """Test if a variable name exists in the searchList."""
     try:
         valueFromSearchList(self.searchList(), varName.replace('$', ''),
                             autoCall, useDottedNotation)
         return True
     except NotFound:
         return False
Esempio n. 3
0
 def getVar(self, varName, default=Unspecified, autoCall=True, useDottedNotation=True):
     """Get a variable from the searchList.  If the variable can't be found
     in the searchList, it returns the default value if one was given, or
     raises NameMapper.NotFound.
     """
     try:
         return valueFromSearchList(self.searchList(), varName.replace('$', ''), autoCall, useDottedNotation)
     except NotFound:
         if default is not Unspecified:
             return default
         else:
             raise
Esempio n. 4
0
 def getVar(self, varName, default=UNSPECIFIED, autoCall=True, useDottedNotation=True):
     """Get a variable from the searchList.  If the variable can't be found
     in the searchList, it returns the default value if one was given, or
     raises NameMapper.NotFound.
     """
     assert '$' not in varName, varName
     try:
         return valueFromSearchList(self.searchList(), varName, autoCall, useDottedNotation)
     except NotFound:
         if default is not UNSPECIFIED:
             return default
         else:
             raise
Esempio n. 5
0
 def getVar(self,
            varName,
            default=Unspecified,
            autoCall=True,
            useDottedNotation=True):
     """Get a variable from the searchList.  If the variable can't be found
     in the searchList, it returns the default value if one was given, or
     raises NameMapper.NotFound.
     """
     try:
         return valueFromSearchList(self.searchList(),
                                    varName.replace('$', ''), autoCall,
                                    useDottedNotation)
     except NotFound:
         if default is not Unspecified:
             return default
         else:
             raise
Esempio n. 6
0
 def VFS(self, searchList, name, autocall=True):
     return valueFromSearchList(searchList, name, autocall)
Esempio n. 7
0
 def VFS(self, searchList, name, autocall=True):
     return valueFromSearchList(searchList, name, autocall)