mbligh | 781f523 | 2007-11-22 00:34:33 +0000 | [diff] [blame] | 1 | # autotest_console.control - gives you an interactive interpreter within an |
| 2 | # autotest control file. |
| 3 | |
| 4 | # If you install IPython (http://ipython.scipy.org/, Ubuntu package "ipython"), |
| 5 | # you'll get a snazzy IPython console with readline and completion and all that. |
| 6 | # Otherwise you'll get a simple console without any of that. |
| 7 | |
| 8 | # -Steve Howard (showard@google.com) |
| 9 | |
| 10 | try: |
| 11 | import IPython |
| 12 | ipshell = IPython.Shell.IPShellEmbed(argv=[]) |
| 13 | ipshell() |
| 14 | except ImportError: |
| 15 | import code |
| 16 | code.interact('Autotest console', raw_input, local_env) |