python中格式化输出单引号

来源:互联网 发布:部落冲突 模拟软件 编辑:程序博客网 时间:2024/06/05 08:20

set_loc_command = '%s -e "alter table %s set location \'%s\';"' %(beeline_cliet, table_name, location)            #(status, output) = commands.getstatusoutput(set_loc_command)            print set_loc_command
输出:
/home/xxx  -u jdbc:hive2://xxxxxxxx  -n username -p passwd --maxWidth=10000 -e "alter table  tablename           
 set location 'hdfs://xxxxxxx/app/inf';"



http://blog.csdn.net/zyz511919766/article/details/22668077


原创粉丝点击