How to use _extract method in assertpy

Best Python code snippet using assertpy_python

extract.py

Source:extract.py Github

copy

Full Screen

1# This file was automatically generated by SWIG (http://www.swig.org).2# Version 1.3.313#4# Don't modify this file, modify the SWIG interface instead.5# This file is compatible with both classic and new-style classes.6import _extract7import new8new_instancemethod = new.instancemethod9try:10 _swig_property = property11except NameError:12 pass # Python < 2.2 doesn't have 'property'.13def _swig_setattr_nondynamic(self,class_type,name,value,static=1):14 if (name == "thisown"): return self.this.own(value)15 if (name == "this"):16 if type(value).__name__ == 'PySwigObject':17 self.__dict__[name] = value18 return19 method = class_type.__swig_setmethods__.get(name,None)20 if method: return method(self,value)21 if (not static) or hasattr(self,name):22 self.__dict__[name] = value23 else:24 raise AttributeError("You cannot add attributes to %s" % self)25def _swig_setattr(self,class_type,name,value):26 return _swig_setattr_nondynamic(self,class_type,name,value,0)27def _swig_getattr(self,class_type,name):28 if (name == "thisown"): return self.this.own()29 method = class_type.__swig_getmethods__.get(name,None)30 if method: return method(self)31 raise AttributeError,name32def _swig_repr(self):33 try: strthis = "proxy of " + self.this.__repr__()34 except: strthis = ""35 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)36import types37try:38 _object = types.ObjectType39 _newclass = 140except AttributeError:41 class _object : pass42 _newclass = 043del types44import _extract as cppModule45import core46VISUS_EXTRACTION_STARTED = _extract.VISUS_EXTRACTION_STARTED47VISUS_EXTRACTION_REFINING = _extract.VISUS_EXTRACTION_REFINING48VISUS_EXTRACTION_FINISHED = _extract.VISUS_EXTRACTION_FINISHED49VISUS_EXTRACTION_INVALID = _extract.VISUS_EXTRACTION_INVALID50class VisusSampleExtractor(_object):51 __swig_setmethods__ = {}52 __setattr__ = lambda self, name, value: _swig_setattr(self, VisusSampleExtractor, name, value)53 __swig_getmethods__ = {}54 __getattr__ = lambda self, name: _swig_getattr(self, VisusSampleExtractor, name)55 def __init__(self): raise AttributeError, "No constructor defined"56 __repr__ = _swig_repr57 sUpdateInterval = _extract.VisusSampleExtractor_sUpdateInterval58 __swig_destroy__ = _extract.delete_VisusSampleExtractor59 __del__ = lambda self : None;60 def status(*args): return _extract.VisusSampleExtractor_status(*args)61 def idle(*args): return _extract.VisusSampleExtractor_idle(*args)62VisusSampleExtractor_swigregister = _extract.VisusSampleExtractor_swigregister63VisusSampleExtractor_swigregister(VisusSampleExtractor)64class VisusAxisAlignedExtractor(core.VisusGroup,VisusSampleExtractor):65 __swig_setmethods__ = {}66 for _s in [core.VisusGroup,VisusSampleExtractor]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))67 __setattr__ = lambda self, name, value: _swig_setattr(self, VisusAxisAlignedExtractor, name, value)68 __swig_getmethods__ = {}69 for _s in [core.VisusGroup,VisusSampleExtractor]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))70 __getattr__ = lambda self, name: _swig_getattr(self, VisusAxisAlignedExtractor, name)71 def __init__(self): raise AttributeError, "No constructor defined"72 __repr__ = _swig_repr73 def infoString(*args): return _extract.VisusAxisAlignedExtractor_infoString(*args)74 def dataSource(*args): return _extract.VisusAxisAlignedExtractor_dataSource(*args)75 def interrupt(*args): return _extract.VisusAxisAlignedExtractor_interrupt(*args)76 def rotateRequest(*args): return _extract.VisusAxisAlignedExtractor_rotateRequest(*args)77 def translateRequest(*args): return _extract.VisusAxisAlignedExtractor_translateRequest(*args)78 def displayBoundingBox(*args): return _extract.VisusAxisAlignedExtractor_displayBoundingBox(*args)79 def extractionLoop(*args): return _extract.VisusAxisAlignedExtractor_extractionLoop(*args)80 def produce(*args): return _extract.VisusAxisAlignedExtractor_produce(*args)81 def latestRequest(*args): return _extract.VisusAxisAlignedExtractor_latestRequest(*args)82 __swig_getmethods__["construct"] = lambda x: _extract.VisusAxisAlignedExtractor_construct83 if _newclass:construct = staticmethod(_extract.VisusAxisAlignedExtractor_construct)84 def nodeType(*args): return _extract.VisusAxisAlignedExtractor_nodeType(*args)85VisusAxisAlignedExtractor_swigregister = _extract.VisusAxisAlignedExtractor_swigregister86VisusAxisAlignedExtractor_swigregister(VisusAxisAlignedExtractor)87VisusAxisAlignedExtractor_construct = _extract.VisusAxisAlignedExtractor_construct88class pVisusAxisAlignedExtractor(_object):89 __swig_setmethods__ = {}90 __setattr__ = lambda self, name, value: _swig_setattr(self, pVisusAxisAlignedExtractor, name, value)91 __swig_getmethods__ = {}92 __getattr__ = lambda self, name: _swig_getattr(self, pVisusAxisAlignedExtractor, name)93 def __init__(self): raise AttributeError, "No constructor defined"94 __repr__ = _swig_repr95 __swig_destroy__ = _extract.delete_pVisusAxisAlignedExtractor96 __del__ = lambda self : None;97 def __eq__(*args): return _extract.pVisusAxisAlignedExtractor___eq__(*args)98 def __ne__(*args): return _extract.pVisusAxisAlignedExtractor___ne__(*args)99 def __ref__(*args): return _extract.pVisusAxisAlignedExtractor___ref__(*args)100 def __deref__(*args): return _extract.pVisusAxisAlignedExtractor___deref__(*args)101 def getString(*args): return _extract.pVisusAxisAlignedExtractor_getString(*args)102 def isEmpty(*args): return _extract.pVisusAxisAlignedExtractor_isEmpty(*args)103 def assign(*args): return _extract.pVisusAxisAlignedExtractor_assign(*args)104 def infoString(*args): return _extract.pVisusAxisAlignedExtractor_infoString(*args)105 def dataSource(*args): return _extract.pVisusAxisAlignedExtractor_dataSource(*args)106 def interrupt(*args): return _extract.pVisusAxisAlignedExtractor_interrupt(*args)107 def rotateRequest(*args): return _extract.pVisusAxisAlignedExtractor_rotateRequest(*args)108 def translateRequest(*args): return _extract.pVisusAxisAlignedExtractor_translateRequest(*args)109 def displayBoundingBox(*args): return _extract.pVisusAxisAlignedExtractor_displayBoundingBox(*args)110 def extractionLoop(*args): return _extract.pVisusAxisAlignedExtractor_extractionLoop(*args)111 def produce(*args): return _extract.pVisusAxisAlignedExtractor_produce(*args)112 def latestRequest(*args): return _extract.pVisusAxisAlignedExtractor_latestRequest(*args)113 def construct(*args): return _extract.pVisusAxisAlignedExtractor_construct(*args)114 def nodeType(*args): return _extract.pVisusAxisAlignedExtractor_nodeType(*args)115 __swig_setmethods__["XML_TAG"] = _extract.pVisusAxisAlignedExtractor_XML_TAG_set116 __swig_getmethods__["XML_TAG"] = _extract.pVisusAxisAlignedExtractor_XML_TAG_get117 if _newclass:XML_TAG = _swig_property(_extract.pVisusAxisAlignedExtractor_XML_TAG_get, _extract.pVisusAxisAlignedExtractor_XML_TAG_set)118 __swig_getmethods__["sNumTypes"] = _extract.pVisusAxisAlignedExtractor_sNumTypes_get119 if _newclass:sNumTypes = _swig_property(_extract.pVisusAxisAlignedExtractor_sNumTypes_get)120 def numTypes(*args): return _extract.pVisusAxisAlignedExtractor_numTypes(*args)121 def locked(*args): return _extract.pVisusAxisAlignedExtractor_locked(*args)122 def lockToRead(*args): return _extract.pVisusAxisAlignedExtractor_lockToRead(*args)123 def unlockAfterRead(*args): return _extract.pVisusAxisAlignedExtractor_unlockAfterRead(*args)124 def lockToWrite(*args): return _extract.pVisusAxisAlignedExtractor_lockToWrite(*args)125 def unlockAfterWrite(*args): return _extract.pVisusAxisAlignedExtractor_unlockAfterWrite(*args)126 __swig_setmethods__["sRenderMode"] = _extract.pVisusAxisAlignedExtractor_sRenderMode_set127 __swig_getmethods__["sRenderMode"] = _extract.pVisusAxisAlignedExtractor_sRenderMode_get128 if _newclass:sRenderMode = _swig_property(_extract.pVisusAxisAlignedExtractor_sRenderMode_get, _extract.pVisusAxisAlignedExtractor_sRenderMode_set)129 def __and__(*args): return _extract.pVisusAxisAlignedExtractor___and__(*args)130 def self(*args): return _extract.pVisusAxisAlignedExtractor_self(*args)131 def parent(*args): return _extract.pVisusAxisAlignedExtractor_parent(*args)132 def nrOfChildren(*args): return _extract.pVisusAxisAlignedExtractor_nrOfChildren(*args)133 def child(*args): return _extract.pVisusAxisAlignedExtractor_child(*args)134 def getChildIndex(*args): return _extract.pVisusAxisAlignedExtractor_getChildIndex(*args)135 def attachSubTree(*args): return _extract.pVisusAxisAlignedExtractor_attachSubTree(*args)136 def detachSubTree(*args): return _extract.pVisusAxisAlignedExtractor_detachSubTree(*args)137 def destroySubTree(*args): return _extract.pVisusAxisAlignedExtractor_destroySubTree(*args)138 def nextNode(*args): return _extract.pVisusAxisAlignedExtractor_nextNode(*args)139 def screenShot(*args): return _extract.pVisusAxisAlignedExtractor_screenShot(*args)140 def type(*args): return _extract.pVisusAxisAlignedExtractor_type(*args)141 def category(*args): return _extract.pVisusAxisAlignedExtractor_category(*args)142 def drawBoundingBox(*args): return _extract.pVisusAxisAlignedExtractor_drawBoundingBox(*args)143 def visible(*args): return _extract.pVisusAxisAlignedExtractor_visible(*args)144 def hasSharedValue(*args): return _extract.pVisusAxisAlignedExtractor_hasSharedValue(*args)145 def inherit(*args): return _extract.pVisusAxisAlignedExtractor_inherit(*args)146 def boundingBoxColor(*args): return _extract.pVisusAxisAlignedExtractor_boundingBoxColor(*args)147 def markAsDirty(*args): return _extract.pVisusAxisAlignedExtractor_markAsDirty(*args)148 def readClearDirty(*args): return _extract.pVisusAxisAlignedExtractor_readClearDirty(*args)149 def isDirty(*args): return _extract.pVisusAxisAlignedExtractor_isDirty(*args)150 def declareParameter(*args): return _extract.pVisusAxisAlignedExtractor_declareParameter(*args)151 def propagateUpwards(*args): return _extract.pVisusAxisAlignedExtractor_propagateUpwards(*args)152 def propagateDownwards(*args): return _extract.pVisusAxisAlignedExtractor_propagateDownwards(*args)153 def getValue(*args): return _extract.pVisusAxisAlignedExtractor_getValue(*args)154 def setValue(*args): return _extract.pVisusAxisAlignedExtractor_setValue(*args)155 def accumulate2D(*args): return _extract.pVisusAxisAlignedExtractor_accumulate2D(*args)156 def accumulate3D(*args): return _extract.pVisusAxisAlignedExtractor_accumulate3D(*args)157 def mapToWorldBox(*args): return _extract.pVisusAxisAlignedExtractor_mapToWorldBox(*args)158 def rotate(*args): return _extract.pVisusAxisAlignedExtractor_rotate(*args)159 def translate(*args): return _extract.pVisusAxisAlignedExtractor_translate(*args)160 def scale(*args): return _extract.pVisusAxisAlignedExtractor_scale(*args)161 def freeze(*args): return _extract.pVisusAxisAlignedExtractor_freeze(*args)162 def unfreeze(*args): return _extract.pVisusAxisAlignedExtractor_unfreeze(*args)163 def frozen(*args): return _extract.pVisusAxisAlignedExtractor_frozen(*args)164 def display(*args): return _extract.pVisusAxisAlignedExtractor_display(*args)165 def validateXML(*args): return _extract.pVisusAxisAlignedExtractor_validateXML(*args)166 def product(*args): return _extract.pVisusAxisAlignedExtractor_product(*args)167 def readLockProduct(*args): return _extract.pVisusAxisAlignedExtractor_readLockProduct(*args)168 def unlockProduct(*args): return _extract.pVisusAxisAlignedExtractor_unlockProduct(*args)169 def id(*args): return _extract.pVisusAxisAlignedExtractor_id(*args)170 __swig_getmethods__["sUpdateInterval"] = _extract.pVisusAxisAlignedExtractor_sUpdateInterval_get171 if _newclass:sUpdateInterval = _swig_property(_extract.pVisusAxisAlignedExtractor_sUpdateInterval_get)172 def status(*args): return _extract.pVisusAxisAlignedExtractor_status(*args)173 def idle(*args): return _extract.pVisusAxisAlignedExtractor_idle(*args)174pVisusAxisAlignedExtractor_swigregister = _extract.pVisusAxisAlignedExtractor_swigregister175pVisusAxisAlignedExtractor_swigregister(pVisusAxisAlignedExtractor)176class VisusIsoSurface(_object):177 __swig_setmethods__ = {}178 __setattr__ = lambda self, name, value: _swig_setattr(self, VisusIsoSurface, name, value)179 __swig_getmethods__ = {}180 __getattr__ = lambda self, name: _swig_getattr(self, VisusIsoSurface, name)181 def __init__(self): raise AttributeError, "No constructor defined"182 __repr__ = _swig_repr183 def translationStyle(*args): return _extract.VisusIsoSurface_translationStyle(*args)184 def rotate(*args): return _extract.VisusIsoSurface_rotate(*args)185 def translate(*args): return _extract.VisusIsoSurface_translate(*args)186 def translateRequest(*args): return _extract.VisusIsoSurface_translateRequest(*args)187 def connectIso(*args): return _extract.VisusIsoSurface_connectIso(*args)188 def checkParameters(*args): return _extract.VisusIsoSurface_checkParameters(*args)189 def checkData(*args): return _extract.VisusIsoSurface_checkData(*args)190 def process(*args): return _extract.VisusIsoSurface_process(*args)191 def displayBoundingBox(*args): return _extract.VisusIsoSurface_displayBoundingBox(*args)192 __swig_getmethods__["construct"] = lambda x: _extract.VisusIsoSurface_construct193 if _newclass:construct = staticmethod(_extract.VisusIsoSurface_construct)194 def nodeType(*args): return _extract.VisusIsoSurface_nodeType(*args)195VisusIsoSurface_swigregister = _extract.VisusIsoSurface_swigregister196VisusIsoSurface_swigregister(VisusIsoSurface)197VisusIsoSurface_construct = _extract.VisusIsoSurface_construct198class pVisusIsoSurface(_object):199 __swig_setmethods__ = {}200 __setattr__ = lambda self, name, value: _swig_setattr(self, pVisusIsoSurface, name, value)201 __swig_getmethods__ = {}202 __getattr__ = lambda self, name: _swig_getattr(self, pVisusIsoSurface, name)203 def __init__(self): raise AttributeError, "No constructor defined"204 __repr__ = _swig_repr205 __swig_destroy__ = _extract.delete_pVisusIsoSurface206 __del__ = lambda self : None;207 def __eq__(*args): return _extract.pVisusIsoSurface___eq__(*args)208 def __ne__(*args): return _extract.pVisusIsoSurface___ne__(*args)209 def __ref__(*args): return _extract.pVisusIsoSurface___ref__(*args)210 def __deref__(*args): return _extract.pVisusIsoSurface___deref__(*args)211 def getString(*args): return _extract.pVisusIsoSurface_getString(*args)212 def isEmpty(*args): return _extract.pVisusIsoSurface_isEmpty(*args)213 def assign(*args): return _extract.pVisusIsoSurface_assign(*args)214 def translationStyle(*args): return _extract.pVisusIsoSurface_translationStyle(*args)215 def rotate(*args): return _extract.pVisusIsoSurface_rotate(*args)216 def translate(*args): return _extract.pVisusIsoSurface_translate(*args)217 def translateRequest(*args): return _extract.pVisusIsoSurface_translateRequest(*args)218 def connectIso(*args): return _extract.pVisusIsoSurface_connectIso(*args)219 def checkParameters(*args): return _extract.pVisusIsoSurface_checkParameters(*args)220 def checkData(*args): return _extract.pVisusIsoSurface_checkData(*args)221 def process(*args): return _extract.pVisusIsoSurface_process(*args)222 def displayBoundingBox(*args): return _extract.pVisusIsoSurface_displayBoundingBox(*args)223 def construct(*args): return _extract.pVisusIsoSurface_construct(*args)224 def nodeType(*args): return _extract.pVisusIsoSurface_nodeType(*args)225 def processingMode(*args): return _extract.pVisusIsoSurface_processingMode(*args)226 def processThreadless(*args): return _extract.pVisusIsoSurface_processThreadless(*args)227 def latestRequest(*args): return _extract.pVisusIsoSurface_latestRequest(*args)228 __swig_setmethods__["XML_TAG"] = _extract.pVisusIsoSurface_XML_TAG_set229 __swig_getmethods__["XML_TAG"] = _extract.pVisusIsoSurface_XML_TAG_get230 if _newclass:XML_TAG = _swig_property(_extract.pVisusIsoSurface_XML_TAG_get, _extract.pVisusIsoSurface_XML_TAG_set)231 __swig_getmethods__["sNumTypes"] = _extract.pVisusIsoSurface_sNumTypes_get232 if _newclass:sNumTypes = _swig_property(_extract.pVisusIsoSurface_sNumTypes_get)233 def numTypes(*args): return _extract.pVisusIsoSurface_numTypes(*args)234 def locked(*args): return _extract.pVisusIsoSurface_locked(*args)235 def lockToRead(*args): return _extract.pVisusIsoSurface_lockToRead(*args)236 def unlockAfterRead(*args): return _extract.pVisusIsoSurface_unlockAfterRead(*args)237 def lockToWrite(*args): return _extract.pVisusIsoSurface_lockToWrite(*args)238 def unlockAfterWrite(*args): return _extract.pVisusIsoSurface_unlockAfterWrite(*args)239 __swig_setmethods__["sRenderMode"] = _extract.pVisusIsoSurface_sRenderMode_set240 __swig_getmethods__["sRenderMode"] = _extract.pVisusIsoSurface_sRenderMode_get241 if _newclass:sRenderMode = _swig_property(_extract.pVisusIsoSurface_sRenderMode_get, _extract.pVisusIsoSurface_sRenderMode_set)242 def __and__(*args): return _extract.pVisusIsoSurface___and__(*args)243 def infoString(*args): return _extract.pVisusIsoSurface_infoString(*args)244 def self(*args): return _extract.pVisusIsoSurface_self(*args)245 def parent(*args): return _extract.pVisusIsoSurface_parent(*args)246 def nrOfChildren(*args): return _extract.pVisusIsoSurface_nrOfChildren(*args)247 def child(*args): return _extract.pVisusIsoSurface_child(*args)248 def getChildIndex(*args): return _extract.pVisusIsoSurface_getChildIndex(*args)249 def attachSubTree(*args): return _extract.pVisusIsoSurface_attachSubTree(*args)250 def detachSubTree(*args): return _extract.pVisusIsoSurface_detachSubTree(*args)251 def destroySubTree(*args): return _extract.pVisusIsoSurface_destroySubTree(*args)252 def nextNode(*args): return _extract.pVisusIsoSurface_nextNode(*args)253 def screenShot(*args): return _extract.pVisusIsoSurface_screenShot(*args)254 def type(*args): return _extract.pVisusIsoSurface_type(*args)255 def category(*args): return _extract.pVisusIsoSurface_category(*args)256 def drawBoundingBox(*args): return _extract.pVisusIsoSurface_drawBoundingBox(*args)257 def visible(*args): return _extract.pVisusIsoSurface_visible(*args)258 def hasSharedValue(*args): return _extract.pVisusIsoSurface_hasSharedValue(*args)259 def inherit(*args): return _extract.pVisusIsoSurface_inherit(*args)260 def boundingBoxColor(*args): return _extract.pVisusIsoSurface_boundingBoxColor(*args)261 def markAsDirty(*args): return _extract.pVisusIsoSurface_markAsDirty(*args)262 def readClearDirty(*args): return _extract.pVisusIsoSurface_readClearDirty(*args)263 def isDirty(*args): return _extract.pVisusIsoSurface_isDirty(*args)264 def declareParameter(*args): return _extract.pVisusIsoSurface_declareParameter(*args)265 def propagateUpwards(*args): return _extract.pVisusIsoSurface_propagateUpwards(*args)266 def propagateDownwards(*args): return _extract.pVisusIsoSurface_propagateDownwards(*args)267 def getValue(*args): return _extract.pVisusIsoSurface_getValue(*args)268 def setValue(*args): return _extract.pVisusIsoSurface_setValue(*args)269 def accumulate2D(*args): return _extract.pVisusIsoSurface_accumulate2D(*args)270 def accumulate3D(*args): return _extract.pVisusIsoSurface_accumulate3D(*args)271 def mapToWorldBox(*args): return _extract.pVisusIsoSurface_mapToWorldBox(*args)272 def scale(*args): return _extract.pVisusIsoSurface_scale(*args)273 def freeze(*args): return _extract.pVisusIsoSurface_freeze(*args)274 def unfreeze(*args): return _extract.pVisusIsoSurface_unfreeze(*args)275 def frozen(*args): return _extract.pVisusIsoSurface_frozen(*args)276 def display(*args): return _extract.pVisusIsoSurface_display(*args)277 def validateXML(*args): return _extract.pVisusIsoSurface_validateXML(*args)278 def synchronize(*args): return _extract.pVisusIsoSurface_synchronize(*args)279 def connect(*args): return _extract.pVisusIsoSurface_connect(*args)280 def loadData(*args): return _extract.pVisusIsoSurface_loadData(*args)281 def isConnected(*args): return _extract.pVisusIsoSurface_isConnected(*args)282 def product(*args): return _extract.pVisusIsoSurface_product(*args)283 def produce(*args): return _extract.pVisusIsoSurface_produce(*args)284 def readLockProduct(*args): return _extract.pVisusIsoSurface_readLockProduct(*args)285 def unlockProduct(*args): return _extract.pVisusIsoSurface_unlockProduct(*args)286 def interrupt(*args): return _extract.pVisusIsoSurface_interrupt(*args)287 def id(*args): return _extract.pVisusIsoSurface_id(*args)288 __swig_getmethods__["sUpdateInterval"] = _extract.pVisusIsoSurface_sUpdateInterval_get289 if _newclass:sUpdateInterval = _swig_property(_extract.pVisusIsoSurface_sUpdateInterval_get)290 def status(*args): return _extract.pVisusIsoSurface_status(*args)291 def idle(*args): return _extract.pVisusIsoSurface_idle(*args)292pVisusIsoSurface_swigregister = _extract.pVisusIsoSurface_swigregister293pVisusIsoSurface_swigregister(pVisusIsoSurface)294CIS_ISO_DATA = _extract.CIS_ISO_DATA295CIS_COLOR_DATA = _extract.CIS_COLOR_DATA296class VisusColoredIsoSurface(VisusIsoSurface):297 __swig_setmethods__ = {}298 for _s in [VisusIsoSurface]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))299 __setattr__ = lambda self, name, value: _swig_setattr(self, VisusColoredIsoSurface, name, value)300 __swig_getmethods__ = {}301 for _s in [VisusIsoSurface]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))302 __getattr__ = lambda self, name: _swig_getattr(self, VisusColoredIsoSurface, name)303 def __init__(self): raise AttributeError, "No constructor defined"304 __repr__ = _swig_repr305 def connectColor(*args): return _extract.VisusColoredIsoSurface_connectColor(*args)306 def checkData(*args): return _extract.VisusColoredIsoSurface_checkData(*args)307 __swig_getmethods__["construct"] = lambda x: _extract.VisusColoredIsoSurface_construct308 if _newclass:construct = staticmethod(_extract.VisusColoredIsoSurface_construct)309 def nodeType(*args): return _extract.VisusColoredIsoSurface_nodeType(*args)310VisusColoredIsoSurface_swigregister = _extract.VisusColoredIsoSurface_swigregister311VisusColoredIsoSurface_swigregister(VisusColoredIsoSurface)312VisusColoredIsoSurface_construct = _extract.VisusColoredIsoSurface_construct313class pVisusColoredIsoSurface(_object):314 __swig_setmethods__ = {}315 __setattr__ = lambda self, name, value: _swig_setattr(self, pVisusColoredIsoSurface, name, value)316 __swig_getmethods__ = {}317 __getattr__ = lambda self, name: _swig_getattr(self, pVisusColoredIsoSurface, name)318 def __init__(self): raise AttributeError, "No constructor defined"319 __repr__ = _swig_repr320 __swig_destroy__ = _extract.delete_pVisusColoredIsoSurface321 __del__ = lambda self : None;322 def __eq__(*args): return _extract.pVisusColoredIsoSurface___eq__(*args)323 def __ne__(*args): return _extract.pVisusColoredIsoSurface___ne__(*args)324 def __ref__(*args): return _extract.pVisusColoredIsoSurface___ref__(*args)325 def __deref__(*args): return _extract.pVisusColoredIsoSurface___deref__(*args)326 def getString(*args): return _extract.pVisusColoredIsoSurface_getString(*args)327 def isEmpty(*args): return _extract.pVisusColoredIsoSurface_isEmpty(*args)328 def assign(*args): return _extract.pVisusColoredIsoSurface_assign(*args)329 def connectColor(*args): return _extract.pVisusColoredIsoSurface_connectColor(*args)330 def checkData(*args): return _extract.pVisusColoredIsoSurface_checkData(*args)331 def construct(*args): return _extract.pVisusColoredIsoSurface_construct(*args)332 def nodeType(*args): return _extract.pVisusColoredIsoSurface_nodeType(*args)333 def translationStyle(*args): return _extract.pVisusColoredIsoSurface_translationStyle(*args)334 def rotate(*args): return _extract.pVisusColoredIsoSurface_rotate(*args)335 def translate(*args): return _extract.pVisusColoredIsoSurface_translate(*args)336 def translateRequest(*args): return _extract.pVisusColoredIsoSurface_translateRequest(*args)337 def connectIso(*args): return _extract.pVisusColoredIsoSurface_connectIso(*args)338 def checkParameters(*args): return _extract.pVisusColoredIsoSurface_checkParameters(*args)339 def process(*args): return _extract.pVisusColoredIsoSurface_process(*args)340 def displayBoundingBox(*args): return _extract.pVisusColoredIsoSurface_displayBoundingBox(*args)341 def processingMode(*args): return _extract.pVisusColoredIsoSurface_processingMode(*args)342 def processThreadless(*args): return _extract.pVisusColoredIsoSurface_processThreadless(*args)343 def latestRequest(*args): return _extract.pVisusColoredIsoSurface_latestRequest(*args)344 __swig_setmethods__["XML_TAG"] = _extract.pVisusColoredIsoSurface_XML_TAG_set345 __swig_getmethods__["XML_TAG"] = _extract.pVisusColoredIsoSurface_XML_TAG_get346 if _newclass:XML_TAG = _swig_property(_extract.pVisusColoredIsoSurface_XML_TAG_get, _extract.pVisusColoredIsoSurface_XML_TAG_set)347 __swig_getmethods__["sNumTypes"] = _extract.pVisusColoredIsoSurface_sNumTypes_get348 if _newclass:sNumTypes = _swig_property(_extract.pVisusColoredIsoSurface_sNumTypes_get)349 def numTypes(*args): return _extract.pVisusColoredIsoSurface_numTypes(*args)350 def locked(*args): return _extract.pVisusColoredIsoSurface_locked(*args)351 def lockToRead(*args): return _extract.pVisusColoredIsoSurface_lockToRead(*args)352 def unlockAfterRead(*args): return _extract.pVisusColoredIsoSurface_unlockAfterRead(*args)353 def lockToWrite(*args): return _extract.pVisusColoredIsoSurface_lockToWrite(*args)354 def unlockAfterWrite(*args): return _extract.pVisusColoredIsoSurface_unlockAfterWrite(*args)355 __swig_setmethods__["sRenderMode"] = _extract.pVisusColoredIsoSurface_sRenderMode_set356 __swig_getmethods__["sRenderMode"] = _extract.pVisusColoredIsoSurface_sRenderMode_get357 if _newclass:sRenderMode = _swig_property(_extract.pVisusColoredIsoSurface_sRenderMode_get, _extract.pVisusColoredIsoSurface_sRenderMode_set)358 def __and__(*args): return _extract.pVisusColoredIsoSurface___and__(*args)359 def infoString(*args): return _extract.pVisusColoredIsoSurface_infoString(*args)360 def self(*args): return _extract.pVisusColoredIsoSurface_self(*args)361 def parent(*args): return _extract.pVisusColoredIsoSurface_parent(*args)362 def nrOfChildren(*args): return _extract.pVisusColoredIsoSurface_nrOfChildren(*args)363 def child(*args): return _extract.pVisusColoredIsoSurface_child(*args)364 def getChildIndex(*args): return _extract.pVisusColoredIsoSurface_getChildIndex(*args)365 def attachSubTree(*args): return _extract.pVisusColoredIsoSurface_attachSubTree(*args)366 def detachSubTree(*args): return _extract.pVisusColoredIsoSurface_detachSubTree(*args)367 def destroySubTree(*args): return _extract.pVisusColoredIsoSurface_destroySubTree(*args)368 def nextNode(*args): return _extract.pVisusColoredIsoSurface_nextNode(*args)369 def screenShot(*args): return _extract.pVisusColoredIsoSurface_screenShot(*args)370 def type(*args): return _extract.pVisusColoredIsoSurface_type(*args)371 def category(*args): return _extract.pVisusColoredIsoSurface_category(*args)372 def drawBoundingBox(*args): return _extract.pVisusColoredIsoSurface_drawBoundingBox(*args)373 def visible(*args): return _extract.pVisusColoredIsoSurface_visible(*args)374 def hasSharedValue(*args): return _extract.pVisusColoredIsoSurface_hasSharedValue(*args)375 def inherit(*args): return _extract.pVisusColoredIsoSurface_inherit(*args)376 def boundingBoxColor(*args): return _extract.pVisusColoredIsoSurface_boundingBoxColor(*args)377 def markAsDirty(*args): return _extract.pVisusColoredIsoSurface_markAsDirty(*args)378 def readClearDirty(*args): return _extract.pVisusColoredIsoSurface_readClearDirty(*args)379 def isDirty(*args): return _extract.pVisusColoredIsoSurface_isDirty(*args)380 def declareParameter(*args): return _extract.pVisusColoredIsoSurface_declareParameter(*args)381 def propagateUpwards(*args): return _extract.pVisusColoredIsoSurface_propagateUpwards(*args)382 def propagateDownwards(*args): return _extract.pVisusColoredIsoSurface_propagateDownwards(*args)383 def getValue(*args): return _extract.pVisusColoredIsoSurface_getValue(*args)384 def setValue(*args): return _extract.pVisusColoredIsoSurface_setValue(*args)385 def accumulate2D(*args): return _extract.pVisusColoredIsoSurface_accumulate2D(*args)386 def accumulate3D(*args): return _extract.pVisusColoredIsoSurface_accumulate3D(*args)387 def mapToWorldBox(*args): return _extract.pVisusColoredIsoSurface_mapToWorldBox(*args)388 def scale(*args): return _extract.pVisusColoredIsoSurface_scale(*args)389 def freeze(*args): return _extract.pVisusColoredIsoSurface_freeze(*args)390 def unfreeze(*args): return _extract.pVisusColoredIsoSurface_unfreeze(*args)391 def frozen(*args): return _extract.pVisusColoredIsoSurface_frozen(*args)392 def display(*args): return _extract.pVisusColoredIsoSurface_display(*args)393 def validateXML(*args): return _extract.pVisusColoredIsoSurface_validateXML(*args)394 def synchronize(*args): return _extract.pVisusColoredIsoSurface_synchronize(*args)395 def connect(*args): return _extract.pVisusColoredIsoSurface_connect(*args)396 def loadData(*args): return _extract.pVisusColoredIsoSurface_loadData(*args)397 def isConnected(*args): return _extract.pVisusColoredIsoSurface_isConnected(*args)398 def product(*args): return _extract.pVisusColoredIsoSurface_product(*args)399 def produce(*args): return _extract.pVisusColoredIsoSurface_produce(*args)400 def readLockProduct(*args): return _extract.pVisusColoredIsoSurface_readLockProduct(*args)401 def unlockProduct(*args): return _extract.pVisusColoredIsoSurface_unlockProduct(*args)402 def interrupt(*args): return _extract.pVisusColoredIsoSurface_interrupt(*args)403 def id(*args): return _extract.pVisusColoredIsoSurface_id(*args)404 __swig_getmethods__["sUpdateInterval"] = _extract.pVisusColoredIsoSurface_sUpdateInterval_get405 if _newclass:sUpdateInterval = _swig_property(_extract.pVisusColoredIsoSurface_sUpdateInterval_get)406 def status(*args): return _extract.pVisusColoredIsoSurface_status(*args)407 def idle(*args): return _extract.pVisusColoredIsoSurface_idle(*args)408pVisusColoredIsoSurface_swigregister = _extract.pVisusColoredIsoSurface_swigregister409pVisusColoredIsoSurface_swigregister(pVisusColoredIsoSurface)410class VisusProjector(_object):411 __swig_setmethods__ = {}412 __setattr__ = lambda self, name, value: _swig_setattr(self, VisusProjector, name, value)413 __swig_getmethods__ = {}414 __getattr__ = lambda self, name: _swig_getattr(self, VisusProjector, name)415 def __init__(self): raise AttributeError, "No constructor defined"416 __repr__ = _swig_repr417 def checkParameters(*args): return _extract.VisusProjector_checkParameters(*args)418 def checkData(*args): return _extract.VisusProjector_checkData(*args)419 def process(*args): return _extract.VisusProjector_process(*args)420 def projection(*args): return _extract.VisusProjector_projection(*args)421 def connectInput(*args): return _extract.VisusProjector_connectInput(*args)422 __swig_getmethods__["construct"] = lambda x: _extract.VisusProjector_construct423 if _newclass:construct = staticmethod(_extract.VisusProjector_construct)424 def nodeType(*args): return _extract.VisusProjector_nodeType(*args)425VisusProjector_swigregister = _extract.VisusProjector_swigregister426VisusProjector_swigregister(VisusProjector)427VisusProjector_construct = _extract.VisusProjector_construct428class pVisusProjector(_object):429 __swig_setmethods__ = {}430 __setattr__ = lambda self, name, value: _swig_setattr(self, pVisusProjector, name, value)431 __swig_getmethods__ = {}432 __getattr__ = lambda self, name: _swig_getattr(self, pVisusProjector, name)433 def __init__(self): raise AttributeError, "No constructor defined"434 __repr__ = _swig_repr435 __swig_destroy__ = _extract.delete_pVisusProjector436 __del__ = lambda self : None;437 def __eq__(*args): return _extract.pVisusProjector___eq__(*args)438 def __ne__(*args): return _extract.pVisusProjector___ne__(*args)439 def __ref__(*args): return _extract.pVisusProjector___ref__(*args)440 def __deref__(*args): return _extract.pVisusProjector___deref__(*args)441 def getString(*args): return _extract.pVisusProjector_getString(*args)442 def isEmpty(*args): return _extract.pVisusProjector_isEmpty(*args)443 def assign(*args): return _extract.pVisusProjector_assign(*args)444 def checkParameters(*args): return _extract.pVisusProjector_checkParameters(*args)445 def checkData(*args): return _extract.pVisusProjector_checkData(*args)446 def process(*args): return _extract.pVisusProjector_process(*args)447 def projection(*args): return _extract.pVisusProjector_projection(*args)448 def connectInput(*args): return _extract.pVisusProjector_connectInput(*args)449 def construct(*args): return _extract.pVisusProjector_construct(*args)450 def nodeType(*args): return _extract.pVisusProjector_nodeType(*args)451 def processingMode(*args): return _extract.pVisusProjector_processingMode(*args)452 def processThreadless(*args): return _extract.pVisusProjector_processThreadless(*args)453 def latestRequest(*args): return _extract.pVisusProjector_latestRequest(*args)454 __swig_setmethods__["XML_TAG"] = _extract.pVisusProjector_XML_TAG_set455 __swig_getmethods__["XML_TAG"] = _extract.pVisusProjector_XML_TAG_get456 if _newclass:XML_TAG = _swig_property(_extract.pVisusProjector_XML_TAG_get, _extract.pVisusProjector_XML_TAG_set)457 __swig_getmethods__["sNumTypes"] = _extract.pVisusProjector_sNumTypes_get458 if _newclass:sNumTypes = _swig_property(_extract.pVisusProjector_sNumTypes_get)459 def numTypes(*args): return _extract.pVisusProjector_numTypes(*args)460 def locked(*args): return _extract.pVisusProjector_locked(*args)461 def lockToRead(*args): return _extract.pVisusProjector_lockToRead(*args)462 def unlockAfterRead(*args): return _extract.pVisusProjector_unlockAfterRead(*args)463 def lockToWrite(*args): return _extract.pVisusProjector_lockToWrite(*args)464 def unlockAfterWrite(*args): return _extract.pVisusProjector_unlockAfterWrite(*args)465 __swig_setmethods__["sRenderMode"] = _extract.pVisusProjector_sRenderMode_set466 __swig_getmethods__["sRenderMode"] = _extract.pVisusProjector_sRenderMode_get467 if _newclass:sRenderMode = _swig_property(_extract.pVisusProjector_sRenderMode_get, _extract.pVisusProjector_sRenderMode_set)468 def __and__(*args): return _extract.pVisusProjector___and__(*args)469 def infoString(*args): return _extract.pVisusProjector_infoString(*args)470 def self(*args): return _extract.pVisusProjector_self(*args)471 def parent(*args): return _extract.pVisusProjector_parent(*args)472 def nrOfChildren(*args): return _extract.pVisusProjector_nrOfChildren(*args)473 def child(*args): return _extract.pVisusProjector_child(*args)474 def getChildIndex(*args): return _extract.pVisusProjector_getChildIndex(*args)475 def attachSubTree(*args): return _extract.pVisusProjector_attachSubTree(*args)476 def detachSubTree(*args): return _extract.pVisusProjector_detachSubTree(*args)477 def destroySubTree(*args): return _extract.pVisusProjector_destroySubTree(*args)478 def nextNode(*args): return _extract.pVisusProjector_nextNode(*args)479 def screenShot(*args): return _extract.pVisusProjector_screenShot(*args)480 def type(*args): return _extract.pVisusProjector_type(*args)481 def category(*args): return _extract.pVisusProjector_category(*args)482 def drawBoundingBox(*args): return _extract.pVisusProjector_drawBoundingBox(*args)483 def visible(*args): return _extract.pVisusProjector_visible(*args)484 def hasSharedValue(*args): return _extract.pVisusProjector_hasSharedValue(*args)485 def inherit(*args): return _extract.pVisusProjector_inherit(*args)486 def boundingBoxColor(*args): return _extract.pVisusProjector_boundingBoxColor(*args)487 def markAsDirty(*args): return _extract.pVisusProjector_markAsDirty(*args)488 def readClearDirty(*args): return _extract.pVisusProjector_readClearDirty(*args)489 def isDirty(*args): return _extract.pVisusProjector_isDirty(*args)490 def declareParameter(*args): return _extract.pVisusProjector_declareParameter(*args)491 def propagateUpwards(*args): return _extract.pVisusProjector_propagateUpwards(*args)492 def propagateDownwards(*args): return _extract.pVisusProjector_propagateDownwards(*args)493 def getValue(*args): return _extract.pVisusProjector_getValue(*args)494 def setValue(*args): return _extract.pVisusProjector_setValue(*args)495 def accumulate2D(*args): return _extract.pVisusProjector_accumulate2D(*args)496 def accumulate3D(*args): return _extract.pVisusProjector_accumulate3D(*args)497 def mapToWorldBox(*args): return _extract.pVisusProjector_mapToWorldBox(*args)498 def rotate(*args): return _extract.pVisusProjector_rotate(*args)499 def translate(*args): return _extract.pVisusProjector_translate(*args)500 def scale(*args): return _extract.pVisusProjector_scale(*args)501 def freeze(*args): return _extract.pVisusProjector_freeze(*args)502 def unfreeze(*args): return _extract.pVisusProjector_unfreeze(*args)503 def frozen(*args): return _extract.pVisusProjector_frozen(*args)504 def display(*args): return _extract.pVisusProjector_display(*args)505 def displayBoundingBox(*args): return _extract.pVisusProjector_displayBoundingBox(*args)506 def validateXML(*args): return _extract.pVisusProjector_validateXML(*args)507 def synchronize(*args): return _extract.pVisusProjector_synchronize(*args)508 def connect(*args): return _extract.pVisusProjector_connect(*args)509 def loadData(*args): return _extract.pVisusProjector_loadData(*args)510 def isConnected(*args): return _extract.pVisusProjector_isConnected(*args)511 def product(*args): return _extract.pVisusProjector_product(*args)512 def produce(*args): return _extract.pVisusProjector_produce(*args)513 def readLockProduct(*args): return _extract.pVisusProjector_readLockProduct(*args)514 def unlockProduct(*args): return _extract.pVisusProjector_unlockProduct(*args)515 def interrupt(*args): return _extract.pVisusProjector_interrupt(*args)516 def id(*args): return _extract.pVisusProjector_id(*args)517 __swig_getmethods__["sUpdateInterval"] = _extract.pVisusProjector_sUpdateInterval_get518 if _newclass:sUpdateInterval = _swig_property(_extract.pVisusProjector_sUpdateInterval_get)519 def status(*args): return _extract.pVisusProjector_status(*args)520 def idle(*args): return _extract.pVisusProjector_idle(*args)521pVisusProjector_swigregister = _extract.pVisusProjector_swigregister...

