- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
try:
dday = time.strftime("%d", time.localtime(os.path.getmtime(path + d))).lstrip('0')
dmonth = time.strftime("%m", time.localtime(os.path.getmtime(path + d))).lstrip('0')
dhour = time.strftime("%H", time.localtime(os.path.getmtime(path + d))).lstrip('0')
dmin = time.strftime("%M", time.localtime(os.path.getmtime(path + d))).lstrip('0')
screenpath = os.listdir(spath)
for screen in screenpath:
sday = time.strftime("%d", time.localtime(os.path.getmtime(spath + screen))).lstrip('0')
smonth = time.strftime("%m", time.localtime(os.path.getmtime(spath + screen))).lstrip('0')
shour = time.strftime("%H", time.localtime(os.path.getmtime(spath + screen))).lstrip('0')
smin = time.strftime("%M", time.localtime(os.path.getmtime(spath + screen))).lstrip('0')
if dday == sday:
if dmonth == smonth:
if dhour == shour:
if dmin == smin:
scr = spath + screen
if scr:
return str(scr)
else:
return None
except:
return "None"
это примерно как учиться летать, прыгая из окон