Skip to content

Instantly share code, notes, and snippets.

@sdwfrost
Forked from ajtulloch/master.py
Created August 27, 2018 17:39
Show Gist options
  • Save sdwfrost/4e29b695340aedec13de82aba0a85fb6 to your computer and use it in GitHub Desktop.
Save sdwfrost/4e29b695340aedec13de82aba0a85fb6 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