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

使用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

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

#! /usr/bin/ruby
puts 'hello, world'