dongshi1188 2015-01-13 18:20
浏览 22
已采纳

使用golang present包运行ruby或python代码

I used Golang present package to build a presentation. I'm able to run Golang code using .play <file>.go in my given .slide file.

I wonder if it's possible to run ruby or python code too using .play <file>.rb or .play <file>.py ?

I tried above method but it's giving me error when I click on Run button in browser. Is it possible to run code for other languages ? If Yes, how ? If No, Why not ?

check.rb:

puts 'hello, world'

Here is the code for my example.slide file:

Checking the working of Ruby Code
Nothing much here!
15:04 2 Jan 2006
Tags: Ruby, Golang

Piyush Chauhan
********************
********************
********************
@piyushpsycho

* Title of slide or section (must have asterisk)

Some Text

.play check.rb

** Subsection

- bullets
- more bullets
- a bullet with
  • 写回答

1条回答 默认 最新

  • douke9379 2015-01-13 20:26
    关注

    Present uses a shebang comment to determine the program to run. Change your script to:

    #! /usr/bin/ruby
    puts 'hello, world'
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊
  • ¥15 安装svn网络有问题怎么办
  • ¥15 vue2登录调用后端接口如何实现