Shell commands from a Luan server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Shell commands from a Luan server

Thermo
Is it possible in Luan to click a button that executes some shell command?

I was looking through here:

http://www.luan.ws/manual.html

and the os module seems to be what I need. The problem is I get errors when attempting to import it. 'require "os"' fails for me, and also if I try to use the os module without importing anything, I get errors saying "os" is not recognized.

How can I execute shell commands from Luan?
Reply | Threaded
Open this post in threaded view
|

Re: Shell commands from a Luan server

fschmidt
Administrator
os.html.luan

rename this to "os.html.luan"
Reply | Threaded
Open this post in threaded view
|

Re: Shell commands from a Luan server

Thermo
It works, thanks.

uri("os:"..cmd).read_text() does the job.