Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
- [GCC 4.5.2] on linux2
- Type "help", "copyright", "credits" or "license" for more information.
- >>> import pexpect
- >>> import sys
- >>> child = pexpect.spawn('gdb',logfile=sys.stdout)
- >>> try:
- ... child.expect(pexpect.EOF,timeout=0)
- ... except Exception, e:
- ... print "hi"
- ...
- GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
- Copyright (C) 2010 Free Software Foundation, Inc.
- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law. Type "show copying"
- and "show warranty" for details.
- This GDB was configured as "x86_64-linux-gnu".
- For bug reporting instructions, please see:
- <http://www.gnu.org/software/gdb/bugs/>.
- (gdb) hi
- >>> child.before
- 'GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2\r\nCopyright (C) 2010 Free Software Foundation, Inc.\r\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\nThis is free software: you are free to change and redistribute it.\r\nThere is NO WARRANTY, to the extent permitted by law. Type "show copying"\r\nand "show warranty" for details.\r\nThis GDB was configured as "x86_64-linux-gnu".\r\nFor bug reporting instructions, please see:\r\n<http://www.gnu.org/software/gdb/bugs/>.\r\n(gdb) '
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement