[lupa-dev] Re: Redirecting stdout/stdin/stderr for a LuaRuntime

  • From: Stefan Behnel <stefan_ml@xxxxxxxxx>
  • To: lupa-dev@xxxxxxxxxxxxx
  • Date: Wed, 04 Feb 2015 10:54:21 +0100

Bart Grantham schrieb am 04.02.2015 um 01:26:
> Is there a way to create a LuaRuntime with a memory buffer for the
> stdin/stdout/stderr of the Lua VM?  I’d like to capture output from
> print statements in VM without them flowing directly into the python’s
> process’ stdout.  I tried looking in what docs I could find and I didn’t
> see a way to do it.

I don't think there is currently a way to do that, not through the Python
API. I also don't know how Lua handles these things - pull requests welcome.


> Also, is there documentation besides the pypi page?

No.


> I get the feeling
> there’s lots of parameters I could pass to LuaRuntime that aren’t
> documented anywhere but the Lupa C code.

It's certainly not complete, but I don't think there's all that much
missing either. Documentation can always be improved. Pull requests welcome.

Stefan

Other related posts: