本文整理汇总了Python中Base.getCurrentTime方法的典型用法代码示例。如果您正苦于以下问题:Python Base.getCurrentTime方法的具体用法?Python Base.getCurrentTime怎么用?Python Base.getCurrentTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Base
的用法示例。
在下文中一共展示了Base.getCurrentTime方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: showAnalysis
# 需要导入模块: import Base [as 别名]
# 或者: from Base import getCurrentTime [as 别名]
def showAnalysis(self):
import Base, Graph
# graph must be new, to clear former polylines
if self.__graph:
self.__graph.clearLines()
self.clearAxises()
else:
self.__graph = Graph.AnalysisGraph()
print '111 ' , Base.getCurrentTime()
if self.__ifAnalysesDisplacement: self.showDisplacement()
print '222 ' , Base.getCurrentTime()
if self.__ifAnalysesMPs : self.showMPDists()
print '333 ' , Base.getCurrentTime()
if self.__ifAnalysesStress : self.showStress()
print '444 ' , Base.getCurrentTime()
示例2: extractData
# 需要导入模块: import Base [as 别名]
# 或者: from Base import getCurrentTime [as 别名]
def extractData(self):
import Base
try:
self.__parseSchema()
except:
print 'unvalid data'
raise
t=0
while t<self.__graphsNum:
try:
self.__parse1Graph()
if t%100==0:
print 'step %d parsed done at time '% t , Base.getCurrentTime()
except:
print 'unvalid data at step %d'%t
t+=1
#extracter = DGExtracter()
#extracter.setFile(filename)
#extracter.saveStress4Block(1)
#extracter.setSaveMPMovements(True)
#extracter.setSaveDists(True)
#extracter.extractData()
#extracter.outputExtractedData()
示例3: accepted
# 需要导入模块: import Base [as 别名]
# 或者: from Base import getCurrentTime [as 别名]
def accepted(self):
import Base
from extractDGData import DGExtracter
import os
from PySide import QtCore, QtGui
bar = QtGui.QProgressDialog('extracting data...','stop Analysis' , 0 , 100 , None , QtCore.Qt.WindowModal)
bar.canceled.connect(self.__stopAnalysis)
bar.setValue(0)
bar.setVisible(True)
self.__setStopAnalysisFlag(False)
if not self.__ui.ui.checkBox_useExistingData.isChecked():
extracter = DGExtracter()
extracter.setFile(os.path.join(Base.__currentProjectPath__,'data.dg'))
if self.__ui.ui.checkBox_stress.isChecked(): extracter.saveStress4Block(self.__ui.ui.spinBox_No.value())
extracter.setSaveMPMovements(self.__ui.ui.checkBox_MP.isChecked())
extracter.setSaveDists(self.__ui.ui.checkBox_displacement.isChecked())
print 'extracting data ' , Base.getCurrentTime()
extracter.extractData()
print 'extracting data done ' , Base.getCurrentTime()
if self.__getStopAnalysisFlag(): return
bar.setValue(20)
bar.setLabelText('outputing data...')
print 'outputing extracting data ' , Base.getCurrentTime()
extracter.outputExtractedData()
print 'outputing extracting data done ' , Base.getCurrentTime()
if self.__getStopAnalysisFlag(): return
bar.setValue(40)
if not self.__analysiser:
self.__analysiser = DGAnalysiser()
else:
self.__analysiser.uninstallToolbar()
self.__analysiser.setAnalysesDisplacement(self.__ui.ui.checkBox_displacement.isChecked())
self.__analysiser.setAnalysesMPs(self.__ui.ui.checkBox_MP.isChecked())
self.__analysiser.setAnalysesStress(self.__ui.ui.checkBox_stress.isChecked())
self.__analysiser.setBlockNumber(self.__ui.ui.spinBox_No.value())
self.__analysiser.setUseExistingData(self.__ui.ui.checkBox_useExistingData.isChecked())
bar.setLabelText('loading outputed data...')
print 'loading data ' , Base.getCurrentTime()
self.__analysiser.loadData()
print 'loading data done ' , Base.getCurrentTime()
if self.__getStopAnalysisFlag(): return
bar.setValue(50)
bar.setLabelText('analysesing and showing data...')
self.__analysiser.setupToolbar()
print 'show analysising ' , Base.getCurrentTime()
self.__analysiser.showAnalysis()
print 'show analysising done ' , Base.getCurrentTime()
bar.setValue(100)