xsl_convert.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:rtf2xml 作者: paulhtremblay 项目源码 文件源码
def __transform_xsltproc(self, file, xsl_file, output, params = {}):
        command = 'xsltproc ' 

        param_string = ''
        keys = params.keys()
        for key in keys:
            param_string += ' %s "%s"' % (key, params[key])

        if param_string:
            command += ' --stringparam %s' % param_string

        command += ' -o %s %s %s' % (output, xsl_file, file)
        # sys.stdout.write('executing command "%s\n"' % command)
        (exit_status, out_text) = commands.getstatusoutput(command)
        return exit_status, out_text
        # os.system(command)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号