Full Screen

Full Screen

showSOS.py

Source:showSOS.py Github

copy

Full Screen

1#!/usr/bin/env python32while(1):3 try:4 from utils.sys_utils import no_terminate5 except KeyboardInterrupt:6 continue7 else:8 break9import sys10import re11import os12from os import get_terminal_size13from datetime import datetime14from time import sleep15try:16 from utils.Wrappers import wrap17except Exception as Except:18 print(str(Except))19 sys.exit(1)20from utils.sys_utils import clear21from utils.sys_utils import bell22from modules.UI import argprogrammer23from modules.UI import iInput24from conf import global_conf25def _detect_time(_extract, time_, hours, minutes, seconds, microseconds):26 27 _time_formated = '{}:{}:{}.{}'.format(_extract.hour, _extract.minute, _extract.second, _extract.microsecond)28 if (_time_formated == time_):29 return(True)30 elif (hours == _extract.hour):31 if (minutes == 0) and (seconds == 0) and (microseconds == 0):32 return(True)33 elif not (minutes == 0) and (seconds == 0) and (microseconds == 0):34 if (minutes == _extract.minute):35 return(True)36 elif not (minutes == 0) and not (seconds == 0) and (microseconds == 0):37 if (minutes == _extract.minute) and (seconds == _extract.second):38 return(True)39 elif not (minutes == 0) and not (seconds == 0) and not (microseconds == 0):40 if (minutes == _extract.minute) and (seconds == _extract.second) and (microseconds == _extract.microsecond):41 return(True)42 elif not (microseconds == 0) and (minutes == 0) and (seconds == 0):43 if (microseconds == _extract.microsecond):44 return(True)45 elif not (seconds == 0) and not (microseconds == 0) and (minutes == 0):46 if (seconds == _extract.second) and (microseconds == _extract.microsecond):47 return(True)48 elif not (seconds == 0) and (microseconds == 0) and (minutes == 0):49 if (seconds == _extract.second):50 return(True)51 elif (minutes == _extract.minute):52 if (seconds == 0) and (microseconds == 0):53 return(True)54 elif not (seconds == 0) and (microseconds == 0):55 if (seconds == _extract.second):56 return(True)57 elif not (seconds == 0) and not (microseconds == 0):58 if (seconds == _extract.second) and (microseconds == _extract.microsecond):59 return(True)60 elif not (microseconds == 0) and (seconds == 0):61 if (microseconds == _extract.microsecond):62 return(True)63 elif (seconds == _extract.second):64 if (microseconds == 0):65 return(True)66 elif (microseconds == _extract.microsecond):67 return(True)68 elif (microseconds == _extract.microsecond):69 return(True)70def _detect_date(_extract, date, year, month, day):71 _date_formated = '{}-{}-{}'.format(_extract.year, _extract.month, _extract.day)72 if (_date_formated == date):73 return(True)74 elif (year == _extract.year):75 if (month == 0) and (day == 0):76 return(True)77 elif not (month == 0) and (day == 0):78 if (month == _extract.month):79 return(True)80 elif (month == 0) and not (day == 0):81 if (day == _extract.day):82 return(True)83 elif (month == _extract.month):84 if (day == 0):85 return(True)86 elif (day == _extract.day):87 return(True)88 elif (day == _extract.day):89 return(True)90index = 091(max_year, max_month, max_day, max_hour, max_minute, max_second, max_microsecond) = (datetime.max.year, datetime.max.month, datetime.max.day, datetime.max.hour, datetime.max.minute, datetime.max.second, datetime.max.microsecond)92optionals = 'Opcionales'93pattern_group = 'Búsqueda'94spec_group = 'Búsqueda especifica'95default_which = 'message'96parser = argprogrammer.Parser()97parser.set_head('''98 Syndicate Project - Enviar mensajes a un Evie99 ----------------- -------------------------''')100parser.set_footer('\n' + ' ' + 'En caso de usar --date y --time, se combinarán los valores y en caso de querer usar valores especificos se usa el "0". Ejemplo: "--time 00:23:00".')101parser.add(['-h', '--help'], 'help', 'Mostrar la ayuda qué estás viendo', group=optionals)102parser.add(['-l', '--limit'], 'limit', 'Limite a mostrar. 0 (Infinito)', default=0, type=int)103parser.add(['-t', '--time'], 'time', f'Buscar por tiempo en vez de patrón. Sintaxis: HH:MM:SS.MSMSMS [MAX: {max_hour}:{max_minute}:{max_second}.{max_microsecond}]', group=spec_group)104parser.add(['-d', '--date'], 'date', f'Busca por fecha en vez de patrón. Sintaxis: AA-MM-DD [MAX: {max_year}-{max_month}-{max_day}]', group=spec_group)105parser.add(['-s', '--search'], 'search', 'El patrón de búsqueda', group=pattern_group)106parser.add(['-which'], 'which', 'Elegir el dato a utilizar en la búsqueda. Los valores permitidos, son: [NICKNAME], [SUBJECT], [MESSAGE]', uniqval=['nickname', 'subject', 'message'], group=pattern_group, default=default_which)107parser.add(['-delete'], 'delete', 'Borrar uno o más mensajes. Separa por \',\' seguido del ID del mensaje para borrar varios a la vez', type=list)108args = parser.parse_args()109limit = args.limit110time_ = args.time111date = args.date112search = args.search113which = args.which114delete = args.delete115if not (delete == None):116 for _ in delete:117 if (wrap.delete(_, agent=wrap.USE_MESSAGE) == True):118 print('Se elimino correctamente: {}'.format(_))119 else:120 print('Error eliminando a: {}'.format(_))121else:122 if not (date == None):123 date = date.split('-')124 if (len(date) > 3):125 print('Error en la sintaxis. No está siguiendo la sintaxis necesario para usar la fecha.')126 sys.exit(1)127 elif (True in [True for x in date if (x.strip() == '')]):128 print('No puede usar campos vacios para representar la fecha. Recuerde qué en caso de no querer usar valores especificos, se usan los ceros o no se escriben.')129 sys.exit(1)130 else:131 (year, month, day) = (date+[None, None])[:3]132 _dat = {'month':month, 'day':day}133 [globals().__setitem__(x, '00') for x in _dat if (_dat[x] == None)]134 for _ in {'year', 'month', 'day'}:135 try:136 globals()[_] = int(globals()[_])137 except ValueError:138 print('{}, No es un tipo de dato correcto'.format(globals()[_]))139 sys.exit(1)140 if (len(str(year)) != 4):141 print('La longitud del año no es la correspondiente.')142 sys.exit(1)143 else:144 if (year > max_year):145 print('EL año se excedió del limite permitido.')146 sys.exit(1)147 if (len(str(month)) > 2):148 print('La longitud del mes no es la correspondiente.')149 sys.exit(1)150 else:151 if (month > max_month):152 print('EL mes se excedió del limite permitido.')153 sys.exit(1)154 if (len(str(day)) > 2):155 print('La longitud del día no es la correspondiente.')156 sys.exit(1)157 else:158 if (day > max_day):159 print('El día se excedió del limite permitido.')160 sys.exit(1)161 date = '%d-%d-%d' % (year, month, day)162 if not (time_ == None):163 time_ = time_.split(':')164 if (len(time_) > 4):165 print('Error en la sintaxis. No está siguiendo la sintaxis necesaria para usar el tiempo.')166 sys.exit(1)167 elif (True in [True for x in time_ if (x.strip() == '')]):168 print('No puede usar campos vacios para representar el tiempo. Recuerde qué en caso de no querer usar valores especificos, se usan los ceros o no se escriben.')169 sys.exit(1)170 else:171 (hours, minutes, seconds) = (time_+[None, None])[:3]172 if (minutes == None):173 minutes = '00'174 if (seconds == None):175 seconds = '00.000000'176 SS_AND_MS = seconds.split('.')[:2]177 seconds = SS_AND_MS[0]178 179 if (len(SS_AND_MS) == 1):180 microseconds = '000000'181 else:182 microseconds = SS_AND_MS[1]183 for _ in {'hours', 'minutes', 'seconds', 'microseconds'}:184 try:185 globals()[_] = int(globals()[_])186 except ValueError:187 print('{}, No es un tipo de dato correcto'.format(globals()[_]))188 sys.exit(1)189 if (len(str(hours)) > 2):190 print('La longitud de la hora no es la correspondiente.')191 sys.exit(1)192 else:193 if (hours > max_hour):194 print('La hora se excedió del limite permitido.')195 sys.exit(1)196 if (len(str(minutes)) > 2):197 print('La longitud de los minutos no es la correspondiente.')198 sys.exit(1)199 else:200 if (minutes > max_minute):201 print('Los minutos se excedieron del limite permitido.')202 sys.exit(1)203 if (len(str(seconds)) > 2):204 print('La longitud de los segundos no es la correspondiente.')205 sys.exit(1)206 else:207 if (seconds > max_second):208 print('Los segundos se excedieron del limite permitido.')209 sys.exit(1)210 if (len(str(microseconds)) > 6):211 print('La longitud de los micro-segundos no es la correspondiente.')212 sys.exit(1)213 else:214 if (microseconds > max_microsecond):215 print('Los micro-segundos se excedieron del limite permitido.')216 sys.exit(1)217 time_ = '%d:%d:%d.%d' % (hours, minutes, seconds, microseconds)218 print('Leyendo mensajes ...')219 sleep(1)220 messages_lst = wrap.getall(wrap.USE_MESSAGE)221 if (len(messages_lst) == 0):222 print('Aún no hay mensajes...')223 sys.exit(0)224 messages = [x for x in messages_lst]225 messages = messages[:limit] if not (limit == 0) else messages226 if not (date == None) or not (time_ == None):227 result = []228 for _ in messages:229 _extract = datetime.fromtimestamp(messages_lst[_]['time'])230 if not (date == None) and not (time_ == None):231 _formated = '{}-{}-{} {}:{}:{}.{}'.format(_extract.year, _extract.month, _extract.day, _extract.hour, _extract.minute, _extract.second, _extract.microsecond)232 if (_formated == '{} {}'.format(date, time_)):233 result.append(_)234 elif (_detect_date(_extract, date, year, month, day) == True) or (_detect_time(_extract, time_, hours, minutes, seconds, microseconds) == True):235 result.append(_)236 elif not (date == None) and (time_ == None):237 if (_detect_date(_extract, date, year, month, day) == True):238 result.append(_)239 elif (date == None) and not (time_ == None):240 if (_detect_time(_extract, time_, hours, minutes, seconds, microseconds) == True):241 result.append(_)242 messages = result243 if not (search == None):244 result = []245 for _ in messages:246 if (which.lower() == 'nickname'):247 if (re.search(search, messages_lst[_]['nickname'], re.IGNORECASE)):248 result.append(_)249 elif (which.lower() == 'subject'):250 if (re.search(search, messages_lst[_]['subject'], re.IGNORECASE)):251 result.append(_)252 elif (which.lower() == 'message'):253 if (re.search(search, messages_lst[_]['message'], re.IGNORECASE)):254 result.append(_)255 messages = result256 if (len(messages) == 0):257 print('¡Sin coincidencias!')258 sys.exit(0)259 while (1):260 (columns, lines) = get_terminal_size()261 clear.clear()262 print()263 wrapper = messages_lst[messages[index]]264 _write = datetime.fromtimestamp(wrapper['time'])265 print('\t\033[1m\033[34mID:\033[0m \033[4m\033[1m\033[37m{}\033[0m'.format(messages[index]))266 print()267 print('\t\t\033[37mDe: \033[1m{}\033[0m'.format(wrapper['nickname']))268 print('\t\t\033[37mSubject: \033[1m{}\033[0m'.format(wrapper['subject']))269 print('\t\t\033[37mFecha y Hora de escritura: \033[1m{}-{}-{} ~ {}:{}:{}.{}\033[0m'.format(_write.year, _write.month, _write.day, _write.hour, _write.minute, _write.second, _write.microsecond))270 print('\t\t\033[37mMensaje:\033[0m')271 for _ in wrapper['message'].splitlines():272 print('\t\t\t\033[1;37m{}\033[0m'.format(_))273 print()274 if (wrapper['profile'] == None):275 print('\t\t\033[1;37mNo se incrustaron archivos...\033[0m')276 else:277 if (os.path.isdir(wrapper['profile'])):278 _files = os.listdir(wrapper['profile'])279 if (len(_files) == 0):280 print('\t\t\033[1;37mNo hay archivos almacenados en "{}"\033[0m'.format(wrapper['profile']))281 else:282 print('\t\t\033[37mIncrustado: \033[1;37m{}: {}\033[0m'.format(wrapper['profile'], ', '.join(_files)))283 else:284 print('\t\tNo existe el directorio de archivos...')285 print()286 print('\033[3mSiguiente (%d/%d) o (Q)uit\033[0m\033[%dB' % (index+1, len(messages), lines-1), end='')287 try:288 key = iInput.iInput(char=' ', char_limit=1)289 except KeyboardInterrupt:290 break291 except Exception as Except:292 clear.clear()293 print('Error desconocido: {}'.format(Except))294 sys.exit(1)295 if (key == 'r'):296 if not (index == len(messages)-1):297 index += 1298 elif (key == 'l'):299 if (index > 0):300 index -= 1301 302 elif (key == 'q'):303 break304 else:305 bell.bell()...

