如何在Python项目中使用ruby库

比如我非常喜欢github/markup这个东西,怎么能在Python中使用它呢

阅读 6.6k
3 个回答

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")
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题