def createWidget(self): """创建登录界面组件""" self.w1 = Text(root, width=15, height=1, bg='white') self.w1.pack() self.w1.insert(1.0, idcard.main()) self.height_width_label = Label(root, text='身份证号码:').pack() # self.height_width_label.grid(row=0, column=0, sticky=E) Button(self, text='身份证号码', command=idcard.main()).pack(side='left')
import 随机获得身份证号码 as idcard import 生产随机时间 as t if __name__ == '__main__': for i in range(10000, 20010): data = str(i) + ';' + idcard.main() + ';P301' + str( i) + ';' + t.get_time() + ';' + str(i + 69354.97) + ';' + str( i + 65880) + ';180.97;3294;0;0;0;;1603944000000' print(data) result2txt = str(data) # data是前面运行出的数据,先将其转为字符串才能写入 with open('E:/1wan.txt', 'a') as file_handle: # .txt可以不自己新建,代码会自动新建 file_handle.write(result2txt) # 写入 file_handle.write('\n') # 有时放在循环里面需要自动转行,不然会覆盖上一条数据
import 随机生成uuid as uid import 随机获得身份证号码 as idcard import 随机获得姓名 as name import 随机生成电话号码 as phone if __name__ == '__main__': t = 1602820800000 tt = 86400000 for i in range(1, 18): count = 10000 for j in range(0, (i * 50001 - (i - 1) * 50001)): if count < 40000: count = count + 1 data= uid.getUUID()+";;01;1;"+name.random_name() + "|1|" + idcard.main() + "|" + phone.phone_num() + "|H1003029419|2020年06月16日|2686.68|null|null|null|null|null;;1;;;;"+str(t + tt * i) print(str(data)) with open('E:/3wan.txt', 'a') as file_handle: # .txt可以不自己新建,代码会自动新建 file_handle.write(data) # 写入 file_handle.write('\n') # 有时放在循环里面需要自动转行,不然会覆盖上一条数据 else: count = count + 1 data = uid.getUUID() + ";" + "f2eb6b4a34b3fb" + str(count) + "dbddd;01;1;" + name.random_name() + "|1|" + idcard.main() + "|" + phone.phone_num() + "|H1003029419|2020年06月16日|2686.68|null|null|null|null|null;;1;;;;"+ str(t + tt * i) with open('E:/2wan.txt', 'a') as file_handle: # .txt可以不自己新建,代码会自动新建 file_handle.write(data) # 写入 file_handle.write('\n') # 有时放在循环里面需要自动转行,不然会覆盖上一条数据 print(str(data))
import 随机生成uuid as uid import 随机获得身份证号码 as idcard import 随机获得姓名 as name import 随机生成电话号码 as phone if __name__ == '__main__': t = 1602734400000 tt = 86400000 for i in range(1, 20): count = 10000 for j in range(0, (i * 50001 - (i - 1) * 50001)): if count < 40000: count = count + 1 data = uid.getUUID() + ";;01;1;" + name.random_name( ) + "|1|" + idcard.main() + "|" + phone.phone_num( ) + "|H1003029419|2020年06月16日|2686.68|null|null|null|null|null;;1;;;;" + str( t + tt * i) print(str(data)) with open('E:/3wan.txt', 'a') as file_handle: # .txt可以不自己新建,代码会自动新建 file_handle.write(data) # 写入 file_handle.write('\n') # 有时放在循环里面需要自动转行,不然会覆盖上一条数据 else: count = count + 1 data = uid.getUUID() + ";" + "f2eb6b4a34b3fb" + str( count ) + "dbddd;01;0;" + name.random_name() + "|1|" + idcard.main( ) + "|" + phone.phone_num( ) + "|H1003029419|2020年06月16日|2686.68|null|null|null|null|null;;1;;;;" + str( t + tt * i) with open('E:/2wan.txt',
def text_idcard(): return id_card.main()
def way(self): # 用户姓名 self.lab_name = Label(self.root, text='用 户 姓 名 :').grid(row=0, column=1) self.text_name = Text(self.root, height=1, width=20) self.text_name.insert('0.0', name.random_name()) self.text_name.grid(row=0, column=2, sticky=W) self.text_name_click = Button(self.root, text='重新获取:', command=self.text_name1).grid(row=0, column=3, sticky=W) # 手机号码 self.lab_phone = Label(self.root, text='手 机 号 码 :').grid(row=1, column=1) self.text_phone = Text(self.root, height=1, width=20) self.text_phone.insert('0.0', phone.phone_num()) self.text_phone.grid(row=1, column=2, sticky=W) self.text_phone_click = Button(self.root, text='重新获取:', command=self.text_phone1).grid(row=1, column=3, sticky=W) # 身份证号码 self.lab_idcard = Label(self.root, text='身 份 证 号 码 :').grid(row=2, column=1) self.text_idcard = Text(self.root, height=1, width=20) self.text_idcard.insert('0.0', id_card.main()) self.text_idcard.grid(row=2, column=2, sticky=W) self.text_idcard_click = Button(self.root, text='重新获取:', command=self.text_idcard1).grid( row=2, column=3, sticky=W) # 统一社会征信码 self.lab_tyshzxm = Label(self.root, text='统一社会征信码:').grid(row=3, column=1) self.text_tyshzxm = Text(self.root, height=1, width=20) self.text_tyshzxm.insert('0.0', id_credit.create_social_credit()) self.text_tyshzxm.grid(row=3, column=2, sticky=W) self.text_tyshzxm_click = Button(self.root, text='重新获取:', command=self.text_tyshzxm1).grid( row=3, column=3, sticky=W) # 组织机构代码 self.lab_zzjgdm = Label(self.root, text='组织 机构 代码:').grid(row=4, column=1) self.text_zzjgdm = Text(self.root, height=1, width=20) self.text_zzjgdm.insert('0.0', id_credit.create_organization()) self.text_zzjgdm.grid(row=4, column=2, sticky=W) self.text_zzjgdm_click = Button(self.root, text='重新获取:', command=self.text_zzjgdm1).grid( row=4, column=3, sticky=W) #随机获得车架号 self.lab_vin = Label(self.root, text='车辆 车架 号:').grid(row=5, column=1) self.text_vin = Text(self.root, height=1, width=20) self.text_vin.insert('0.0', vin.random_vin()) self.text_vin.grid(row=5, column=2, sticky=W) self.text_vin_click = Button(self.root, text='重新获取:', command=self.text_vin1).grid(row=5, column=3, sticky=W) # 随机获得工行银行卡 self.lab_bank_gon = Label(self.root, text='工行 银行卡号:').grid(row=6, column=1) self.text_bank_gon = Text(self.root, height=1, width=20) self.text_bank_gon.insert('0.0', bank_card.gen_bank_card_nonghang()) self.text_bank_gon.grid(row=6, column=2, sticky=W) self.text_bank_gon_click = Button(self.root, text='重新获取:', command=self.text_bank_gon1).grid( row=6, column=3, sticky=W) # 随机获得农行银行卡 self.lab_bank_non = Label(self.root, text='农行 银行卡号:').grid(row=7, column=1) self.text_bank_non = Text(self.root, height=1, width=20) self.text_bank_non.insert('0.0', bank_card.gen_bank_card_gonghang()) self.text_bank_non.grid(row=7, column=2, sticky=W) self.text_bank_non_click = Button(self.root, text='重新获取:', command=self.text_bank_non1).grid( row=7, column=3, sticky=W) self.root.mainloop()
def text_idcard1(self): self.text_idcard.delete('0.0', END) self.text_idcard.insert('0.0', id_card.main())