# help - 设置这个选项的帮助信息 # dest - 设置这个选项的值就是解析出来后放到哪个属性中 parser.add_argument("-q", dest="world")
args = parser.parse_args(args) # 如果你没有args参数,那么就使用sys.argv,也就是命令行参数啦。有这个参数,就方便我们调试啊 # args.world就是-q的值啦 # action - The basic type of action to be taken when this argument is encountered at the command line. # const - A constant value required by some action and nargs selections. # 这两个自己看帮助文档啦,比较复杂 # http://docs.python.org/library/argparse.html print args
Traceback (most recent call last): File "/cs/nginx/uwsgi/main.py", line 24, in application result = process().entry(environ, start_response) File "/cs/nginx/uwsgi/rds/base_mng.py", line 90, in entry self.process_put_request(env) File "/cs/nginx/uwsgi/rds/init_rds.py", line 149, in process_put_request result = self.do_put_request(env) File "/cs/nginx/uwsgi/rds/init_rds.py", line 140, in do_put_request err_code = op.do() File "/cs/nginx/uwsgi/rds/init_rds.py", line 70, in do if 0 == init_create_mp(mp): File "/cs/nginx/uwsgi/rds/init/main.py", line 44, in init_create_mp os.mkdir(mp,0755) OSError: [Errno 13] Permission denied: '/aaab'
使用mysql -uroot -p登陆,然后修改mysql库中的user表 update user set password_expired="N" where user="root"; update user set authentication_string=password("hnagroup") where user="root";