Skip to content

Instantly share code, notes, and snippets.

@ajtulloch
Created February 10, 2015 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ajtulloch/8413211619a5a8619ea1 to your computer and use it in GitHub Desktop.
Save ajtulloch/8413211619a5a8619ea1 to your computer and use it in GitHub Desktop.
#! /usr/bin/env python
import pexpect
import pexpect.replwrap
repl = pexpect.replwrap.REPLWrapper("lua", u"> ", None, u"> ")
output = repl.run_command("= 1 + 1", timeout=1).splitlines()[1:]
assert(int(output[0]) == 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment