rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
del self.old._v_is_cp
del self.new._v_is_cp
def migrate_references(self): """Migrate references annotation.""" # Restor the references annotation if hasattr(self, REFERENCE_ANNOTATION): at_references = getattr(self, REFERENCE_ANNOTATION) setattr(self.new, REFERENCE_ANNOTATION, at_references) # Run the reference manage_afterAdd to transition all copied # referenc...
def get_ole_storages(filename): STORAGES = {}
def get_ole_streams(filename): STREAMS = {}
def get_ole_storages(filename): STORAGES = {} doc = file(filename, 'rb').read() header, data = doc[0:512], doc[512:] del doc doc_magic = header[0:8] file_uid = header[8:24] rev_num = header[24:26] ver_num = header[26:28] byte_order = header[28:30] log_se...
STORAGES[name] = stream_data
STREAMS[name] = stream_data
def get_ole_storages(filename): STORAGES = {} doc = file(filename, 'rb').read() header, data = doc[0:512], doc[512:] del doc doc_magic = header[0:8] file_uid = header[8:24] rev_num = header[24:26] ver_num = header[26:28] byte_order = header[28:30] log_se...
return STORAGES
return STREAMS
def get_ole_storages(filename): STORAGES = {} doc = file(filename, 'rb').read() header, data = doc[0:512], doc[512:] del doc doc_magic = header[0:8] file_uid = header[8:24] rev_num = header[24:26] ver_num = header[26:28] byte_order = header[28:30] log_se...
rlib_add_datasource_postgre = _rlib.rlib_add_datasource_postgre
rlib_add_datasource_postgres = _rlib.rlib_add_datasource_postgres
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_set_database_encoding = _librlib.rlib_set_database_encoding
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_set_parameter_encoding = _librlib.rlib_set_parameter_encoding rlib_set_encodings = _librlib.rlib_set_encodings
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_init = _librlib.rlib_init
rlib_init = _rlib.rlib_init
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_datasource_mysql = _librlib.rlib_add_datasource_mysql
rlib_add_datasource_mysql = _rlib.rlib_add_datasource_mysql
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_datasource_postgre = _librlib.rlib_add_datasource_postgre
rlib_add_datasource_postgre = _rlib.rlib_add_datasource_postgre
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_datasource_odbc = _librlib.rlib_add_datasource_odbc
rlib_add_datasource_odbc = _rlib.rlib_add_datasource_odbc
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_datasource_xml = _librlib.rlib_add_datasource_xml
rlib_add_datasource_xml = _rlib.rlib_add_datasource_xml
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_query_as = _librlib.rlib_add_query_as
rlib_add_query_as = _rlib.rlib_add_query_as
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_report = _librlib.rlib_add_report
rlib_add_report = _rlib.rlib_add_report
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_report_from_buffer = _librlib.rlib_add_report_from_buffer
rlib_add_report_from_buffer = _rlib.rlib_add_report_from_buffer
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_execute = _librlib.rlib_execute
rlib_execute = _rlib.rlib_execute
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_get_content_type_as_text = _librlib.rlib_get_content_type_as_text
rlib_get_content_type_as_text = _rlib.rlib_get_content_type_as_text
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_spool = _librlib.rlib_spool
rlib_spool = _rlib.rlib_spool
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_set_output_format = _librlib.rlib_set_output_format
rlib_set_output_format = _rlib.rlib_set_output_format
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_resultset_follower_n_to_1 = _librlib.rlib_add_resultset_follower_n_to_1
rlib_add_resultset_follower_n_to_1 = _rlib.rlib_add_resultset_follower_n_to_1
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_resultset_follower = _librlib.rlib_add_resultset_follower
rlib_add_resultset_follower = _rlib.rlib_add_resultset_follower
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_set_output_format_from_text = _librlib.rlib_set_output_format_from_text
rlib_set_output_format_from_text = _rlib.rlib_set_output_format_from_text
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_get_output = _librlib.rlib_get_output
rlib_get_output = _rlib.rlib_get_output
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_get_output_length = _librlib.rlib_get_output_length
rlib_get_output_length = _rlib.rlib_get_output_length
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_signal_connect = _librlib.rlib_signal_connect
rlib_signal_connect = _rlib.rlib_signal_connect
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_signal_connect_string = _librlib.rlib_signal_connect_string
rlib_signal_connect_string = _rlib.rlib_signal_connect_string
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_query_refresh = _librlib.rlib_query_refresh
rlib_query_refresh = _rlib.rlib_query_refresh
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_add_parameter = _librlib.rlib_add_parameter
rlib_add_parameter = _rlib.rlib_add_parameter
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_set_locale = _librlib.rlib_set_locale
rlib_set_locale = _rlib.rlib_set_locale
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_set_output_parameter = _librlib.rlib_set_output_parameter
rlib_set_output_parameter = _rlib.rlib_set_output_parameter
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_set_output_encoding = _librlib.rlib_set_output_encoding
rlib_set_output_encoding = _rlib.rlib_set_output_encoding
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_set_datasource_encoding = _librlib.rlib_set_datasource_encoding
rlib_set_datasource_encoding = _rlib.rlib_set_datasource_encoding
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_free = _librlib.rlib_free
rlib_free = _rlib.rlib_free
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_version = _librlib.rlib_version
rlib_version = _rlib.rlib_version
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_graph_add_bg_region = _librlib.rlib_graph_add_bg_region
rlib_graph_add_bg_region = _rlib.rlib_graph_add_bg_region
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
rlib_graph_clear_bg_region = _librlib.rlib_graph_clear_bg_region
rlib_graph_clear_bg_region = _rlib.rlib_graph_clear_bg_region
def _swig_getattr(self,class_type,name): method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError,name
if aSystemFullID[SYSTEMPATH] == '/':
if aSystemFullID[SYSTEMPATH] == '':
def createSystemPathFromFullID( aSystemFullID ): if aSystemFullID[SYSTEMPATH] == '/': if aSystemFullID[ID] == '/': aNewSystemPath = '/' else: aNewSystemPath = '/' + aSystemFullID[ID] else: aNewSystemPath = aSystemFullID[SYSTEMPATH] + '/' +\ aSystemFullID[ID] return aNewSystemPath
else: aNewSystemPath = '/' + aSystemFullID[ID]
elif aSystemFullID[SYSTEMPATH] == '/': aNewSystemPath = aSystemFullID[SYSTEMPATH] + aSystemFullID[ID]
def createSystemPathFromFullID( aSystemFullID ): if aSystemFullID[SYSTEMPATH] == '/': if aSystemFullID[ID] == '/': aNewSystemPath = '/' else: aNewSystemPath = '/' + aSystemFullID[ID] else: aNewSystemPath = aSystemFullID[SYSTEMPATH] + '/' +\ aSystemFullID[ID] return aNewSystemPath
aNewSystemPath = aSystemFullID[SYSTEMPATH] + '/' +\ aSystemFullID[ID]
aNewSystemPath = aSystemFullID[SYSTEMPATH] + '/' + aSystemFullID[ID]
def createSystemPathFromFullID( aSystemFullID ): if aSystemFullID[SYSTEMPATH] == '/': if aSystemFullID[ID] == '/': aNewSystemPath = '/' else: aNewSystemPath = '/' + aSystemFullID[ID] else: aNewSystemPath = aSystemFullID[SYSTEMPATH] + '/' +\ aSystemFullID[ID] return aNewSystemPath
systemfullid3 = createFullID( 'System:/:/' )
systemfullid3 = createFullID( 'System::/' )
def createSystemPathFromFullID( aSystemFullID ): if aSystemFullID[SYSTEMPATH] == '/': if aSystemFullID[ID] == '/': aNewSystemPath = '/' else: aNewSystemPath = '/' + aSystemFullID[ID] else: aNewSystemPath = aSystemFullID[SYSTEMPATH] + '/' +\ aSystemFullID[ID] return aNewSystemPath
self.thePluginManager.printMessage( "%s: not numerical data\n" % aFullPNString )
aMessage = "Error: (%s) is not numerical data" %aFullPNString self.thePluginManager.printMessage( aMessage ) aDialog = ConfirmWindow(0,aMessage,'Error!')
def __init__( self, dirname, data, pluginmanager, root=None ):
self.addPopupMenu(0,1,0)
def __init__( self, dirname, data, pluginmanager, root=None ):
self.LoggerDataList.append( aLoggerStub.getDataWithStartEndInterval(self.StartTime, aEndTime, 1) )
if self.StartTime < aEndTime: self.LoggerDataList.append( aLoggerStub.getDataWithStartEndInterval(self.StartTime, aEndTime, 1) ) else: aValue = self.theSession.theSimulator.getEntityProperty( createFullPNString(self.theFullPN()) ) self.theFirstLog = [[self.StartTime,aValue,aValue,aValue,aValue]] self.LoggerDataList.app...
def updateLoggerDataList(self): self.LoggerDataList =[] for aLogger in self.theLoggerList: aLoggerStub = LoggerStub( self.theSession.theSimulator, aLogger ) aEndTime = aLoggerStub.getEndTime() self.LoggerDataList.append( aLoggerStub.getDataWithStartEndInterval(self.StartTime, aEndTime, 1) )
self.FullDataList.append( array(LoggerData) )
if LoggerData != self.theFirstLog: self.FullDataList.append( array(LoggerData) )
def updateFullDataList( self ): num = 0 FullDataList_prev = self.FullDataList self.FullDataList = [] for LoggerData in self.LoggerDataList: if len(FullDataList_prev) > num : self.FullDataList.append( concatenate( (FullDataList_prev[num], array( LoggerData )))) if num >= len(FullDataList_prev): self.FullDataList.append(...
if self.LoggerDataList[0] == (): pass else: self.updateFullDataList() self.xList = [] self.yList = [] if self.xaxis == None or self.xaxis == 'time': if self.yaxis == None: for num in range(len(self.LoggerDataList)): self.xList.append(self.FullDataList[num][:,0]) self.yList.append(self.FullDataList[num][:,1]) else: num...
try: if self.LoggerDataList[0] == (): pass else: self.updateFullDataList() self.xList = [] self.yList = [] if self.xaxis == None or self.xaxis == 'time': if self.yaxis == None: for num in range(len(self.LoggerDataList)): self.xList.append(self.FullDataList[num][:,0]) self.yList.append(self.FullDataList[num][:,1]) els...
def update( self ): if self.arg % 10 == 5: theStateList = self.setStateList() self.updateLoggerDataList() if self.LoggerDataList[0] == (): pass else: self.updateFullDataList() self.xList = [] self.yList = [] if self.xaxis == None or self.xaxis == 'time': if self.yaxis == None: for num in range(len(self.LoggerDataList)...
else: if self.yaxis == None: for num in range(len(self.LoggerDataList)): try : self.xList.append ( eval(self.xaxis, self.entry)[:,1] ) except NameError: self.theSession.printMessage( "name '%s' is not defined \n" % self.xaxis ) self["entry1"].set_text ('time') self.changexaxis( self["entry1"] ) self.xList.append(self.F...
def update( self ): if self.arg % 10 == 5: theStateList = self.setStateList() self.updateLoggerDataList() if self.LoggerDataList[0] == (): pass else: self.updateFullDataList() self.xList = [] self.yList = [] if self.xaxis == None or self.xaxis == 'time': if self.yaxis == None: for num in range(len(self.LoggerDataList)...
num = 2 for yaxis in self.yaxis: if yaxis == '': self.xList.append (['None']) self.yList.append (['None']) else: try: self.xList.append( eval(self.xaxis, self.entry)[:,1])
if self.yaxis == None: for num in range(len(self.LoggerDataList)): try : self.xList.append ( eval(self.xaxis, self.entry)[:,1] )
def update( self ): if self.arg % 10 == 5: theStateList = self.setStateList() self.updateLoggerDataList() if self.LoggerDataList[0] == (): pass else: self.updateFullDataList() self.xList = [] self.yList = [] if self.xaxis == None or self.xaxis == 'time': if self.yaxis == None: for num in range(len(self.LoggerDataList)...
self.changexaxis( self["entry1"] ) self.xList.append(self.FullDataList[0][:,0]) try: self.yList.append( eval(yaxis, self.entry)[:,1]) except NameError: self.theSession.printMessage( "name '%s' is not defined \n" % yaxis ) self["entry%i"%num].set_text ('') self.changeyaxis( self["entry%i"%num] ) self.yList.append(['Non...
self.changexaxis( self["entry1"] ) self.xList.append(self.FullDataList[0][:,0]) self.yList.append ( self.FullDataList[num][:,1] ) else: num = 2 for yaxis in self.yaxis: if yaxis == '': self.xList.append (['None']) self.yList.append (['None']) else: try: self.xList.append( eval(self.xaxis, self.entry)[:,1]) except NameE...
def update( self ): if self.arg % 10 == 5: theStateList = self.setStateList() self.updateLoggerDataList() if self.LoggerDataList[0] == (): pass else: self.updateFullDataList() self.xList = [] self.yList = [] if self.xaxis == None or self.xaxis == 'time': if self.yaxis == None: for num in range(len(self.LoggerDataList)...
self.theDataList[num].set_points( None, None ) else: if self.scale == "log": if min(array(LoggerData)[:,1]) <= 0:
self.theDataList[num].set_points(None,None) elif yaxis == '': self.theDataList[num].set_points(None,None) else : if self.scale == 'log': if min(array(LoggerData)[:,1] ) <= 0:
def update( self ): if self.arg % 10 == 5: theStateList = self.setStateList() self.updateLoggerDataList() if self.LoggerDataList[0] == (): pass else: self.updateFullDataList() self.xList = [] self.yList = [] if self.xaxis == None or self.xaxis == 'time': if self.yaxis == None: for num in range(len(self.LoggerDataList)...
self.scale = "linear" self.theDataList[num].set_points( self.xList[num], self.yList[num] ) num += 1 else: num = 0 for yaxis in self.yaxis: if theStateList[num] == 1: self.theDataList[num].set_points(None,None) elif yaxis == '': self.theDataList[num].set_points(None,None) else : if self.scale == 'log': if min(array(Log...
self.scale = 'linear' self.theDataList[num].set_points(self.xList[num],self.yList[num]) num += 1 except: pass
def update( self ): if self.arg % 10 == 5: theStateList = self.setStateList() self.updateLoggerDataList() if self.LoggerDataList[0] == (): pass else: self.updateFullDataList() self.xList = [] self.yList = [] if self.xaxis == None or self.xaxis == 'time': if self.yaxis == None: for num in range(len(self.LoggerDataList)...
if( self.theSession == None ):
self.initializeComponents() self.theSelectedEntityList = [] self.theSelectedPluginInstanceList = [] self.CloseOrder = False def initializeComponents( self, session = None ): if ( session != None ): self.theSession = session self.thePluginManager = session.thePluginManager if ( self.theSession == None ):
def openWindow( self ):
self.theSelectedEntityList = [] self.theSelectedPluginInstanceList = [] self.CloseOrder = False
def openWindow( self ):
aVariable[MS_ENTITY_PROPERTYLIST][MS_VARIABLE_NUMCONC][MS_PROPERTY_FLAGS][MS_CHANGED_FLAG] = 1
def __recalculateConcentrations(self, aVariable, systemSize ): aValue = float( aVariable[MS_ENTITY_PROPERTYLIST][MS_VARIABLE_VALUE][MS_PROPERTY_VALUE] ) if systemSize != 0.0: newMolarConc = aValue / ( AVOGADRO * systemSize ) else: newMolarConc = 0.0 aVariable[MS_ENTITY_PROPERTYLIST][MS_VARIABLE_MOLARCONC][MS_PROPERTY_...
stmts : stmt stmts
stmts : stmts stmt | stmt
def p_stmts(t): ''' stmts : stmt stmts ''' t[0] = createList( 'stmts', t)
property_entity_list : property_entity property_entity_list
property_entity_list : property_entity_list property_entity
def p_property_entity_list(t): ''' property_entity_list : property_entity property_entity_list | property_entity | empty ''' t[0] = createList( 'property_entity_list', t )
valuelist : value valuelist
valuelist : valuelist value
def p_valuelist(t): ''' valuelist : value valuelist | value ''' t[0] = createList( 'valuelist', t )
matrixlist : matrix matrixlist
matrixlist : matrixlist matrix
def p_matrixlist(t): ''' matrixlist : matrix matrixlist | matrix ''' t[0] = createList( 'matrixlist', t )
print "Syntax error at line %d in %s. (near '%s')" % ( t.lineno, t.value )
print "Syntax error at line %d in %s. " % ( t.lineno, t.value )
def p_error(t): print "Syntax error at line %d in %s. (near '%s')" % ( t.lineno, t.value ) yacc.errok()
self.minmax[1]=self.minmax[0]*2
if self.minmax[0]==0: self.minmax[1]=1 else: self.minmax[1]=self.minmax[0]*2
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: self.minmax[1]=self.minmax[0]*2 #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self.minmax[0])/(self.yframemax_when_rescaling-self.yframemin_when_r...
self.ygrid[1]=pow(10,floor(log10(self.yframe[1]))) self.ygrid[0]=pow(10,ceil(log10(self.yframe[0]))) diff=int(log10(self.ygrid[1]/self.ygrid[0])) if diff==0:diff=1 if diff<6: self.yticks_no=diff self.yticks_step=10
if self.yframe[1]>0 and self.yframe[0]>0: self.ygrid[1]=pow(10,floor(log10(self.yframe[1]))) self.ygrid[0]=pow(10,ceil(log10(self.yframe[0]))) diff=int(log10(self.ygrid[1]/self.ygrid[0])) if diff==0:diff=1 if diff<6: self.yticks_no=diff self.yticks_step=10 else: self.yticks_no=5 self.yticks_step=pow(10,ceil(diff/5))
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: self.minmax[1]=self.minmax[0]*2 #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self.minmax[0])/(self.yframemax_when_rescaling-self.yframemin_when_r...
self.yticks_no=5 self.yticks_step=pow(10,ceil(diff/5))
self.theOwner.theSession.printMessage("negative value in range, falling back to linear scale") self.change_scale()
def reframey(self): #no redraw! #get max and min from databuffers if self.zoomlevel==0: self.getminmax() if self.minmax[0]==self.minmax[1]: self.minmax[1]=self.minmax[0]*2 #calculate yframemin, max if self.scale_type=='linear': yrange=(self.minmax[1]-self.minmax[0])/(self.yframemax_when_rescaling-self.yframemin_when_r...
anArgumentTuple = tuple( self.theDirectoryName ) + (sim,) + (data,)
anArgumentTuple = ( self.theDirectoryName, sim , data )
def createInstance( self, sim, data, parent=None ): aConstructor = self.theModule.__dict__[self.theName] anArgumentTuple = tuple( self.theDirectoryName ) + (sim,) + (data,) apply( aConstructor, anArgumentTuple )
if type(aMessage) == type([]) or type(aMessage) == type(()) :
if type(aMessage) == list:
def printMessage( self, aMessage ):
aMessage = '\n' + aMessage[0]
aMessage[0] = '\n' + aMessage[0]
def printMessage( self, aMessage ):
aString = str( aMessage )
aString = str( aLine )
def printMessage( self, aMessage ):
self.pull = 0 self.thePositiveFlag = 1 self.theAutoChangeFlag = 1 self.theActualValue = 0 self.theBarLength = 0 self.theMultiplier = 0
self.pull = FALSE self.thePositiveFlag = TRUE self.theFixFlag = FALSE self.theActualValue = FALSE self.theBarLength = FALSE self.theMultiplier = FALSE
def __init__( self, dirname, data, pluginmanager, root=None ):
'on_add_button_clicked' : self.updateByAddbutton, 'on_subtract_button_clicked' : self.updateBySubtractbutton,
'on_add_button_clicked' : self.updateByIncrease, 'on_subtract_button_clicked' : self.updateByDecrease,
def __init__( self, dirname, data, pluginmanager, root=None ):
'auto_button_toggled' : self.updateByAutoButton ,
'fix_checkbutton_toggled' : self.updateByFix ,
def __init__( self, dirname, data, pluginmanager, root=None ):
value = aValue self.theActualValue = value
self.theActualValue = aValue
def update( self ): aString = str( self.theFullPN()[ID] ) aString += ':\n' + str( self.theFullPN()[PROPERTY] ) self.theIDEntry.set_text ( aString )
= self.calculateBarLength( value ) aIndicator = (value / (float)(10**(self.theMultiplier))) \
= self.calculateBarLength( aValue ) aIndicator = (aValue / (float)(10**(self.theMultiplier))) \
def update( self ): aString = str( self.theFullPN()[ID] ) aString += ':\n' + str( self.theFullPN()[PROPERTY] ) self.theIDEntry.set_text ( aString )
self['progressbar'].set_format_string(str(value))
self['progressbar'].set_format_string(str(aValue))
def update( self ): aString = str( self.theFullPN()[ID] ) aString += ':\n' + str( self.theFullPN()[PROPERTY] ) self.theIDEntry.set_text ( aString )
def updateByAuto( self, value ): self.theAutoChangeFlag = 1 self.update() def updateByAddbutton( self , obj ): self['auto_button'].set_active( 0 )
def updateByAuto( self, aValue ): self.theFixFlag = 0 self.update() def updateByIncrease( self , obj ): self.theFixFlag = TRUE self['fix_checkbutton'].set_active( TRUE )
def updateByAuto( self, value ):
aNumber = string.atof( aNumberString )
try: aNumber = string.atof( aNumberString ) except: anErrorMessage = "Numeric charactor must be inputted!" aWarningWindow = ConfirmWindow(OK_MODE,anErrorMessage,'Error !') return None
def updateByAddbutton( self , obj ):
self.theAutoChangeFlag = 0 self.update() def updateBySubtractbutton( self,obj ): self['auto_button'].set_active( 0 )
self.update() def updateByDecrease( self,obj ): self.theFixFlag = TRUE self['fix_checkbutton'].set_active( TRUE )
def updateByAddbutton( self , obj ):
self.theAutoChangeFlag = 0
def updateBySubtractbutton( self,obj ):
if self.theAutoChangeFlag : pass else : self['auto_button'].set_active( 0 )
def updateByTextentry(self, obj):
aNumber = string.atof( aNumberString )
self['fix_checkbutton'].set_active( TRUE ) try: aNumber = string.atof( aNumberString ) except: anErrorMessage = "Numeric charactor must be inputted!" aWarningWindow = ConfirmWindow(OK_MODE,anErrorMessage,'Error !') return None self.theFixFlag = TRUE
def updateByTextentry(self, obj):
self.theAutoChangeFlag = 0 self.update() def updateByAutoButton(self, autobutton):
self.update() def updateByFix(self, autobutton): self.theFixFlag = self['fix_checkbutton'].get_active()
def updateByTextentry(self, obj):
if self['auto_button'].get_active() :
if self.theFixFlag == TRUE: aMultiplier = self.pull-2 else :
def calculateBarLength( self, value ):
else : aMultiplier = self.pull-2
def calculateBarLength( self, value ):
print aSubSystemList
def __loadProperty( self, anEml, aSystemPath='' ): # the default of aSystemPath is empty because # unlike __loadEntity() this starts with the root system
aEntryList = EntryListWindow.EntryListWindow( self, self.theSimulator )
aEntryList = EntryListWindow.EntryListWindow( self )
def createNewEntryList( self, button_obj ) : aEntryList = EntryListWindow.EntryListWindow( self, self.theSimulator )
self.theEntityListWindow.setSession( self.theSession )
def __loadData( self, *arg ) : """loads model or script file arg[0] --- ok button of FileSelection arg[1] --- 'Model'/'Script' (str) Return None """
self.theMessageWindowVisible = False self.hideMessageWindow() self.__resizeVertically( self['entitylistarea'].get_allocation()[3] )
self.theMessageWindowVisible = False self.hideMessageWindow() if self.theEntityListWindowVisible: self.__resizeVertically( self['entitylistarea'].get_allocation()[3] ) else: self.__resizeVertically( 0 )
def __toggleMessageWindow( self, *arg ) :
self.__resizeVertically( self.theMessageWindow.getActualSize()[1] )
if self.theMessageWindowVisible: self.__resizeVertically( self.theMessageWindow.getActualSize()[1] ) else: self.__resizeVertically( 0 )
def __toggleEntityListWindow( self, *arg ):
self.drawpoint_minmax(aFullPNString, datapoint) else: self.drawpoint_connect(aFullPNString, datapoint)
if not self.drawpoint_minmax(aFullPNString, x, y, ymax, ymin, lastx, lasty, lastymax, lastymin ): pass self.drawpoint_connect(aFullPNString, x, y, ymax, ymin, lastx, lasty, lastymax, lastymin )
def drawpoint(self, aFullPNString, datapoint): if self.strip_mode == 'history': self.drawpoint_minmax(aFullPNString, datapoint) else: self.drawpoint_connect(aFullPNString, datapoint)
def drawpoint_minmax(self, aFullPNString, datapoint): if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[DP_TIME]) ymax=self.converty_to_plot(datapoint[DP_MAX]) ymin=self.converty_to_plot(datapoint[DP_MIN]) lastx=self.lastx[aFullPNString] lastymax=self.lastymax[aFullPNString] ...
def drawpoint_minmax(self, aFullPNString, x, y, ymax, ymin, lastx, lasty, lastymax, lastymin ):
def drawpoint_minmax(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[DP_TIME]) ymax=self.converty_to_plot(datapoint[DP_MAX]) ymin=self.converty_to_plot(datapoint[DP_MIN])
if dx<2: self.drawminmax(aFullPNString,x,ymax, ymin) else:
self.drawminmax(aFullPNString,x,ymax, ymin) if dx>1: return True else: return False
def drawpoint_minmax(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[DP_TIME]) ymax=self.converty_to_plot(datapoint[DP_MAX]) ymin=self.converty_to_plot(datapoint[DP_MIN])
x0=lastx ymax0=lastymax ymin0=lastymin x1=x ymax1=ymax ymin1=ymin x=x0+1 while x<=x1: self.drawminmax(aFullPNString, x, ymax, ymin) x+=1
def drawpoint_minmax(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[DP_TIME]) ymax=self.converty_to_plot(datapoint[DP_MAX]) ymin=self.converty_to_plot(datapoint[DP_MIN])
def drawpoint_connect(self, aFullPNString, datapoint):
def drawpoint_connect(self, aFullPNString, x, y, ymax, ymin, lastx, lasty, lastymax, lastymin ):
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) lastx=self.lastx[aFullPNString] lasty=self.lasty[aFullPNString] self.lastx[aFullPNString]=x self.lasty[aFullPNString]=y last_point_within_f...
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
if (not cur_point_within_frame) and (not last_point_within_frame):
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
pass else:
if True:
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
if y0<self.plotaread[1] and y1>=self.plotaread[1]:
if y0<self.plotaread[1] and y1<self.plotaread[1]: return if y0>self.plotaread[3] and y1>self.plotaread[3]: return if y0<self.plotaread[1]:
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
if y0>self.plotaread[3] and y1<=self.plotaread[3]:
if y0>self.plotaread[3] :
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
if y1<self.plotaread[1] and y0>=self.plotaread[1]:
if y1<self.plotaread[1]:
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
if y1>self.plotaread[3] and y0<=self.plotaread[3]:
if y1>self.plotaread[3]:
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
if x0<self.plotaread[0] and x1>=self.plotaread[0]:
if x0<self.plotaread[0] :
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
if x0>self.plotaread[2] and x1<=self.plotaread[2]:
if x0>self.plotaread[2] :
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...
if x1<self.plotaread[0] and x0>=self.plotaread[0]:
if x1<self.plotaread[0] :
def drawpoint_connect(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[0]) y=self.converty_to_plot(datapoint[1]) cur_point_within_frame=self.withinframes([x,y]) #getlastpoint, calculate chang...