Created
March 30, 2015 07:57
-
-
Save detly/490f8f0cd2508ee30a49 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import pexpect | |
def callback(state): | |
data = state['child'].before + state['child'].after | |
print("Got: {:s}".format(repr(data))) | |
def main(): | |
cmd = ' '.join([ | |
sys.executable, | |
'pexpect_bug_script.py' | |
]) | |
output, status = pexpect.run( | |
cmd, | |
events={'\r': callback} | |
) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment