集成 Rails 和 Python
这听起来像是一个模糊的问题,但我想知道是否可以将 Python 代码集成到我的 Rails 应用程序中。更具体地说,如果我有一个用 pygame 之类的东西编码的游戏(并且说 panda3d 可能太过分了),我该如何制作它,以便有人可以在我的 Rails 应用程序上通过他们的浏览器玩游戏(如果你没有一段答案,但可以提供阅读材料的链接)
This might sound like a vague question, but i wanted to know if there is to integrate Python code into my rails application. More specifically, if i had a game coded with something like pygame (and it might be pushing too far to say panda3d), how could i make it so someone could play through their browser on my rails app (if you don't have a one paragraph answer, but a link to reading material that's fine)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只要用户拥有 Panda3D 插件,Panda3D 应用程序就可以在浏览器中运行。请参阅 Panda3D 手册的第三部分分发 Panda3D 应用程序。
pygame 无法在浏览器中运行,因此无法集成到 Rails 应用程序中。
我没有 Rails 经验,但如果 Rails 不允许您在需要时仔细研究 html,我会感到惊讶。
Panda3D applications can be run in the browser provided the user has a Panda3D plugin. See section III of the Panda3D manual Distributing Panda3D Applications.
pygame cannot be run in the browser and thus cannot be integrated into a rails application.
I do not have rails experience, but I would be surprised if rails did not let you munge about with the html if needed.