本文整理汇总了Python中database.DataBase.insertZoneDismiss方法的典型用法代码示例。如果您正苦于以下问题:Python DataBase.insertZoneDismiss方法的具体用法?Python DataBase.insertZoneDismiss怎么用?Python DataBase.insertZoneDismiss使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类database.DataBase
的用法示例。
在下文中一共展示了DataBase.insertZoneDismiss方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Principal
# 需要导入模块: from database import DataBase [as 别名]
# 或者: from database.DataBase import insertZoneDismiss [as 别名]
#.........这里部分代码省略.........
else:
wpt = "NOK"
if int(allData[10].split(";")[1]) == 0:
disc = "OK"
else:
disc = "NOK"
try:
if int(allData[15].split(";")[1]) == 0:
dz = "OK"
except:
dz = "NOK"
dzDismiss = allData[15].split(";")
for i,dzValue in enumerate(dzDismiss):
if i !=0:
self.db.insertDz(int(numCompetitor),dzValue)
codNum = int(allData[5].split(";")[1])
version = "2.0"
gpsNumber = allData[3].split(";")[1]
obs = " "
self.db.insertData(int(numCompetitor),nameCompetitor,category,wpt,dz,disc,codNum,version,gpsNumber,obs)
for line in allData:
try:
if findWord:
tmpnum = line.split(";")[3]
num = tmpnum.split(":")[1]
zonePassed.append(int(num))
if line.startswith('InfosChronos') :
findWord = True
except:
pass
zoneDismiss = list(set(self.countZone) - set(zonePassed))
for a in zoneDismiss:
self.db.insertZoneDismiss(numCompetitor,a)
#except:
#pass
self.countVehicles()
self.mainTable()
def countVehicles(self):
"""Count how many different vehicle exist and count each of them, then show it on
a text area
"""
rows = self.db.get_category()
self.minMoto = rows[0][2]
self.maxMoto = rows[0][3]
self.minQuad = rows[1][2]
self.maxQuad = rows[1][3]
self.minCar = rows[2][2]
self.maxCar = rows[2][3]
countMoto = 0
countQuad = 0
countCar = 0
rows = self.db.get_tables()
for row in rows:
if row[1] >= self.minMoto and row[1] <= self.maxMoto:
countMoto += 1
elif row[1] >= self.minQuad and row[1] <= self.maxQuad:
countQuad += 1
elif row[1] >= self.minCar and row[1] <= self.maxCar:
countCar += 1
self.mainWindow.lnCountMoto.setText(str(countMoto))