[root@zabbix-server python3]# cat dir.py
1 #!/usr/bin/python3 2 # -*- coding: utf-8 -*- 3 import os 4 dir = "/home/o2ouser/python3" 5 if os.path.isdir(dir): 6 print('%s is a dir' % dir) 7 else: 8 print('%s is not a dir' % dir)