-
Notifications
You must be signed in to change notification settings - Fork 0
/
settle_test_1.py
36 lines (30 loc) · 958 Bytes
/
settle_test_1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- coding: cp1251 -*-
# Ñêðèïò ïðîâåðêè àêòèâíûõ êàðò íà ïðåäìåò èõ âêëþ÷åíèÿ â r1
import subprocess as sp
import fnmatch
import os
import sys
#1. first buld SET of recharged cards
rc_file=open('C:\\Share_transport\\autoscript\\recharged_.csv')
rc_text=rc_file.read()
rc_ls=rc_text.split('\n')
RC=set(rc_ls)
print (len(RC))
RC.discard('')
print (len(RC))
#2. buld SET of tested cards
tc_file=open('C:\\Share_transport\\autoscript\\tempcard_.csv')
tc_text=tc_file.read()
tc_ls=tc_text.split('\n')
TC=set(tc_ls)
print (len(TC))
TC.discard('')
print (len(TC))
logfile = open('tempcard_log.txt','w')
logfile.write( 'Íå ïîïîëíÿëèñü íà îò÷åòíûé ìåñÿö: '+str(len(TC-RC))+'\n')
for n in TC-RC:
logfile.write(n+'\n')
#logfile.write( 'Êàðòû ïîïîëíåíû íà îò÷åòíûé ìåñÿö, íî íå åçäèëè â íåì: '+str(len(RC-UC))+'\n')
#for n in RC-UC:
# logfile.write(n+'\n')
print (' ïîäðîáíîñòè â tempcard_log.txt')