本文整理汇总了Python中pythonds.basic.stack.Stack.seek方法的典型用法代码示例。如果您正苦于以下问题:Python Stack.seek方法的具体用法?Python Stack.seek怎么用?Python Stack.seek使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pythonds.basic.stack.Stack
的用法示例。
在下文中一共展示了Stack.seek方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: chkid_len
# 需要导入模块: from pythonds.basic.stack import Stack [as 别名]
# 或者: from pythonds.basic.stack.Stack import seek [as 别名]
def chkid_len(self,main,a,b=None,c=None,d=None,e=False):
if e:
if len(a)==8 or len(a)==10 or a.count('x')==4:
return True
else:
self.alert(main,'ID Less than 8 or 10!','ID length allowed is 8 or 10 \n You have #'+str(len(a))+' digits.')
return False
else:
print("self table===="+self.table)
print("Check by name is activated!")
# que = "SELECT * FROM wp_2015ptainsuracelist where frm_stdname='%s' AND frm_std_middle_name='%s' AND frm_std_last_name='%s';" % (b,c,d)
que = """SELECT * FROM """+self.table+""" where frm_stdname=? AND frm_std_middle_name=? AND frm_std_last_name=?"""
fullname = (str(b),str(c),str(d))
rr=main.dbsql3.data_query(que,fullname)
p = Stack()
print(b+" "+c+" "+d)
print("student name! search")
print(rr)
if rr:
for i in rr[0]:
p.push(i)
rrr=p.seek()
OR = rrr[18]
ins = rrr[16]
reg = rrr[15]
trans = rrr[19]
if OR=='' and ins==0 and reg==0 and trans=='':
return 'False1'
if OR!='' and ins==0 and trans!='':
return 'True1',rrr
if OR!='' and ins!=0 and trans!='':
return 'True2',rrr
else:
return 'False2'
示例2: chkid_allrecord
# 需要导入模块: from pythonds.basic.stack import Stack [as 别名]
# 或者: from pythonds.basic.stack.Stack import seek [as 别名]
def chkid_allrecord(self,m,rr1):
# que = "SELECT * FROM wp_2015ptainsuracelist where frm_id='%s';" % (rr1)
# rr=m.db.query(que)
idData = (str(rr1),)
que = """SELECT * FROM """+self.table+""" where frm_id==?"""
rr=m.dbsql3.data_query(que,idData,False)
print rr
p = Stack()
print(rr)
if rr:
for i in rr[0]:
p.push(i)
rrr=p.seek()
OR = rrr[18]
ins = rrr[16]
reg = rrr[15]
trans = rrr[19]
print "Pass chkid_allrecord!******************"
if OR=='' and ins==0 and reg==0 and trans=='':
return 'False1',rrr
if OR!='' and ins==0 and trans!='':
return 'True1',rrr
if OR!='' and ins!=0 and trans!='':
return 'True2',rrr
else:
return 'False2'
示例3: chkDate_allRec
# 需要导入模块: from pythonds.basic.stack import Stack [as 别名]
# 或者: from pythonds.basic.stack.Stack import seek [as 别名]
def chkDate_allRec(self,m,a,camp):
# que = "SELECT * FROM wp_2015ptainsuracelist where frm_time_date='%s';" % (a)
# rr=m.db.query(que)
dateData = (str(a),)
que = """SELECT * FROM """+self.table+""" where frm_time_date==?"""
rr=m.dbsql3.data_query(que,dateData,False)
# print(rr)
y = Stack()
p= []
str2=[]
if rr:
for i in rr:
print(i)
# OR = i[18]
# ins = i[16]
# reg = i[15]
# trans = i[19]
#
if i[18]!='' and i[15]!=0 and i[16]!=0 and i[19]!='' and i[20]==camp:
y.push(list(i))
#Has a sibling and paid the insurance fee
if i[18]!='' and i[15]==0 and i[16]!=0 and i[19]!='' and i[20]==camp:
y.push(list(i))
#declared but not insured
if i[18]!='' and i[15]==0 and i[16]==0 and i[19]!='' and i[20]==camp:
y.push(list(i))
return True,y.seek()
# ns!='':
# return 'True2',rrr
else:
return False