Full Screen

Full Screen

etree.py

Source:etree.py Github

copy

Full Screen

...39 nspace = {'aws': node.nsmap.get(None, '')}40 root = node.find('.//aws:Cart', namespaces=nspace)41 _extract = lambda node, xpath: node.findtext(xpath, namespaces=nspace)42 cart = Cart()43 cart.cart_id = _extract(root, './aws:CartId')44 cart.hmac = _extract(root, './aws:HMAC')45 cart.url = _extract(root, './aws:PurchaseURL')46 def parse_item(item_node):47 item = Item()48 item.item_id = _extract(item_node, './aws:CartItemId')49 item.asin = _extract(item_node, './aws:ASIN')50 item.seller = _extract(item_node, './aws:SellerNickname')51 item.quantity = int(_extract(item_node, './aws:Quantity'))52 item.title = _extract(item_node, './aws:Title')53 item.product_group = _extract(item_node, './aws:ProductGroup')54 item.price = (55 int(_extract(item_node, './aws:Price/aws:Amount')),56 _extract(item_node, './aws:Price/aws:CurrencyCode'))57 item.total = (58 int(_extract(item_node, './aws:ItemTotal/aws:Amount')),59 _extract(item_node, './aws:ItemTotal/aws:CurrencyCode'))60 return item61 try:62 for item_node in root.findall('./aws:CartItems/aws:CartItem', namespaces=nspace):63 cart.items.append(parse_item(item_node))64 cart.subtotal = (node.SubTotal.Amount, node.SubTotal.CurrencyCode)65 except AttributeError:66 cart.subtotal = (None, None)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run assertpy automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful