您的位置:首页 > 编程语言 > Python开发

python中格式化输出单引号

2017-06-13 16:55 375 查看
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: