摘要:
[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 prin 阅读全文
摘要:
[root@dn3 hadoop]# cat install.py #!/usr/bin/python #coding=utf-8 import os import sys if os.getuid() == 0: pass else: print('当前用户不是root用户,请用root用户运行') sys.exit(1) version = raw_input('请输... 阅读全文