io - How to call an external program and pass a string as a stdin to it in lua? -


i'm writing simple script in lua. here's got stuck: i'd call external program , pass string it, sees stdin. how it?

you can use io.popen mode "w", returns file handler can write data to.

--test lua interpreter local f = io.popen("lua","w")  f:write("print 'hello lua'")  f:close() 

note function system dependent , not available in platforms.


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -