比如我非常喜欢github/markup这个东西,怎么能在Python中使用它呢
https://github.com/whymirror/unholy
Compile Ruby to Python bytecode.
And, in addition, translate that bytecode back to Python source code using Decompyle (included.)
Requires Ruby 1.9 and Python 2.5.
python应该有相关的库吧
直接用命令行调用ruby程序
把gem的调用根据你的需求包装成shell,然后用Python调用你包装好的shell
require 'github/markup'
GitHub::Markup.render('README.markdown', "* One\n* Two")
正文完