Форум сайта python.su
2
Добрый день.
По клику работает функция:
def event_1(event): if os.access(os.getcwd() + '/site/node', os.F_OK) and os.access(os.getcwd() + '/site/export', os.F_OK): text_out.delete('1.0', 'end') text_out.insert('1.0', 'folder NODE and EXPORT - OK\n\v') else: text_out.delete('1.0', 'end') text_out.insert('1.0', 'folder - ERROR\n') if os.access(os.getcwd() + '/site/node/2016', os.F_OK): text_out.insert('1.0', '2016\n') else: text_out.insert('1.0', 'folder 2016 - ERROR\n') if os.access(os.getcwd() + '/site/node/2016/04', os.F_OK): text_out.insert('1.0', '\tERROR no 04 folder\n') else: text_out.insert('1.0', '\t04 april\n') if os.access(os.getcwd() + '/site/node/2016/05', os.F_OK): text_out.insert('1.0', '\tERROR no 05 folder\n') else: text_out.insert('1.0', '\t05 april\n') if os.access(os.getcwd() + '/site/node/2016/06', os.F_OK): text_out.insert('1.0', '\tERROR no 06 folder\n') else: text_out.insert('1.0', '\t06 april\n') if os.access(os.getcwd() + '/site/node/2016/07', os.F_OK): text_out.insert('1.0', '\tERROR no 07 folder\n') else: text_out.insert('1.0', '\t07 april\n') if os.access(os.getcwd() + '/site/node/2016/08', os.F_OK): text_out.insert('1.0', '\tERROR no 08 folder\n') else: text_out.insert('1.0', '\t08 april\n') if os.access(os.getcwd() + '/site/node/2016/09', os.F_OK): text_out.insert('1.0', '\tERROR no 09 folder\n') else: text_out.insert('1.0', '\t09 april\n') if os.access(os.getcwd() + '/site/node/2016/10', os.F_OK): text_out.insert('1.0', '\tERROR no 10 folder\n') else: text_out.insert('1.0', '\t10 april\n') if os.access(os.getcwd() + '/site/node/2016/11', os.F_OK): text_out.insert('1.0', '\tERROR no 11 folder\n') else: text_out.insert('1.0', '\t11 april\n') if os.access(os.getcwd() + '/site/node/2016/12', os.F_OK): text_out.insert('1.0', '\tERROR no 12 folder\n') else: text_out.insert('1.0', '\t12 april\n')
ERROR no 12 folder
ERROR no 11 folder
ERROR no 10 folder
ERROR no 09 folder
ERROR no 08 folder
ERROR no 07 folder
ERROR no 06 folder
ERROR no 05 folder
ERROR no 04 folder
2016
folder NODE and EXPORT - OK
if os.access(os.getcwd() + '/site/node/2016/09', os.F_OK): print('ok') else: print('no')
Отредактировано Ubhra (Март 28, 2016 18:19:43)
Прикреплённый файлы:
a.PNG (9,5 KБ)
Офлайн
2
Разобрался. Идиот перепутал местами варианты условия ))
Офлайн
253
UbhraТак вы к сообщению директории не приложили. Как мы должны разбираться.
Почему не видит директории
Офлайн
568
Всегда, когда вижу такие портянки китайского кода возникает один и тот жен вопрос: самого то не задолбало одно и то же копипастить?
Офлайн